Community
Participate
Working Groups
The following code * compiles without a warning using javac 1.8.0_66 * gives compilation error under Eclipse Mars.1 (project compat set to 1.8) Type mismatch: cannot convert from List<Predicate<? extends Object>> to List<? extends Predicate<? super String>> ------------------------ import java.util.List; import java.util.function.Predicate; public class Inferrr { public List<? extends Predicate<? super String>> getStringAcceptingPredicates() { return java.util.Arrays.asList( eq("s"), eq(new Object()) ); } private <T> Predicate<T> eq(T compared) { return s -> compared.equals(s); } } ------------------------
It seems we are not correctly passing a target type into inference for the 2nd varargs argument.
Bulk move out of 4.8
Unable to reproduce in JDT 3.18.100.v20190916-1045 ; tried ecj 1.8, 12.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.