Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
IPDSnelting
mjtest-tests
Commits
7368d945
Commit
7368d945
authored
Nov 04, 2021
by
I-Al-Istannen
Committed by
Paul Brinkmeier
Nov 04, 2021
Browse files
Add test for multi dimensional arrays
parent
7f44cdbc
Pipeline
#174619
failed with stage
in 4 minutes and 42 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
syntax/MultiDimensionalArrays.mj
0 → 100644
View file @
7368d945
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];
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment