-
Bug
-
Resolution: Fixed
-
P4
-
5.0
-
rc
-
generic, x86
-
linux, solaris_8
-
Verified
A DESCRIPTION OF THE PROBLEM :
The syntax specification in section 18.1 is inconsistent with the fragements given in other sections of the JLS. An example is 'TypeArgument', which allows 'BasicType' to be used in the specification. However the same rule in section 4.5.1 uses 'ReferenceType', which is not even part of the syntax given in section 18.1. Also note that the definition given in 4.5.1 accepts a different language than the one given in 18.1.
I think it is unclear to use different grammars throughout the document. It makes it impossible to use section 18.1 as a reference while reading the rest of the document. For the 'ReferenceType' example, the reader has to skip to section 4.3 to find the syntax of 'ReferenceType'.
Section 18.1 also contains a typo in the rule for 'Expression': the optional 'AssignmentOperator Expression1' is closed twice.
REPRODUCIBILITY :
This bug can be reproduced always.
The syntax specification in section 18.1 is inconsistent with the fragements given in other sections of the JLS. An example is 'TypeArgument', which allows 'BasicType' to be used in the specification. However the same rule in section 4.5.1 uses 'ReferenceType', which is not even part of the syntax given in section 18.1. Also note that the definition given in 4.5.1 accepts a different language than the one given in 18.1.
I think it is unclear to use different grammars throughout the document. It makes it impossible to use section 18.1 as a reference while reading the rest of the document. For the 'ReferenceType' example, the reader has to skip to section 4.3 to find the syntax of 'ReferenceType'.
Section 18.1 also contains a typo in the rule for 'Expression': the optional 'AssignmentOperator Expression1' is closed twice.
REPRODUCIBILITY :
This bug can be reproduced always.
- duplicates
-
JDK-5014480 javac incorrectly accepts obsolescent array return type on annotation elements
-
- Closed
-
- relates to
-
JDK-6923696 Allow mixed array brackets for enhanced for loop's variable
-
- Closed
-
-
JDK-4750181 javac should use grammar from JLS sections 4, 6-10, 14, 15
-
- Closed
-
-
JDK-6998735 Variable arity parameter type involving arrays
-
- Closed
-
-
JDK-6505167 Annotations syntax error in JLS 9.7
-
- Closed
-