Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
uydwl
mjtest-tests
Commits
957e4d74
Verified
Commit
957e4d74
authored
Nov 15, 2018
by
Maximilian Stemmer-Grabow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove undefined behavior in array access test case
parent
b8ef4af2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
semantic/array_access_on_returned_value.java
semantic/array_access_on_returned_value.java
+4
-2
No files found.
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
Markdown
is supported
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