Details
-
Bug
-
Resolution: Fixed
-
P4
-
None
Description
The more-specific method analysis fails to acknowledge that the function types of two functional interface types being compared may be generic.
Example:
interface Foo {
<T> ArrayList<T> m();
}
interface Bar {
<E> List<E> m();
}
Presumably all checks comparing the two function types should be subject to alpha-renaming (8.4.4); and an additional check should ensure that the type parameters are equivalent.
Similar changes are necessary in 18.5.4.
Example:
interface Foo {
<T> ArrayList<T> m();
}
interface Bar {
<E> List<E> m();
}
Presumably all checks comparing the two function types should be subject to alpha-renaming (8.4.4); and an additional check should ensure that the type parameters are equivalent.
Similar changes are necessary in 18.5.4.
Attachments
Issue Links
- relates to
-
JDK-8143852 Implement type variable renaming for functional interface most specific test
-
- Closed
-
-
JDK-8147496 15.12.2.5: Align check for unrelated functional interfaces with javac
-
- Closed
-
-
JDK-8146039 18.2.1: Don't allow out-of-scope type variables in inference bounds from method references
-
- Closed
-
-
JDK-8143576 15.12.2.5: Refine parameter equality constraint for functional most-specific test
-
- Closed
-