File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
src/dotty/tools/dotc/core Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -868,7 +868,7 @@ object SymDenotations {
868
868
*/
869
869
final def topLevelClass (implicit ctx : Context ): Symbol = {
870
870
def topLevel (d : SymDenotation ): Symbol = {
871
- if ((d is PackageClass ) || (d.owner is PackageClass )) d.symbol
871
+ if (d.isEffectiveRoot || (d is PackageClass ) || (d.owner is PackageClass )) d.symbol
872
872
else topLevel(d.owner)
873
873
}
874
874
val sym = topLevel(this )
Original file line number Diff line number Diff line change @@ -517,7 +517,7 @@ object Symbols {
517
517
518
518
/** The source or class file from which this class was generated, null if not applicable. */
519
519
override def associatedFile (implicit ctx : Context ): AbstractFile =
520
- if (assocFile != null || (this .owner is PackageClass )) assocFile
520
+ if (assocFile != null || (this .owner is PackageClass ) || this .isEffectiveRoot ) assocFile
521
521
else super .associatedFile
522
522
523
523
final def classDenot (implicit ctx : Context ): ClassDenotation =
You can’t perform that action at this time.
0 commit comments