-
Bug
-
Resolution: Duplicate
-
Low
-
3.2.2
-
None
public class Foo { void readString(String name, Consumer<String> consumer) {} public static List<String> LIST = Foo.create(String::new, (instance, configuration) -> { configuration.readString(null, e -> System.out.print(e)); }); public static <T> List<T> create(Supplier<T> supplier, BiConsumer<T, Foo> configurator) { return null; } }
fails with
Foo.java:[31,49] incompatible types: cannot infer type-variable(s) T,I,T
[ERROR] (argument mismatch; I cannot be converted to java.util.function.Supplier<java.lang.String>)
and
Foo.java:[32,106] incompatible types: cannot infer type-variable(s) I,T
[ERROR] (argument mismatch; java.lang.Object is not a functional interface)