minimized code
public class Test {
private static class Foo {
Foo() {}
}
}
Compilation output
-- Error: Test.java:3:4 --------------------------------------------------------
3 | Foo() {}
| ^
| non-private constructor Foo in class Foo refers to private class Foo
| in its type signature (): Test.Foo
1 error found
expectation
The Java compiler is happy to accept this code, and this is minimized from a mixed Scala and Java project that I'm trying to migrate from Scala 2 where this Java code has never been a problem.