compiler-design-eth/javali_tests/HW4_nop90/Array/OkInheritedArray.javali

19 lines
210 B
Text
Raw Permalink Normal View History

2020-01-15 22:34:57 +01:00
/* Test inherited Array */
class Main {
void main() {
C1 c1;
C2 c2;
c1 = new C1();
c2 = new C2();
c1.x = new int[3];
c2.x = new int[4];
}
}
class C1{
int[] x;
}
class C2 extends C1 {}