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

Lambda Spec: Grammar for lambda expressions is ambiguous

    Details

    • Subcomponent:
    • Verification:
      Verified

      Description

      Because a lambda expressions is treated as a Primary, it can (grammatically) appear as the left operand to some binary expression; or (as intended) the operator and the right operand could be considered part of the lambda body.

      () -> x + 1

      (() -> x) + 1
      vs.
      () -> (x + 1)

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: