Skip to content

Instantly share code, notes, and snippets.

@mickvangelderen
Created November 12, 2013 13:22
Show Gist options
  • Save mickvangelderen/7430721 to your computer and use it in GitHub Desktop.
Save mickvangelderen/7430721 to your computer and use it in GitHub Desktop.
Compiler Construction lab day 6 parameter fun
// 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