Created
November 12, 2013 13:22
-
-
Save mickvangelderen/7430721 to your computer and use it in GitHub Desktop.
Compiler Construction lab day 6 parameter fun
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// succeeds | |
test reference to parameter with equally named field available [[ | |
class A { | |
int i; | |
int j; | |
public int m(int [[i]]) { | |
j = 0; | |
[[i]] = 0; | |
return 0; | |
} | |
} | |
]] resolve #2 to #1 | |
// fails | |
test reference to parameter with equally named field available [[ | |
class A { | |
int i; | |
// int j; | |
public int m(int [[i]]) { | |
// j = 0; | |
[[i]] = 0; | |
return 0; | |
} | |
} | |
]] resolve #2 to #1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment