Inference error
Sam Pullara
spullara at gmail.com
Wed Dec 12 10:05:14 PST 2012
The code itself might be a bad idea, just experimenting, but:
https://github.com/spullara/java-future-jdk8/commit/2fa4321a450ca56e3a0958214c7cdcd9bca1ad84
The third test fails to compile with this error:
java: no suitable method found for curry(map::put,java.lang.String)
method spullara.util.Currier.<T,U,V>curry(spullara.util.Currier.C2<T,U,V>,U) is not applicable
(Cannot instantiate inference variables U,V because of an inference loop)
method spullara.util.Currier.<T,U,V>curry(spullara.util.Currier.C2<T,U,V>,U,V) is not applicable
(cannot infer type-variable(s) T,U,V
(actual and formal argument lists differ in length))
method spullara.util.Currier.<T,U>curry(spullara.util.Currier.C1<T,U>,U) is not applicable
(cannot infer type-variable(s) T,U
(argument mismatch; invalid method reference; method put in interface java.util.Map<K,V> cannot be applied to given types
required: java.lang.String,java.lang.Integer
found: java.lang.String
reason: actual and formal argument lists differ in length))
Seems like this should work to me.
Sam
More information about the lambda-spec-experts
mailing list