File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
compiler/src/dotty/tools/dotc/typer Expand file tree Collapse file tree 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 =>
150150 if (preExisting.isDefinedInCurrentRun || preExisting.lastKnownDenotation.is(Package ))
151151 && (! preExisting.lastKnownDenotation.is(Private ) || preExisting.owner.is(Package ))
152152 && (! preExisting.lastKnownDenotation.isPackageObject
153- || preExisting.associatedFile != ctx.source.file)
153+ || preExisting.associatedFile != ctx.source.file && preExisting.associatedFile != null )
154154 // isDefinedInCurrentRun does not work correctly for package objects, because
155155 // package objects are updated to the new run earlier than normal classes, everytime
156156 // some member of the enclosing package is accessed. Therefore, we use another
157157 // test: conflict if package objects have the same name but come from different
158158 // sources. See i9252.
159- then conflict(preExisting)
159+ then
160+ conflict(preExisting)
160161
161162 def pkgObjs (pkg : Symbol ) =
162163 pkg.denot.asInstanceOf [PackageClassDenotation ].packageObjs.map(_.symbol)
You can’t perform that action at this time.
0 commit comments