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

9.1.2: Prohibit references to interface type parameters in static methods

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 9
    • 8
    • specification

      Like 8.1.2, section 9.1.2 attempts to prohibit references to type parameters in static contexts:

      "It is a compile-time error to refer to a type parameter of an interface I anywhere in the declaration of a field or type member of I."

      However, it was not updated to account for static methods in JLS 8. It should say:

      "It is a compile-time error to refer to a type parameter of a generic interface I anywhere in the declaration of a static member of I (9.3, 9.4, 9.5)."

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

              Created:
              Updated:
              Resolved: