Community
Participate
Working Groups
package t; public class Snippet { public interface I { public void i(String a); } public static class B<E> { public static <E> B<E> b(B<E> helper, I listener) { return null; } public static <E> B<E> b(B<E> helper) { return null; } } private B<Object> helper; public void test() { // Works I i = (String o) -> {throw new RuntimeException();}; helper = B.b(helper, i); // Fails helper = B.b(helper,(String o) -> {throw new RuntimeException();}); // Succeeds helper = (B<Object>) B.b(helper,(String o) -> {throw new RuntimeException();}); // Succeeds helper = B.b(helper); } }
Thanks, Tom, interesting case ... Tentatively scheduling for 4.4, time permitting.
I am running this and it compiles for me (with the JDK8 update): Eclipse SDK Version: 4.3.2 Build id: M20140221-1700 (c) Copyright Eclipse contributors and others 2000, 2014. All rights reserved. Visit http://www.eclipse.org/platform This product includes software developed by the Apache Software Foundation http://www.apache.org/
(In reply to Steve Northover from comment #2) > I am running this and it compiles for me (with the JDK8 update): Hi, again. So, we have switched sides? You're no longer reporting Junk but telling us we already fixed it? :) Thanks! @Tom, before I start the chase for a duplicate bug: I cannot even find any version where this is broken. What version JDT were you using?
hm - 1.0.0.v20140309-1413 - looks like my build fetched an old version from somewhere - updateing to 1.0.0.v20140317-1956 fixes the problem - sorry :-(
(In reply to Thomas Schindl from comment #4) > hm - 1.0.0.v20140309-1413 - looks like my build fetched an old version from > somewhere - updateing to 1.0.0.v20140317-1956 fixes the problem - sorry :-( Thanks for confirming. Mh, 1.0.0.v20140309-1413? What kind of version would that be? Version of a package? At that time we didn't have any packages with J8 support. Even if I use JDT as of that date I don't get an error. Ergo: not enough info to find which change fixed this bug => leaving status at WORKSFORME.
Verified for 4.4 M7 using I20140429-2000 build