We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5069c08 commit c1db1b0Copy full SHA for c1db1b0
compiler/src/dotty/tools/dotc/core/Types.scala
@@ -1086,8 +1086,16 @@ object Types {
1086
*/
1087
def atoms(implicit ctx: Context): Set[Type] = dealias match {
1088
case tp: SingletonType if tp.isStable =>
1089
- def normalize(tp: SingletonType): SingletonType = tp.underlying match {
1090
- case tp1: SingletonType => normalize(tp1)
+ def normalize(tp: Type): Type = tp match {
+ case tp: SingletonType =>
1091
+ tp.underlying.dealias match {
1092
+ case tp1: SingletonType => normalize(tp1)
1093
+ case _ =>
1094
+ tp match {
1095
+ case tp: TermRef => tp.derivedSelect(normalize(tp.prefix))
1096
+ case _ => tp
1097
+ }
1098
1099
case _ => tp
1100
}
1101
Set.empty + normalize(tp)
0 commit comments