File tree Expand file tree Collapse file tree 3 files changed +10
-1
lines changed
src/compiler/scala/tools/nsc/typechecker
test/files/pos/i20006-java Expand file tree Collapse file tree 3 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -3539,7 +3539,7 @@ trait Typers extends Adaptations with Tags with TypersTracking with PatternTyper
35393539
35403540 // As packages are open, it doesn't make sense to check double definitions here. Furthermore,
35413541 // it is expensive if the package is large. Instead, such double definitions are checked in `Namers.enterInScope`
3542- if (! context.owner.isPackageClass)
3542+ if (! context.owner.isPackageClass && ! unit.isJava )
35433543 checkNoDoubleDefs(scope)
35443544
35453545 // Note that Java units don't have synthetics, but there's no point in making a special case (for performance or correctness),
Original file line number Diff line number Diff line change 1+ public class J {
2+ private String mo ;
3+ public String mo () { return this .mo ; }
4+ }
Original file line number Diff line number Diff line change 1+ //> using options -Ypickle-java
2+
3+ class T {
4+ new J ().mo();
5+ }
You can’t perform that action at this time.
0 commit comments