New and exciting error in the latest compiler

Maurizio Cimadamore maurizio.cimadamore at oracle.com
Tue Jan 29 08:13:56 PST 2013


On 07/01/13 08:53, Maurizio Cimadamore wrote:
> On 30/12/12 06:39, Sam Pullara wrote:
>> Here is the code:
>>
>> https://github.com/spullara/java-future-jdk8/blob/master/src/main/java/spullara/util/Currier.java
>> https://github.com/spullara/java-future-jdk8/blob/master/src/test/java/spullara/util/CurrierTest.java
>>
>> Gives an ambiguity when I think it should be straightforward to pick the right one based on arity of the method reference:
> This is on the list of things to do - note that is not as
> straightforward as one might think because of bound vs. unbound (i.e.
> different arities might be a match).
This is fixed now.

Maurizio
>
> Maurizio
>> error: reference to curry is ambiguous
>> both method <T#1,U#1,V>curry(C2<T#1,U#1,V>,U#1) in Currier and method <T#2,U#2>curry(C1<T#2,U#2>,U#2) in Currier match
>> where T#1,U#1,V,T#2,U#2 are type-variables:
>> T#1 extends Object declared in method <T#1,U#1,V>curry(C2<T#1,U#1,V>,U#1)
>> U#1 extends Object declared in method <T#1,U#1,V>curry(C2<T#1,U#1,V>,U#1)
>> V extends Object declared in method <T#1,U#1,V>curry(C2<T#1,U#1,V>,U#1)
>> T#2 extends Object declared in method <T#2,U#2>curry(C1<T#2,U#2>,U#2)
>> U#2 extends Object declared in method <T#2,U#2>curry(C1<T#2,U#2>,U#2)
>>
>> error: reference to curry is ambiguous
>> both method <T#1,U#1,V>curry(C2<T#1,U#1,V>,U#1) in Currier and method <T#2,U#2>curry(C1<T#2,U#2>,U#2) in Currier match
>> where T#1,U#1,V,T#2,U#2 are type-variables:
>> T#1 extends Object declared in method <T#1,U#1,V>curry(C2<T#1,U#1,V>,U#1)
>> U#1 extends Object declared in method <T#1,U#1,V>curry(C2<T#1,U#1,V>,U#1)
>> V extends Object declared in method <T#1,U#1,V>curry(C2<T#1,U#1,V>,U#1)
>> T#2 extends Object declared in method <T#2,U#2>curry(C1<T#2,U#2>,U#2)
>> U#2 extends Object declared in method <T#2,U#2>curry(C1<T#2,U#2>,U#2)
>>
>> And those error messages have to be fixed, they are brutal :)
>>
>> Sam
>>
>



More information about the lambda-dev mailing list