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 e29195d commit 30bd0a7Copy full SHA for 30bd0a7
compiler/src/dotty/tools/dotc/core/TypeOps.scala
@@ -314,11 +314,14 @@ trait TypeOps { this: Context => // TODO: Make standalone object.
314
case _ =>
315
tpe
316
}
317
- tpe.prefix match {
318
- case pre: ThisType if pre.cls is Package => tryInsert(pre.cls)
319
- case pre: TermRef if pre.symbol is Package => tryInsert(pre.symbol.moduleClass)
320
- case _ => tpe
321
- }
+ if (tpe.symbol.isRoot)
+ tpe
+ else
+ tpe.prefix match {
+ case pre: ThisType if pre.cls is Package => tryInsert(pre.cls)
322
+ case pre: TermRef if pre.symbol is Package => tryInsert(pre.symbol.moduleClass)
323
+ case _ => tpe
324
+ }
325
326
327
/** Normalize a list of parent types of class `cls` that may contain refinements
0 commit comments