Community
Participate
Working Groups
BETA_JAVA8: The following program should fail to compile, but compiles successfully: // ---- interface I { void foo(X x); } public class X { void foo() { } public void main(String[] args) { I i = @Marker X::foo; } } The compiler silently acepts the undefined annotation Marker
Another example that shows type annotations in all possible places in a method/constructor reference: // ----------------- import java.util.List; interface I { void foo(List<String> l); } public class X { public void main(String[] args) { I i = @Readonly List<@English String>::<@NonNegative Integer>size; } } This program should trigger 3 errors, but only triggers two with eclipse.
Fix and tests released here: http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?h=BETA_JAVA8&id=667082d03e8bfe408693d885daad756a164263a3