-
Bug
-
Resolution: Fixed
-
P4
-
repo-valhalla
-
generic
-
generic
ATM, javac's treatment of 'primitive' modifier employs a completely parallel scheme - unlike the other restricted identifiers (JLS 3.8) and needs to be harmonized.
See the methods
com.sun.tools.javac.parser.JavacParser#recastToken
com.sun.tools.javac.parser.JavacParser#restrictedTypeName
com.sun.tools.javac.parser.JavacParser#restrictedTypeNameStartingAtSource
ATM, none of yield, sealed, var, record etc have an Token kind
in com.sun.tools.javac.parser.Tokens.TokenKind while primitive
does
We may also not be emitting the pertinent diagnostics from this set:
IllegalRefToRestrictedType
RestrictedTypeNotAllowed
RestrictedTypeNotAllowedArray
RestrictedTypeNotAllowedCompound
RestrictedTypeNotAllowedHere
RestrictedTypeNotAllowedPreview
etc.
Both the spec and the implementation wrt to other restricted identifiers must be studied and the implementation must be aligned.
See the methods
com.sun.tools.javac.parser.JavacParser#recastToken
com.sun.tools.javac.parser.JavacParser#restrictedTypeName
com.sun.tools.javac.parser.JavacParser#restrictedTypeNameStartingAtSource
ATM, none of yield, sealed, var, record etc have an Token kind
in com.sun.tools.javac.parser.Tokens.TokenKind while primitive
does
We may also not be emitting the pertinent diagnostics from this set:
IllegalRefToRestrictedType
RestrictedTypeNotAllowed
RestrictedTypeNotAllowedArray
RestrictedTypeNotAllowedCompound
RestrictedTypeNotAllowedHere
RestrictedTypeNotAllowedPreview
etc.
Both the spec and the implementation wrt to other restricted identifiers must be studied and the implementation must be aligned.