aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/typer/Typer.scala
diff options
context:
space:
mode:
authorGuillaume Martres <smarter@ubuntu.com>2014-12-28 17:42:04 +0100
committerGuillaume Martres <smarter@ubuntu.com>2015-02-11 16:33:20 +0100
commit5150cad821a9e7db821732eeb19019b96e1975a0 (patch)
treed69db0675c5b79952ec8e44f7dff48fc24316e34 /src/dotty/tools/dotc/typer/Typer.scala
parent03a2c6e74c07d08e79ee3323d3c1c38eb3d588ef (diff)
downloaddotty-5150cad821a9e7db821732eeb19019b96e1975a0.tar.gz
dotty-5150cad821a9e7db821732eeb19019b96e1975a0.tar.bz2
dotty-5150cad821a9e7db821732eeb19019b96e1975a0.zip
Prevent block types with references to local symbols
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 59aba4723..1e07cbf79 100644
--- a/src/dotty/tools/dotc/typer/Typer.scala
+++ b/src/dotty/tools/dotc/typer/Typer.scala
@@ -472,7 +472,7 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit
val Block(stats, expr) = block
val leaks = escapingRefs(block)
if (leaks.isEmpty) block
- else if (isFullyDefined(pt, ForceDegree.all)) {
+ else if (isFullyDefined(pt, ForceDegree.none)) {
val expr1 = Typed(expr, TypeTree(pt))
cpy.Block(block)(stats, expr1) withType expr1.tpe // no assignType here because avoid is redundant
} else if (!forcedDefined) {