File tree 1 file changed +5
-2
lines changed
src/dotty/tools/dotc/transform/patmat 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import ast.tpd
10
10
import core .Decorators ._
11
11
import core .TypeApplications ._
12
12
import core .Symbols ._
13
+ import core .StdNames ._
13
14
import core .NameOps ._
14
15
import core .Constants ._
15
16
@@ -401,7 +402,8 @@ class SpaceEngine(implicit ctx: Context) extends SpaceLogic {
401
402
case tp : ThisType => refine(tp.tref)
402
403
case tp : NamedType =>
403
404
val pre = refinePrefix(tp.prefix)
404
- if (pre.isEmpty) tp.name.show.stripSuffix(" $" )
405
+ if (tp.name == tpnme.hkApply) pre
406
+ else if (pre.isEmpty) tp.name.show.stripSuffix(" $" )
405
407
else pre + " ." + tp.name.show.stripSuffix(" $" )
406
408
case _ => tp.show.stripSuffix(" $" )
407
409
}
@@ -472,7 +474,8 @@ class SpaceEngine(implicit ctx: Context) extends SpaceLogic {
472
474
473
475
def checkExhaustivity (_match : Match ): Unit = {
474
476
val Match (sel, cases) = _match
475
- val selTyp = sel.tpe.widen.elimAnonymousClass
477
+ val selTyp = sel.tpe.widen.elimAnonymousClass.dealias
478
+
476
479
477
480
val patternSpace = cases.map(x => project(x.pat)).reduce((a, b) => Or (List (a, b)))
478
481
val uncovered = simplify(minus(Typ (selTyp, true ), patternSpace))
You can’t perform that action at this time.
0 commit comments