-
Bug
-
Resolution: Fixed
-
P2
-
None
-
Verified
A method reference with a compile-time declaration that is signature-polymorphic (MethodHandle.invoke or MethodHandle.invokeExact) gets special treatment in 15.12.3 when determining the parameter/return types of the invocation. The mapping from a method reference expression to a method invocation expression, for the purpose of deriving these types, is not spelled out.
Expected behavior:
- The types of the parameters are derived from the targeted function type's parameter types.
- The return type is 'void' if the targeted function type has a 'void' return, and Object otherwise.
Expected behavior:
- The types of the parameters are derived from the targeted function type's parameter types.
- The return type is 'void' if the targeted function type has a 'void' return, and Object otherwise.
- relates to
-
JDK-8028129 Type checking: signature polymorphic MethodHandle.invoke(Object[])
-
- Closed
-
-
JDK-8028739 javac generates incorrect descriptor for MethodHandle::invoke
-
- Closed
-