File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
compiler/src/dotty/tools/dotc/core Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -2609,6 +2609,10 @@ class TypeComparer(@constructorOnly initctx: Context) extends ConstraintHandling
2609
2609
provablyDisjoint(tp1, gadtBounds(tp2.symbol).hi) || provablyDisjoint(tp1, tp2.superType)
2610
2610
case (tp1 : TermRef , tp2 : TermRef ) if isEnumValueOrModule(tp1) && isEnumValueOrModule(tp2) =>
2611
2611
tp1.termSymbol != tp2.termSymbol
2612
+ case (tp1 : TermRef , tp2 : TypeRef ) if isEnumValue(tp1) && tp2.symbol.isClass =>
2613
+ ! isSubType(tp1, tp2)
2614
+ case (tp1 : TypeRef , tp2 : TermRef ) if isEnumValue(tp2) && tp1.symbol.isClass =>
2615
+ ! isSubType(tp2, tp1)
2612
2616
case (tp1 : TermRef , _) if isEnumValue(tp1) =>
2613
2617
false
2614
2618
case (_, tp2 : TermRef ) if isEnumValue(tp2) =>
You can’t perform that action at this time.
0 commit comments