Community
Participate
Working Groups
The following testcase is running clean in javac, while type incompatibility error is reported in eclipse jdt X.java [ package test; import static test.Y.*; public class X { public void foo() { Y<String> generated = cons("a", () -> cons("b", Y::<String>empty)); } } ] Y.java [ package test; import java.util.function.Supplier; public abstract class Y<E> { public static <E> Y<E> empty() { return null;} public static <E> Y<E> cons(E head, Supplier<Y<E>> tailFun) {return null;} } ] Source : Bug 412650 (Testcase uploaded by Manoj)
This can be worked on only after the fix for https://bugs.eclipse.org/bugs/show_bug.cgi?id=412650 is released.
(In reply to comment #1) > This can be worked on only after the fix for > https://bugs.eclipse.org/bugs/show_bug.cgi?id=412650 is released. Thanks, and if it is indeed a problem requiring the new type inference, it needs a spec for the new type inference that is complete by any measure ...
Resolved in the feature branch of bug 400874 via http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?h=sherrmann/NewTypeInference&id=3aca47e5665504fbb162bd24e18ea6071e58fec4 See also bug 400874 comment 68 *** This bug has been marked as a duplicate of bug 400874 ***