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

17 lines
No EOL
169 B
Text
Executable file

// call an method from a superclass
class Main {
void main() {
C2 c;
c = new C2();
c.aux();
}
}
class C1{
void aux(){
write(2);
}
}
class C2 extends C1 {}