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

Intersection type cast for functional expressions does not follow spec EDR

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2
    • 8
    • 8, 8-repo-lambda
    • tools
    • b86
    • Verified

    Description

      Javac's interpretation of intersection type cast applied to a lambda/method reference does not follow the JLS. Javac checks that the intersection type is like the following:

      SAM & ZAM1 ... ZAMn

      The spec text mandates that:

      *) the whole intersection must be a SAM, call its descriptor D
      *) there must be a SAM in the intersection whose descriptor is the same as D - that is the primary target used for code generation

      Attachments

        Activity

          People

            mcimadamore Maurizio Cimadamore
            mcimadamore Maurizio Cimadamore
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: