File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
compiler/src/dotty/tools/dotc/typer Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -382,7 +382,8 @@ class Typer extends Namer
382
382
if ! curOwner.is(Package ) || isDefinedInCurrentUnit(defDenot) then
383
383
result = checkNewOrShadowed(found, Definition ) // no need to go further out, we found highest prec entry
384
384
found match
385
- case found : NamedType if curOwner.isClass && isInherited(found.denot) =>
385
+ case found : NamedType
386
+ if curOwner.isClass && isInherited(found.denot) && ! ctx.compilationUnit.isJava =>
386
387
checkNoOuterDefs(found.denot, ctx, ctx)
387
388
case _ =>
388
389
else
Original file line number Diff line number Diff line change
1
+ final class A {
2
+ public static final class C { }
3
+ public static final class D {
4
+ public static final class C { }
5
+ public C foo () { return new C (); }
6
+ }
7
+ }
You can’t perform that action at this time.
0 commit comments