aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/dotty/tools/dotc/transform
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/src/dotty/tools/dotc/transform')
-rw-r--r--compiler/src/dotty/tools/dotc/transform/PatternMatcher.scala7
1 files changed, 4 insertions, 3 deletions
diff --git a/compiler/src/dotty/tools/dotc/transform/PatternMatcher.scala b/compiler/src/dotty/tools/dotc/transform/PatternMatcher.scala
index 8d25175f2..b0ae36612 100644
--- a/compiler/src/dotty/tools/dotc/transform/PatternMatcher.scala
+++ b/compiler/src/dotty/tools/dotc/transform/PatternMatcher.scala
@@ -852,9 +852,10 @@ class PatternMatcher extends MiniPhaseTransform with DenotTransformer {
// See the test for SI-7214 for motivation for dealias. Later `treeCondStrategy#outerTest`
// generates an outer test based on `patType.prefix` with automatically dealises.
expectedTp.dealias match {
- case tref @ TypeRef(pre, name) =>
- (pre ne NoPrefix) && tref.symbol.isClass &&
- ExplicitOuter.needsOuterIfReferenced(tref.symbol.asClass)
+ case tref @ TypeRef(pre: SingletonType, name) =>
+ val s = tref
+ s.symbol.isClass &&
+ ExplicitOuter.needsOuterIfReferenced(s.symbol.asClass)
case _ =>
false
}