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.
2 parents 2cdfcbb + ca1dbcc commit b0f7e26Copy full SHA for b0f7e26
compiler/src/dotty/tools/dotc/core/Symbols.scala
@@ -429,7 +429,7 @@ object Symbols {
429
430
/** The source or class file from which this class was generated, null if not applicable. */
431
override def associatedFile(using Context): AbstractFile =
432
- if (assocFile != null || this.owner.is(PackageClass) || this.isEffectiveRoot) assocFile
+ if assocFile != null || this.is(Package) || this.owner.is(Package) then assocFile
433
else super.associatedFile
434
435
private var mySource: SourceFile = NoSource
tests/neg/i9327.scala
@@ -0,0 +1,4 @@
1
+// fuzzball, gave SO in associatedFile
2
+package object Foo // error
3
+type Foo // error
4
+class Foo(a: Foo)
0 commit comments