*[java]* Java 8 parsing problem with annotations for wildcards #414

This commit is contained in:
Git Guru
2017-05-29 18:20:12 +02:00
parent 872718a0dd
commit 68ab7048cb
2 changed files with 8 additions and 6 deletions

View File

@ -1593,9 +1593,7 @@ void TypeArguments():
void TypeArgument():
{}
{
(Annotation() {checkForBadTypeAnnotations();})* ReferenceType()
|
"?" [ WildcardBounds() ]
(Annotation() {checkForBadTypeAnnotations();})* (ReferenceType() | "?" [ WildcardBounds() ])
}
void WildcardBounds():

View File

@ -67,17 +67,17 @@ public class ParserCornerCases18 {
}
Runnable r1 = () -> { System.out.println(this); };
public Runnable toDoLater() {
return () -> {
System.out.println("later");
};
}
private String doPrivileged(PrivilegedAction<String> action) {
return action.run();
}
private void filterFiles(FileFilter[] filters) {
}
@ -165,6 +165,10 @@ public class ParserCornerCases18 {
}
}
public List<@AnnotatedUsage ?> testWildCardWithAnnotation() {
return null;
}
/**
* Explicit receiver Parameters
* see: http://blog.joda.org/2015/12/explicit-receiver-parameters.html