Exceptions and lambda.

Maurizio Cimadamore maurizio.cimadamore at oracle.com
Wed Feb 6 02:32:58 PST 2013


On 06/02/13 09:28, Srikanth S Adayapalam wrote:
> import java.util.List;
> interface A { <T> T foo(List<T> p); }
> interface B { <S> S foo(List<S> p); }
> interface C extends A, B {}
>
> class Z {
>      A a              =    (p) -> { return null;};  // rejected
>      B d              =    (p) -> { return null;};  // rejected
>      C c              =    (p) -> { return null;};  // accepted
> }
This is a bug in the logic that merges descriptors from supertypes. Type 
parameters should be carried over.

Maurizio


More information about the lambda-spec-experts mailing list