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

9.9: Fix non-wildcard parameterization process to match javac

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 8
    • specification
    • None

      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.

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

              Created:
              Updated: