compiler-design-eth/javali_tests/HW3_nop90/InheritanceTests/OverrideTests/OkCallOverriddenMethod.javali

16 lines
225 B
Text
Raw Permalink Normal View History

2020-01-15 22:32:25 +01:00
// Call method that has been overridden (both the new and old one)
class Other {
void method() {}
}
class Main extends Other {
void main() {
Other o;
method();
o = (Other) this;
o.method();
}
void method() {}
}