Skip to content

Commit 74ab7a9

Browse files
committed
Tweak Type#atoms to normalize first
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.
1 parent 823f17b commit 74ab7a9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1373,7 +1373,7 @@ object Types {
13731373
Atoms.Range(set, set)
13741374
else Atoms.Unknown
13751375

1376-
dealias match
1376+
dealias.normalized match
13771377
case tp: SingletonType =>
13781378
tp.underlying.atoms match
13791379
case as @ Atoms.Range(lo, hi) =>

0 commit comments

Comments
 (0)