compiler-design-eth/javali_tests/HW4_nop90/method invocation/OkCallByValue.javali
Carlos Galindo 72cc3206c4
Homework 4
2020-01-15 22:34:57 +01:00

22 lines
No EOL
211 B
Text
Executable file

// test that call-by-value is used
class Main {
void main() {
int x;
A a;
a = new A();
a.a = 50;
aux(a.a);
x = a.a;
write(x);
}
void aux (int arg){
arg = arg + 1;
}
}
class A {
int a;
}