diff options
author | Martin Odersky <odersky@gmail.com> | 2014-09-29 12:10:23 +0200 |
---|---|---|
committer | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2014-10-11 06:39:09 +0200 |
commit | 0a9c61c13b5ac6c686e73904ee3f95357a30c167 (patch) | |
tree | 9a50bd6696a0a6bbc5e75a9138bb977e43fa13ff /src/dotty/tools/dotc/transform/PatternMatcher.scala | |
parent | 2f6305977eff1c5010e780ce624d524ed4d01947 (diff) | |
download | dotty-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.scala | 5 |
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 } |