9.8 (non-wildcard parameterization) clarification
Anna Kozlova
anna.kozlova at jetbrains.com
Tue Feb 25 03:42:07 PST 2014
Given the class:
class Test {
interface I<R extends T, T> {
R m();
}
{
I<? extends String, String> lambda = () -> null;
}
}
It looks to me that the part "If Ai is a wildcard, and the corresponding
type parameter bound, Bi, mentions one of P1...Pn, then Ti is undefined and
there is no function type" should lead to error "cannot infer functional
interface descriptor" (P1 = R, B1 = T) - but javac accepts the code above.
Could this part be clarified somehow, please?
Thanks,
Anna
More information about the lambda-dev
mailing list