compiler-design-eth/javali_tests/HW4_nop90/method invocation/OkCallByValue.javali
2020-01-15 22:38:07 +01:00

22 lines
No EOL
211 B
Text

// 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;
}