Skip to content

Commit d17ceb5

Browse files
committed
Fix setChildPositions
Gave overlapping positions in the case of longer lists of children.
1 parent 36c8e13 commit d17ceb5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/dotty/tools/dotc/ast/Positioned.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@ abstract class Positioned extends DotClass with Product {
9191
}
9292
else outstanding = p :: outstanding
9393
case xs: List[_] =>
94-
elems = if (elems.isEmpty) xs else xs ::: elems
94+
val newElems = xs.reverse
95+
elems = if (elems.isEmpty) newElems else newElems ::: elems
9596
case _ =>
9697
}
9798
}

0 commit comments

Comments
 (0)