Community
Participate
Working Groups
I'm using Eclipse M2. With the code shown below, Qick fix generates a "newMethod" with return type "String", not "boolean" as I had expected. public class C { public static void x(String s, boolean b) {} public static void x(boolean b) {} public void y() { x(newMethod()); } } If you swap the "x" method implementations, it works as expected. If you use x(null, newMethod()); or x("damn", newMethod()); it works, but only if you don't swap the "x" implemenations. Otherwise, it will generate a "void" method.
It's the guessing algorithm in jdt.core that finds 'x()'. I think it's a minor bug and would agree to close if the fix is not trivial.
IMHO it's not a trivial bug if Quick Fix generates code which doesn't compile. In that case, it's becoming a Quick Bug command instead...
A perfect heuristic isn't trivial. Deferring as nice to have.
Reopen
Cannot be reproduced with 3.3. Fixed in a previous build.