File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
compiler/src/dotty/tools/dotc/core Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -2841,8 +2841,9 @@ class TypeComparer(@constructorOnly initctx: Context) extends ConstraintHandling
2841
2841
case (tp1 : TypeRef , tp2 : TypeRef ) if tp1.symbol.isClass && tp2.symbol.isClass =>
2842
2842
val cls1 = tp1.classSymbol
2843
2843
val cls2 = tp2.classSymbol
2844
+ val sameKind = tp1.hasSameKindAs(tp2)
2844
2845
def isDecomposable (sym : Symbol , tp : Type ): Boolean =
2845
- tp.hasSimpleKind && sym.is(Sealed ) && ! sym.hasAnonymousChild
2846
+ sameKind && sym.is(Sealed ) && ! sym.hasAnonymousChild
2846
2847
def decompose (sym : Symbol , tp : Type ): List [Type ] =
2847
2848
sym.children.map(x => refineUsingParent(tp, x)).filter(_.exists)
2848
2849
if (cls1.derivesFrom(cls2) || cls2.derivesFrom(cls1))
You can’t perform that action at this time.
0 commit comments