Skip to content

Instantly share code, notes, and snippets.

@rogierslag
Created November 8, 2013 16:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rogierslag/7373320 to your computer and use it in GitHub Desktop.
Save rogierslag/7373320 to your computer and use it in GitHub Desktop.
MiniJava reference errors with resolving
module Reference
language MiniJava
start symbol Start
test backward variable parameter resolution [[
class Main {
public static void main(String[] args) {
System.out.println(1);
}
}
class Foobar {
public int nom(int [[x]]) {
[[x]] = 4;
return 4;
}
}
]] resolve #2 to #1
test backward variable parameter with statement resolution [[
class Main {
public static void main(String[] args) {
System.out.println(1);
}
}
class Foobar {
public int nom(int [[x]]) {
int number;
number = [[x]] + 1;
return number;
}
}
]] resolve #2 to #1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment