From c0927cf6a8c622d38f262939266145e48e0bc092 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Wed, 9 Mar 2016 08:25:09 +0100 Subject: Fix setChildPositions Gave overlapping positions in the case of longer lists of children. --- src/dotty/tools/dotc/ast/Positioned.scala | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/dotty/tools/dotc/ast/Positioned.scala b/src/dotty/tools/dotc/ast/Positioned.scala index f9a775c98..cff77c919 100644 --- a/src/dotty/tools/dotc/ast/Positioned.scala +++ b/src/dotty/tools/dotc/ast/Positioned.scala @@ -91,7 +91,8 @@ abstract class Positioned extends DotClass with Product { } else outstanding = p :: outstanding case xs: List[_] => - elems = if (elems.isEmpty) xs else xs ::: elems + val newElems = xs.reverse + elems = if (elems.isEmpty) newElems else newElems ::: elems case _ => } } -- cgit v1.2.3