OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [libjava/] [testsuite/] [libjava.lang/] [invoke_from_inner.java] - Blame information for rev 765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 765 jeremybenn
// 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]'.
4
 
5
abstract class A {
6
    abstract public void execute(C x);
7
}
8
 
9
class C {}
10
 
11
class Z extends A {
12
    public void execute (C x) {
13
        System.out.println ("Z.execute");
14
    }
15
}
16
 
17
public class invoke_from_inner extends A {
18
 
19
    Z f[] = new Z[1];
20
    class D extends C {
21
        D (C x) {
22
            f[0].execute (x);
23
            execute (x);
24
        }
25
    }
26
    public void execute (C x) {
27
      System.out.println ("invoke_from_inner.execute");
28
    }
29
 
30
    public static void main (String a[]) {
31
        new invoke_from_inner().foo();
32
    }
33
    void foo () {
34
        f[0] = new Z();
35
        new D(new C());
36
    }
37
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.