We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c3ba4fe commit 9e25a62Copy full SHA for 9e25a62
src/dotty/tools/dotc/core/TypeComparer.scala
@@ -715,7 +715,9 @@ class TypeComparer(initctx: Context) extends DotClass {
715
716
/** Two types are the same if are mutual subtypes of each other */
717
def isSameType(tp1: Type, tp2: Type): Boolean =
718
- isSubType(tp1, tp2) && isSubType(tp2, tp1)
+ if (tp1 eq NoType) false
719
+ else if (tp1 eq tp2) true
720
+ else isSubType(tp1, tp2) && isSubType(tp2, tp1)
721
722
/** Same as `isSameType` but also can be applied to overloaded TermRefs, where
723
* two overloaded refs are the same if they have pairwise equal alternatives
0 commit comments