Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
uydwl
mjtest-tests
Commits
957e4d74
Verified
Commit
957e4d74
authored
Nov 15, 2018
by
ubduq
Browse files
Remove undefined behavior in array access test case
parent
b8ef4af2
Changes
1
Hide whitespace changes
Inline
Side-by-side
semantic/array_access_on_returned_value.java
View file @
957e4d74
...
...
@@ -2,11 +2,13 @@ class Main {
public
static
void
main
(
String
[]
arguments
)
{
Main
main
=
new
Main
();
main
.
getArray
()[
0
]
=
1
;
new
Main
().
getArray
()[
0
]
=
2
;
}
public
int
[]
getArray
()
{
return
new
int
[
0
];
int
[]
result
=
new
int
[
1
];
result
[
0
]
=
42
;
return
result
;
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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