Skip to content

Commit

Permalink
Normalize in Type#atoms
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.

Co-Authored-By: Matt Bovel <matthieu@bovel.net>
  • Loading branch information
dwijnand and mbovel committed Jun 23, 2023
1 parent 823f17b commit d3a877f
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 d3a877f

Please sign in to comment.