File tree 1 file changed +4
-2
lines changed
compiler/src/dotty/tools/dotc/typer
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -438,7 +438,9 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer
438
438
val found =
439
439
if owner.is(Package ) then
440
440
owner.denot.asClass.membersNamed(name)
441
- .filterWithPredicate(d => ! d.symbol.is(Package ) && d.symbol.source == denot.symbol.source)
441
+ .filterWithPredicate(d => ! d.symbol.is(Package )
442
+ && denot.symbol.source.ne(util.NoSource )
443
+ && d.symbol.source == denot.symbol.source)
442
444
else
443
445
val scope = if owner.isClass then owner.info.decls else outer.scope
444
446
scope.denotsNamed(name)
@@ -479,7 +481,7 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer
479
481
result = checkNewOrShadowed(found, Definition ) // no need to go further out, we found highest prec entry
480
482
found match
481
483
case found : NamedType
482
- if curOwner.isClass && isInherited(found.denot) && ! ctx.compilationUnit.isJava =>
484
+ if curOwner.isClass && found.denot.exists && isInherited(found.denot) && ! ctx.compilationUnit.isJava =>
483
485
checkNoOuterDefs(found.denot, ctx, ctx)
484
486
case _ =>
485
487
else
You can’t perform that action at this time.
0 commit comments