test case & adapted grammar for annotated generic return type

public static <T> @Nullable T getNullableEnum() {
		return null;
	}
This commit is contained in:
snap252
2017-06-01 15:00:20 +02:00
parent b8d435235f
commit 2460402ea8
2 changed files with 5 additions and 1 deletions

View File

@ -1488,7 +1488,7 @@ void MethodDeclaration(int modifiers) :
{jjtThis.setModifiers(modifiers);}
{
[ TypeParameters() ]
ResultType() MethodDeclarator() [ "throws" NameList() ]
[(Annotation() {checkForBadTypeAnnotations();})+] ResultType() MethodDeclarator() [ "throws" NameList() ]
( Block() | ";" )
}

View File

@ -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];