Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
IPDSnelting
mjtest-tests
Commits
53b973c3
Commit
53b973c3
authored
Nov 15, 2018
by
Christian Schwarz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add test case for shadowing of System by class member
parent
eb4b5e8f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
semantic/system_shadowing.java
semantic/system_shadowing.java
+16
-0
No files found.
semantic/system_shadowing.java
0 → 100644
View file @
53b973c3
class
SystemShadowing
{
public
SystemShadowing
System
;
public
SystemShadowing
out
;
public
void
println
(
int
x
)
{
}
public
void
nonstatic
()
{
System
.
out
.
println
(
23
);
}
public
static
void
main
(
String
[]
args
)
{
SystemShadowing
x
=
new
SystemShadowing
();
x
.
nonstatic
();
/* expected to throw NullPointerException at runtime due to shadowing */
}
}
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