mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8189749: Devise strategy for making source level checks more uniform
Create a 'feature' enum which is responsible for handling source version checks and related diagnostic generation Reviewed-by: jjg, jlahoda
This commit is contained in:
parent
3a458b1aa1
commit
686d74f11e
84 changed files with 475 additions and 586 deletions
|
@ -21,6 +21,7 @@
|
|||
* questions.
|
||||
*/
|
||||
|
||||
import com.sun.tools.javac.code.Source.Feature;
|
||||
import com.sun.tools.javac.code.TypeTag;
|
||||
import com.sun.tools.javac.parser.JavacParser;
|
||||
import com.sun.tools.javac.parser.ParserFactory;
|
||||
|
@ -186,7 +187,7 @@ class TrialParser extends JavacParser {
|
|||
List<JCAnnotation> annosAfterParams = annotationsOpt(Tag.ANNOTATION);
|
||||
|
||||
if (annosAfterParams.nonEmpty()) {
|
||||
checkAnnotationsAfterTypeParams(annosAfterParams.head.pos);
|
||||
checkSourceLevel(annosAfterParams.head.pos, Feature.ANNOTATIONS_AFTER_TYPE_PARAMS);
|
||||
mods.annotations = mods.annotations.appendList(annosAfterParams);
|
||||
if (mods.pos == Position.NOPOS) {
|
||||
mods.pos = mods.annotations.head.pos;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue