File tree Expand file tree Collapse file tree 1 file changed +1
-1
lines changed
compiler/src/dotty/tools/dotc/typer Expand file tree Collapse file tree 1 file changed +1
-1
lines changed Original file line number Diff line number Diff line change @@ -149,7 +149,7 @@ class Namer { typer: Typer =>
149149 val preExisting = owner.unforcedDecls.lookup(name)
150150 if (preExisting.isDefinedInCurrentRun || preExisting.lastKnownDenotation.is(Package ))
151151 && (! preExisting.lastKnownDenotation.is(Private ) || preExisting.owner.is(Package ))
152- && (! preExisting.lastKnownDenotation.is(Package )
152+ && (! preExisting.lastKnownDenotation.is(Package ) && ! preExisting.lastKnownDenotation.isPackageObject
153153 || 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
You can’t perform that action at this time.
0 commit comments