diff options
author | Felix Mulder <felix.mulder@gmail.com> | 2017-02-13 15:01:03 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-13 15:01:03 +0100 |
commit | 07b67a8416c501d7f7b37442f3a294d9f9252895 (patch) | |
tree | 098772eb9ae3e5a64993e1b172505035c9b887ac /compiler/src | |
parent | 5bcbad29a368bf6a06230aed73488995e733d97a (diff) | |
parent | 1489eff397482fec14e5da54e4654278a5c6f7dc (diff) | |
download | dotty-07b67a8416c501d7f7b37442f3a294d9f9252895.tar.gz dotty-07b67a8416c501d7f7b37442f3a294d9f9252895.tar.bz2 dotty-07b67a8416c501d7f7b37442f3a294d9f9252895.zip |
Merge pull request #1951 from dotty-staging/fix-1484
fix #1484: position of while incorrect in debug
Diffstat (limited to 'compiler/src')
-rw-r--r-- | compiler/src/dotty/tools/dotc/ast/Desugar.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/src/dotty/tools/dotc/ast/Desugar.scala b/compiler/src/dotty/tools/dotc/ast/Desugar.scala index eda4a12dc..e3102fda2 100644 --- a/compiler/src/dotty/tools/dotc/ast/Desugar.scala +++ b/compiler/src/dotty/tools/dotc/ast/Desugar.scala @@ -991,12 +991,12 @@ object desugar { else Apply(ref(tupleTypeRef.classSymbol.companionModule.valRef), ts) case WhileDo(cond, body) => // { <label> def while$(): Unit = if (cond) { body; while$() } ; while$() } - val call = Apply(Ident(nme.WHILE_PREFIX), Nil) + val call = Apply(Ident(nme.WHILE_PREFIX), Nil).withPos(tree.pos) val rhs = If(cond, Block(body, call), unitLiteral) labelDefAndCall(nme.WHILE_PREFIX, rhs, call) case DoWhile(body, cond) => // { label def doWhile$(): Unit = { body; if (cond) doWhile$() } ; doWhile$() } - val call = Apply(Ident(nme.DO_WHILE_PREFIX), Nil) + val call = Apply(Ident(nme.DO_WHILE_PREFIX), Nil).withPos(tree.pos) val rhs = Block(body, If(cond, call, unitLiteral)) labelDefAndCall(nme.DO_WHILE_PREFIX, rhs, call) case ForDo(enums, body) => |