Community
Participate
Working Groups
Take the following programme: ------------------------------ public class T1 { public static void main(String[] args) { T2.run(() -> {}); } } public class T2 { public static void run(InvisibleInterface i) { } private interface InvisibleInterface { void run(); } } ------------------------------ T1 should not compile, and indeed it doesn't with javac: ------------------------------ C:\Users\Lukas\workspace\jOOQ\jOOQ-test\src\main\resources>javac T1.java T2.java T1.java:45: error: InvisibleInterface has private access in T2 T2.run(() -> {}); ^ 1 error ------------------------------ Intuitively, this shouldn't compile as there is no way T1 can call T2.run() prior to Java 8
I'll take this one. Thanks Lukas.
Fixed here: http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?id=00c50168e209104a176698c4d6fcde84dee0e082 Thanks Lukas.
Resolving.
Thanks for the quick fix!
Srikanth, a 4.4.1 candidate perhaps?
Verified for 4.5 M1 using I20140804-2000 build
(In reply to Jayaprakash Arthanareeswaran from comment #5) > Srikanth, a 4.4.1 candidate perhaps? Srikanth, I suppose this is not serious enough to be back ported 4.4.1, isn't it?
(In reply to Jayaprakash Arthanareeswaran from comment #7) > (In reply to Jayaprakash Arthanareeswaran from comment #5) > > Srikanth, a 4.4.1 candidate perhaps? > > Srikanth, I suppose this is not serious enough to be back ported 4.4.1, > isn't it? Yes, this is not case of correct program failing. So we can skip for 4.4.1
> Srikanth, I suppose this is not serious enough to be back ported 4.4.1, isn't it? I'd agree. It's a rather minor issue. Few people will probably run into this, as few people reduce visibility from public on interfaces
The fix here causes bug 468122. It would be great if we had a JLS reference here, to determine how the fix must be changed. (I do have a guess, but I don't like to base compiler implementation on guess-work).