compiler-design-eth/javali_tests/HW4_nop90/method invocation/OkCallByValue.javali

22 lines
211 B
Text
Raw Permalink Normal View History

2020-01-15 22:34:57 +01:00
// 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;
}