Skip to content

Commit

Permalink
Normalize types in compareAtoms
Browse files Browse the repository at this point in the history
  • Loading branch information
mbovel committed Jun 21, 2023
1 parent b614d84 commit 1b52634
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions compiler/src/dotty/tools/dotc/core/TypeComparer.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1606,9 +1606,9 @@ class TypeComparer(@constructorOnly initctx: Context) extends ConstraintHandling
finally canCompareAtoms = true
result

tp2.atoms match
tp2.normalized.atoms match
case Atoms.Range(lo2, hi2) if canCompareAtoms && canCompare(hi2) =>
tp1.atoms match
tp1.normalized.atoms match
case Atoms.Range(lo1, hi1) =>
if hi1.subsetOf(lo2) || knownSingletons && hi2.size == 1 && hi1 == hi2 then
Some(verified(true))
Expand Down

0 comments on commit 1b52634

Please sign in to comment.