aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/typer/Typer.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/dotty/tools/dotc/typer/Typer.scala')
-rw-r--r--src/dotty/tools/dotc/typer/Typer.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/typer/Typer.scala b/src/dotty/tools/dotc/typer/Typer.scala
index 772c65ac3..9931e3a2e 100644
--- a/src/dotty/tools/dotc/typer/Typer.scala
+++ b/src/dotty/tools/dotc/typer/Typer.scala
@@ -698,7 +698,7 @@ class Typer extends Namer with Applications with Implicits {
else enclMethInfo(cx.outer)
}
val (from, proto) = enclMethInfo(ctx)
- val expr1 = typedExpr(tree.expr orElse untpd.unitLiteral, proto)
+ val expr1 = typedExpr(tree.expr orElse untpd.unitLiteral.withPos(tree.pos), proto)
cpy.Return(tree, expr1, from) withType defn.NothingType
}