aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/transform/PatternMatcher.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-09-29 12:10:23 +0200
committerDmitry Petrashko <dmitry.petrashko@gmail.com>2014-10-11 06:39:09 +0200
commit0a9c61c13b5ac6c686e73904ee3f95357a30c167 (patch)
tree9a50bd6696a0a6bbc5e75a9138bb977e43fa13ff /src/dotty/tools/dotc/transform/PatternMatcher.scala
parent2f6305977eff1c5010e780ce624d524ed4d01947 (diff)
downloaddotty-0a9c61c13b5ac6c686e73904ee3f95357a30c167.tar.gz
dotty-0a9c61c13b5ac6c686e73904ee3f95357a30c167.tar.bz2
dotty-0a9c61c13b5ac6c686e73904ee3f95357a30c167.zip
Fixed needs outer test
Diffstat (limited to 'src/dotty/tools/dotc/transform/PatternMatcher.scala')
-rw-r--r--src/dotty/tools/dotc/transform/PatternMatcher.scala5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/transform/PatternMatcher.scala b/src/dotty/tools/dotc/transform/PatternMatcher.scala
index a5eb808c4..934054acf 100644
--- a/src/dotty/tools/dotc/transform/PatternMatcher.scala
+++ b/src/dotty/tools/dotc/transform/PatternMatcher.scala
@@ -740,8 +740,9 @@ class PatternMatcher extends MiniPhaseTransform with DenotTransformer {thisTrans
// See the test for SI-7214 for motivation for dealias. Later `treeCondStrategy#outerTest`
// generates an outer test based on `patType.prefix` with automatically dealises.
patType.dealias match {
- case TypeRef(pre, name) =>
- (pre ne NoType)// && isPopulated(copyTypeRef(patType, pre1, sym, args), selType)
+ case tref @ TypeRef(pre, name) =>
+ (pre ne NoPrefix) && tref.symbol.isClass &&
+ ExplicitOuter.needsOuterIfReferenced(tref.symbol.asClass)
case _ =>
false
}