-
Bug
-
Resolution: Unresolved
-
P4
-
8
-
None
The "non-wildcard parameterization" process, used to map types to their function types, explicitly gives up whenever it encounters an F-bound:
"If Ai is a wildcard, and the corresponding type parameter's bound, Bi, mentions one of P1...Pn, then Ti is undefined and there is no function type."
javac's behavior in this scenario has been, instead, to use the wildcard's bound, and hope it ends up being in-bounds -- a well-formedness check occurs at the end to see if the type is valid.
JLS should be updated to describe this behavior.
"If Ai is a wildcard, and the corresponding type parameter's bound, Bi, mentions one of P1...Pn, then Ti is undefined and there is no function type."
javac's behavior in this scenario has been, instead, to use the wildcard's bound, and hope it ends up being in-bounds -- a well-formedness check occurs at the end to see if the type is valid.
JLS should be updated to describe this behavior.
- blocks
-
JDK-8048547 JLS8 9.9: non-wildcard parameterization succeeds unexpectedly
- Open
- relates to
-
JDK-8043351 4.5: Capture to check well-formedness of a parameterized type may be undefined
- Open
-
JDK-8142876 Javac does not correctly implement wildcards removal from functional interfaces
- Closed