diff options
author | Martin Odersky <odersky@gmail.com> | 2016-03-09 08:25:09 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2016-03-12 16:08:39 +0100 |
commit | c0927cf6a8c622d38f262939266145e48e0bc092 (patch) | |
tree | bb6cc9d8216c22f5fb8bc576b1d98bec1b1ac180 /src | |
parent | d24e10ce0ecbd66668852937e27d8ae50997ba67 (diff) | |
download | dotty-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.scala | 3 |
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 _ => } } |