FSF GCC merge 02/23/03
[official-gcc.git] / libjava / testsuite / libjava.lang / invoke_from_inner.java
blob8659ac6d55927a42d28d598d108fa10d14522821
1 // This test case once showed that `f[0].execute(x)' woudln't be
2 // expanded properly, attempting to retrieve this$0 to be used in
3 // place of `f[0]'.
5 abstract class A {
6 abstract public void execute(C x);
9 class C {}
11 class Z extends A {
12 public void execute (C x) {
13 System.out.println ("Z.execute");
17 public class invoke_from_inner extends A {
19 Z f[] = new Z[1];
20 class D extends C {
21 D (C x) {
22 f[0].execute (x);
23 execute (x);
26 public void execute (C x) {
27 System.out.println ("invoke_from_inner.execute");
30 public static void main (String a[]) {
31 new invoke_from_inner().foo();
33 void foo () {
34 f[0] = new Z();
35 new D(new C());