Skip to content

Commit 76ef630

Browse files
committed
Tweak kindness in provablyDisjoint again
1 parent b973cf9 commit 76ef630

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

compiler/src/dotty/tools/dotc/core/TypeComparer.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2845,7 +2845,8 @@ class TypeComparer(@constructorOnly initctx: Context) extends ConstraintHandling
28452845
def isDecomposable(sym: Symbol): Boolean =
28462846
sameKind && sym.is(Sealed) && !sym.hasAnonymousChild
28472847
def decompose(sym: Symbol, tp: Type): List[Type] =
2848-
sym.children.map(x => refineUsingParent(tp, x)).filter(_.exists)
2848+
val tpSimple = tp.applyIfParameterized(tp.typeParams.map(_ => WildcardType))
2849+
sym.children.map(x => refineUsingParent(tpSimple, x)).filter(_.exists)
28492850
if (cls1.derivesFrom(cls2) || cls2.derivesFrom(cls1))
28502851
false
28512852
else

compiler/src/dotty/tools/dotc/transform/patmat/Space.scala

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -963,8 +963,6 @@ object SpaceEngine {
963963
}
964964

965965
def checkMatch(m: Match)(using Context): Unit =
966-
if exhaustivityCheckable(m.selector) then
967-
checkExhaustivity(m)
968-
if reachabilityCheckable(m.selector) then
969-
checkReachability(m)
966+
if exhaustivityCheckable(m.selector) then checkExhaustivity(m)
967+
if reachabilityCheckable(m.selector) then checkReachability(m)
970968
}

0 commit comments

Comments
 (0)