Skip to content

Commit

Permalink
Tweak Type#atoms to normalize first
Browse files Browse the repository at this point in the history
TypeComparer's compareAtoms assumes it has an answer to subtyping if one
of the types has atoms and the other doesn't.  But an unreduced match
alias won't have atoms, so we shouldn't bail early.
  • Loading branch information
dwijnand committed Jun 23, 2023
1 parent 823f17b commit 74ab7a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/core/Types.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1373,7 +1373,7 @@ object Types {
Atoms.Range(set, set)
else Atoms.Unknown

dealias match
dealias.normalized match
case tp: SingletonType =>
tp.underlying.atoms match
case as @ Atoms.Range(lo, hi) =>
Expand Down

0 comments on commit 74ab7a9

Please sign in to comment.