Community
Participate
Working Groups
+++ This bug was initially created as a clone of Bug #424296 +++ interface FIOther<T> { <M> FIOther<T> run (M x); } public class TestOther { FIOther<String> fi1 = new FIOther<String>() {public <M> FIOther<String> run(M x) {return null;}}; } Convert the error free code to lambda expression with quick fix. See the syntax error message : Illegal lambda expression: Method run of type FIOther<String> is generic TestOther.java /_pasted_code_/src line 6 Java Problem
In this case, the conversion should not be supported as it is not possible to have a generic lambda expression. Hence, the quick assist should be disabled.
Created attachment 238911 [details] Fix + Test Disabled the conversion to lambda if the method in anonymous class is generic. Attached patch is based on mmathew/BETA_JAVA8 branch.
Fixed with http://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/?id=bac2099d19119ac4da73f1e3d8bc76fc19fdb06c
Verified using Kepler SR2(RC4) + BETA_JAVA8 - RC1