File tree 1 file changed +3
-2
lines changed
compiler/src/dotty/tools/dotc/typer
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -150,13 +150,14 @@ class Namer { typer: Typer =>
150
150
if (preExisting.isDefinedInCurrentRun || preExisting.lastKnownDenotation.is(Package ))
151
151
&& (! preExisting.lastKnownDenotation.is(Private ) || preExisting.owner.is(Package ))
152
152
&& (! preExisting.lastKnownDenotation.isPackageObject
153
- || preExisting.associatedFile != ctx.source.file)
153
+ || preExisting.associatedFile != ctx.source.file && preExisting.associatedFile != null )
154
154
// isDefinedInCurrentRun does not work correctly for package objects, because
155
155
// package objects are updated to the new run earlier than normal classes, everytime
156
156
// some member of the enclosing package is accessed. Therefore, we use another
157
157
// test: conflict if package objects have the same name but come from different
158
158
// sources. See i9252.
159
- then conflict(preExisting)
159
+ then
160
+ conflict(preExisting)
160
161
161
162
def pkgObjs (pkg : Symbol ) =
162
163
pkg.denot.asInstanceOf [PackageClassDenotation ].packageObjs.map(_.symbol)
You can’t perform that action at this time.
0 commit comments