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

9.9: Fix non-wildcard parameterization process to match javac

    Details

    • Type: Bug
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 8
    • Fix Version/s: tbd_major
    • Component/s: specification
    • Labels:
      None

      Description

      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.

        Attachments

          Issue Links

            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: