Skip to content

Commit c1b77f1

Browse files
authored
Merge pull request #3968 from dotty-staging/fix-#3963
Fix #3963: Fix isSubApproxHi
2 parents e011862 + 5343a28 commit c1b77f1

File tree

3 files changed

+1
-1
lines changed

3 files changed

+1
-1
lines changed

compiler/src/dotty/tools/dotc/core/TypeComparer.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -831,7 +831,7 @@ class TypeComparer(initctx: Context) extends DotClass with ConstraintHandling {
831831
} else isSubType(tp1, tp2, approx.addLow)
832832

833833
def isSubApproxHi(tp1: Type, tp2: Type): Boolean =
834-
(tp2 ne NothingType) && isSubType(tp1, tp2, approx.addHigh)
834+
tp1.eq(tp2) || tp2.ne(NothingType) && isSubType(tp1, tp2, approx.addHigh)
835835

836836
// begin recur
837837
if (tp2 eq NoType) false
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)