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
28412841 case (tp1 : TypeRef , tp2 : TypeRef ) if tp1.symbol.isClass && tp2.symbol.isClass =>
28422842 val cls1 = tp1.classSymbol
28432843 val cls2 = tp2.classSymbol
2844+ val sameKind = tp1.hasSameKindAs(tp2)
28442845 def isDecomposable (sym : Symbol , tp : Type ): Boolean =
2845- tp.hasSimpleKind && sym.is(Sealed ) && ! sym.hasAnonymousChild
2846+ sameKind && sym.is(Sealed ) && ! sym.hasAnonymousChild
28462847 def decompose (sym : Symbol , tp : Type ): List [Type ] =
28472848 sym.children.map(x => refineUsingParent(tp, x)).filter(_.exists)
28482849 if (cls1.derivesFrom(cls2) || cls2.derivesFrom(cls1))
You can’t perform that action at this time.
0 commit comments