-
Bug
-
Resolution: Fixed
-
P4
-
8
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)."
"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)."
- relates to
-
JDK-6558763 8.1.2: Disallow generic exception types by specifying generic inner classes
-
- Open
-