diff options
author | odersky <odersky@gmail.com> | 2017-02-08 22:15:59 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-08 22:15:59 +1100 |
commit | de2c4477d2b9dfc0393b4acba5525fa9714835b9 (patch) | |
tree | 50035a4400c7ae47ca646e5c0949c7c801f3035d /compiler/src/dotty/tools/dotc | |
parent | 56ad4b195e18accf918b56da5f30e7c1eed0d9a4 (diff) | |
parent | 9e9206dbf3e1cbd378adcb9f65637d2cf331cc10 (diff) | |
download | dotty-de2c4477d2b9dfc0393b4acba5525fa9714835b9.tar.gz dotty-de2c4477d2b9dfc0393b4acba5525fa9714835b9.tar.bz2 dotty-de2c4477d2b9dfc0393b4acba5525fa9714835b9.zip |
Merge pull request #1943 from dotty-staging/fix/lambda-position
Positioned#initialPos: Union the position of every children
Diffstat (limited to 'compiler/src/dotty/tools/dotc')
-rw-r--r-- | compiler/src/dotty/tools/dotc/ast/Positioned.scala | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/src/dotty/tools/dotc/ast/Positioned.scala b/compiler/src/dotty/tools/dotc/ast/Positioned.scala index bb6817603..51949c6fe 100644 --- a/compiler/src/dotty/tools/dotc/ast/Positioned.scala +++ b/compiler/src/dotty/tools/dotc/ast/Positioned.scala @@ -123,6 +123,8 @@ abstract class Positioned extends DotClass with Product { private def unionPos(pos: Position, xs: List[_]): Position = xs match { case (p: Positioned) :: xs1 => unionPos(pos union p.pos, xs1) + case (xs0: List[_]) :: xs1 => unionPos(unionPos(pos, xs0), xs1) + case _ :: xs1 => unionPos(pos, xs1) case _ => pos } |