test case & adapted grammar for annotated generic return type
public static <T> @Nullable T getNullableEnum() { return null; }
This commit is contained in:
@ -1488,7 +1488,7 @@ void MethodDeclaration(int modifiers) :
|
||||
{jjtThis.setModifiers(modifiers);}
|
||||
{
|
||||
[ TypeParameters() ]
|
||||
ResultType() MethodDeclarator() [ "throws" NameList() ]
|
||||
[(Annotation() {checkForBadTypeAnnotations();})+] ResultType() MethodDeclarator() [ "throws" NameList() ]
|
||||
( Block() | ";" )
|
||||
}
|
||||
|
||||
|
@ -180,6 +180,10 @@ public class ParserCornerCases18 {
|
||||
public static <T extends @NonNull Enum<T>> T getEnum() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static <T> @Nullable T getNullableEnum() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public Object[] createNonNullArray() {
|
||||
return new Object @NonNull[0];
|
||||
|
Reference in New Issue
Block a user