aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2016-03-09 08:25:09 +0100
committerMartin Odersky <odersky@gmail.com>2016-03-12 16:08:39 +0100
commitc0927cf6a8c622d38f262939266145e48e0bc092 (patch)
treebb6cc9d8216c22f5fb8bc576b1d98bec1b1ac180 /src
parentd24e10ce0ecbd66668852937e27d8ae50997ba67 (diff)
downloaddotty-c0927cf6a8c622d38f262939266145e48e0bc092.tar.gz
dotty-c0927cf6a8c622d38f262939266145e48e0bc092.tar.bz2
dotty-c0927cf6a8c622d38f262939266145e48e0bc092.zip
Fix setChildPositions
Gave overlapping positions in the case of longer lists of children.
Diffstat (limited to 'src')
-rw-r--r--src/dotty/tools/dotc/ast/Positioned.scala3
1 files changed, 2 insertions, 1 deletions
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 _ =>
}
}