File tree 2 files changed +4
-5
lines changed
compiler/src/dotty/tools/dotc
2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -2845,7 +2845,8 @@ class TypeComparer(@constructorOnly initctx: Context) extends ConstraintHandling
2845
2845
def isDecomposable (sym : Symbol ): Boolean =
2846
2846
sameKind && sym.is(Sealed ) && ! sym.hasAnonymousChild
2847
2847
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)
2849
2850
if (cls1.derivesFrom(cls2) || cls2.derivesFrom(cls1))
2850
2851
false
2851
2852
else
Original file line number Diff line number Diff line change @@ -963,8 +963,6 @@ object SpaceEngine {
963
963
}
964
964
965
965
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)
970
968
}
You can’t perform that action at this time.
0 commit comments