aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/typer/Typer.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-01-14 14:59:25 +0100
committerMartin Odersky <odersky@gmail.com>2014-01-14 14:59:25 +0100
commitc27bc71c2e3f91a275e40f082548ca244814f345 (patch)
tree8fd17dd1388c983ffaf0573c9c32d526e23b2a3e /src/dotty/tools/dotc/typer/Typer.scala
parenta0b6798f3127196114da818b18fbeda9633ca209 (diff)
downloaddotty-c27bc71c2e3f91a275e40f082548ca244814f345.tar.gz
dotty-c27bc71c2e3f91a275e40f082548ca244814f345.tar.bz2
dotty-c27bc71c2e3f91a275e40f082548ca244814f345.zip
Avoiding typing a () tree without position when typing return
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
}