diff options
Diffstat (limited to 'compiler/src/dotty/tools/dotc/ast')
-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) => |