Community
Participate
Working Groups
BETA_JAVA8: The following program should report an error, but presently doesn't: // --- interface I { void run(int x); } class X { void foo() { I r = (String y) -> {}; } }
Hint: Synthesize a method binding for the anonymous method, tag it as anonymous and use MethodVerifier.doesMethodOverride
See https://bugs.eclipse.org/bugs/show_bug.cgi?id=382701#c41
See also https://bugs.eclipse.org/bugs/show_bug.cgi?id=382701#c43 and https://bugs.eclipse.org/bugs/show_bug.cgi?id=382701#c44
Jesper, since you already have some code in place for this and you have the citation ready chapter and verse, this is yours :)
Most of the fix was already in place (https://bugs.eclipse.org/bugs/show_bug.cgi?id=382701#c47). Added tests and some tweaks and released via http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?h=BETA_JAVA8&id=e78b831ecdf23a867bd21d96aa870a039cfa4f4c