-
Bug
-
Resolution: Unresolved
-
P4
-
None
9.9 claims that if a functional interface type has a wildcard where the corresponding type parameter bound mentions one of the class's type parameters, the function type is undefined.
javac does some unspecified extra work to try to satisfy the bound. This should not happen.
Example:
interface I<T, S extends X<T>> {
T foo(S p);
}
public class X<T> {
public void bar() {
I<Object, ? extends X<Object>> f = (p) -> p;
}
}
Reported by Stephan Hermann to lambda-spec-experts@openjdk.java.net.
javac does some unspecified extra work to try to satisfy the bound. This should not happen.
Example:
interface I<T, S extends X<T>> {
T foo(S p);
}
public class X<T> {
public void bar() {
I<Object, ? extends X<Object>> f = (p) -> p;
}
}
Reported by Stephan Hermann to lambda-spec-experts@openjdk.java.net.