Skip to content

Commit

Permalink
Restore TermRef test when tp2 is fully instantiated
Browse files Browse the repository at this point in the history
  • Loading branch information
OlivierBlanvillain committed Jul 30, 2021
1 parent 7324080 commit d0f6397
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions compiler/src/dotty/tools/dotc/core/TypeComparer.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2614,10 +2614,10 @@ class TypeComparer(@constructorOnly initctx: Context) extends ConstraintHandling
provablyDisjoint(tp1, gadtBounds(tp2.symbol).hi) || provablyDisjoint(tp1, tp2.superType)
case (tp1: TermRef, tp2: TermRef) if isEnumValueOrModule(tp1) && isEnumValueOrModule(tp2) =>
tp1.termSymbol != tp2.termSymbol
case (tp1: TermRef, _) if isEnumValue(tp1) =>
false
case (_, tp2: TermRef) if isEnumValue(tp2) =>
false
case (tp1: TermRef, tp2: TypeRef) if isEnumValue(tp1) =>
fullyInstantiated(tp2) && !tp1.classSymbols.exists(_.derivesFrom(tp2.symbol))
case (tp1: TypeRef, tp2: TermRef) if isEnumValue(tp2) =>
fullyInstantiated(tp1) && !tp2.classSymbols.exists(_.derivesFrom(tp1.symbol))
case (tp1: Type, tp2: Type) if defn.isTupleType(tp1) =>
provablyDisjoint(tp1.toNestedPairs, tp2)
case (tp1: Type, tp2: Type) if defn.isTupleType(tp2) =>
Expand Down

0 comments on commit d0f6397

Please sign in to comment.