Commit 7368d945 authored by I-Al-Istannen's avatar I-Al-Istannen Committed by Paul Brinkmeier
Browse files

Add test for multi dimensional arrays

parent 7f44cdbc
Pipeline #174619 failed with stage
in 4 minutes and 42 seconds
class Foo {
public static void main(String[] args) {
/* An array with a size in the first brackets is valid */
int[][][][] array = new int[20][][][];
/* The expression is not checked for validity */
int[][][][] array = new int[a || b || c && d > true < null][][][];
/* This should parse as an array access and be valid */
int array = new int[20][4];
int array = (new int[20])[4];
/* Array dimension is not checked */
int array = new int[20][4][true][null];
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment