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

Implement specified test for related functional interface types

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b123
    • Verification:
      Not verified

      Description

      The final 8 specification of most-specific testing includes the following rules for when two functional interface types may be compared structurally.

      When there are no inference variables (15.12.2.5):
      "T is not a subtype of S"

      When there are inference variables (18.5.4):
      ---
      Si is a functional interface type and Ti is a parameterization of functional interface, I, and none of the following is true:
      - Si is a superinterface of I, or a parameterization of a superinterface of I.
      - Si is subinterface of I, or a parameterization of a subinterface of I.
      - Si is an intersection type and each element of the intersection is a superinterface of I, or a parameterization of a superinterface of I.
      - Si is an intersection type and some element of the intersection is a subinterface of I, or a parameterization of a subinterface of I.
      ---

      javac should be updated to conform to these rules. (Current behavior is to test whether either type has a supertype that is a parameterization of the other type's symbol.)

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved: