Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8028690

Lambda Spec: Clarify how parameter/return types are derived for MethodHandle::invoke

    Details

    • Subcomponent:
    • Verification:
      Verified

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                dlsmith Dan Smith
                Reporter:
                dlsmith Dan Smith
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: