aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/typer/Typer.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-01-01 19:24:41 +0100
committerMartin Odersky <odersky@gmail.com>2014-01-01 19:24:41 +0100
commitb1842f519e8e5ea7a7e5976521f8b6c9f7efeff0 (patch)
tree7547f4bc492fa4c53e4b77eec90d3f73195e24c6 /src/dotty/tools/dotc/typer/Typer.scala
parent3a0e9fbb0018e15c17aea659569202c315ad59f1 (diff)
downloaddotty-b1842f519e8e5ea7a7e5976521f8b6c9f7efeff0.tar.gz
dotty-b1842f519e8e5ea7a7e5976521f8b6c9f7efeff0.tar.bz2
dotty-b1842f519e8e5ea7a7e5976521f8b6c9f7efeff0.zip
More precise widening of types referring to a block-local.
The new scheme widens termRefs everywhere variance is positive and type-aliases over termrefs everywhere indepdendent of variance. Needed to add variance to TypeMap to make this work.
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 b80f54458..a53a18963 100644
--- a/src/dotty/tools/dotc/typer/Typer.scala
+++ b/src/dotty/tools/dotc/typer/Typer.scala
@@ -494,7 +494,7 @@ class Typer extends Namer with Applications with Implicits {
untpd.Block(stats1, expr2) withType expr2.tpe
} else
errorTree(result,
- i"local definition of ${leaks.head.name} escapes as part of block's type ${result.tpe}")
+ i"local definition of ${leaks.head.name} escapes as part of block's type ${result.tpe}"/*; full type: ${result.tpe.toString}"*/)
}
def typedIf(tree: untpd.If, pt: Type)(implicit ctx: Context) = track("typedIf") {