I hear voices ... and they tell me to like multi dimensional arrays
private static void testMultiDimArrayWithAnnotations() { // ever used a 2D-Array in java?? Object x = new Object @NonNull[2] @Nullable[1] @NonNull[3]; }
This commit is contained in:
@ -1921,7 +1921,7 @@ void AllocationExpression():
|
||||
(LOOKAHEAD(2)
|
||||
PrimitiveType() ArrayDimsAndInits()
|
||||
|
|
||||
ClassOrInterfaceType() ((Annotation() {checkForBadTypeAnnotations();})*) [ TypeArguments() ]
|
||||
ClassOrInterfaceType() [ TypeArguments() ]
|
||||
(
|
||||
ArrayDimsAndInits()
|
||||
|
|
||||
@ -1937,8 +1937,9 @@ void AllocationExpression():
|
||||
void ArrayDimsAndInits() :
|
||||
{}
|
||||
{
|
||||
|
||||
LOOKAHEAD(2)
|
||||
( LOOKAHEAD(2) "[" Expression() "]" )+ ( LOOKAHEAD(2) "[" "]" )*
|
||||
( LOOKAHEAD(2) ((Annotation() {checkForBadTypeAnnotations();})*) "[" Expression() "]" )+ ( LOOKAHEAD(2) "[" "]" )*
|
||||
|
|
||||
( "[" "]" )+ ArrayInitializer()
|
||||
}
|
||||
|
@ -184,6 +184,11 @@ public class ParserCornerCases18 {
|
||||
public Object createNonNullArray() {
|
||||
return new Object @NonNull[0];
|
||||
}
|
||||
|
||||
private static void testMultiDimArrayWithAnnotations() {
|
||||
// ever used a 2D-Array in java??
|
||||
Object x = new Object @NonNull[2] @Nullable[1] @NonNull[3];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user