aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/transform/PatternMatcher.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2016-10-31 17:33:00 +0100
committerMartin Odersky <odersky@gmail.com>2016-10-31 17:33:00 +0100
commit1dea9916e686adc96df9d7886346af2ed1abe45f (patch)
treee97b68171788ead972962bd17a59fd560296098d /src/dotty/tools/dotc/transform/PatternMatcher.scala
parent01ae7ddfd4956660ed4897f5d2773587f845204c (diff)
downloaddotty-1dea9916e686adc96df9d7886346af2ed1abe45f.tar.gz
dotty-1dea9916e686adc96df9d7886346af2ed1abe45f.tar.bz2
dotty-1dea9916e686adc96df9d7886346af2ed1abe45f.zip
Fix #1637: Future defs are always OK
Drop special mode that handles future defs without which we get DenotationNotDefinedHere errors. In more than a year, this has only turned up false negatives. So I think it's better to drop the check, and the contortions needed to deal with it.
Diffstat (limited to 'src/dotty/tools/dotc/transform/PatternMatcher.scala')
-rw-r--r--src/dotty/tools/dotc/transform/PatternMatcher.scala3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/transform/PatternMatcher.scala b/src/dotty/tools/dotc/transform/PatternMatcher.scala
index 8636d5084..3e25cf82e 100644
--- a/src/dotty/tools/dotc/transform/PatternMatcher.scala
+++ b/src/dotty/tools/dotc/transform/PatternMatcher.scala
@@ -604,9 +604,8 @@ class PatternMatcher extends MiniPhaseTransform with DenotTransformer {
// all potentially stored subpat binders
val potentiallyStoredBinders = stored.unzip._1.toSet
// compute intersection of all symbols in the tree `in` and all potentially stored subpat binders
- def computeBinders(implicit ctx: Context) = new DeepFolder[Unit]((x: Unit, t:Tree) =>
+ new DeepFolder[Unit]((x: Unit, t: Tree) =>
if (potentiallyStoredBinders(t.symbol)) usedBinders += t.symbol).apply((), in)
- computeBinders(ctx.addMode(Mode.FutureDefsOK)) // trigged a NotDefinedHere on $outer when compiler dotc/printing
if (usedBinders.isEmpty) in
else {