File tree 1 file changed +4
-4
lines changed
compiler/src/dotty/tools/dotc/core
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -2614,10 +2614,10 @@ class TypeComparer(@constructorOnly initctx: Context) extends ConstraintHandling
2614
2614
provablyDisjoint(tp1, gadtBounds(tp2.symbol).hi) || provablyDisjoint(tp1, tp2.superType)
2615
2615
case (tp1 : TermRef , tp2 : TermRef ) if isEnumValueOrModule(tp1) && isEnumValueOrModule(tp2) =>
2616
2616
tp1.termSymbol != tp2.termSymbol
2617
- case (tp1 : TermRef , _ ) if isEnumValue(tp1) =>
2618
- false
2619
- case (_ , tp2 : TermRef ) if isEnumValue(tp2) =>
2620
- false
2617
+ case (tp1 : TermRef , tp2 : TypeRef ) if isEnumValue(tp1) =>
2618
+ fullyInstantiated(tp2) && ! tp1.classSymbols.exists(_.derivesFrom(tp2.symbol))
2619
+ case (tp1 : TypeRef , tp2 : TermRef ) if isEnumValue(tp2) =>
2620
+ fullyInstantiated(tp1) && ! tp2.classSymbols.exists(_.derivesFrom(tp1.symbol))
2621
2621
case (tp1 : Type , tp2 : Type ) if defn.isTupleType(tp1) =>
2622
2622
provablyDisjoint(tp1.toNestedPairs, tp2)
2623
2623
case (tp1 : Type , tp2 : Type ) if defn.isTupleType(tp2) =>
You can’t perform that action at this time.
0 commit comments