aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/dotty/tools/dotc/ast
diff options
context:
space:
mode:
authorliu fengyun <liu@fengy.me>2017-02-06 14:51:24 +0100
committerliu fengyun <liu@fengy.me>2017-02-10 19:26:07 +0100
commit6823e15cf08c68ca67f688159536f7a506d1969e (patch)
treed7eee103b65b74cd37a5e2dd0f652610cfd76776 /compiler/src/dotty/tools/dotc/ast
parentb5a9c8c4d1f832f2cc024f9cfe855d6e57bd35f9 (diff)
downloaddotty-6823e15cf08c68ca67f688159536f7a506d1969e.tar.gz
dotty-6823e15cf08c68ca67f688159536f7a506d1969e.tar.bz2
dotty-6823e15cf08c68ca67f688159536f7a506d1969e.zip
fix #1484: position of while incorrect in debug
Diffstat (limited to 'compiler/src/dotty/tools/dotc/ast')
-rw-r--r--compiler/src/dotty/tools/dotc/ast/Desugar.scala4
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) =>