anon_ctor_itf_arg.java: Moved to `libjava.lang.'
2001-07-12 Alexandre Petit-Bianco <apbianco@redhat.com> * libjava.compile/anon_ctor_itf_arg.java: Moved to `libjava.lang.' * libjava.compile/anon_ctor_itf_arg.out: Likewise * libjava.lang/invoke_from_inner.java: New file. * libjava.lang/invoke_from_inner.out: Likewise. (http://gcc.gnu.org/ml/java-patches/2001-q3/msg00061.html ) From-SVN: r43994
This commit is contained in:
parent
b6e3e1ff58
commit
e47c5acd7b
@ -1,3 +1,10 @@
|
||||
2001-07-12 Alexandre Petit-Bianco <apbianco@redhat.com>
|
||||
|
||||
* libjava.compile/anon_ctor_itf_arg.java: Moved to `libjava.lang.'
|
||||
* libjava.compile/anon_ctor_itf_arg.out: Likewise
|
||||
* libjava.lang/invoke_from_inner.java: New file.
|
||||
* libjava.lang/invoke_from_inner.out: Likewise.
|
||||
|
||||
2001-07-12 Alexandre Petit-Bianco <apbianco@redhat.com>
|
||||
|
||||
* libjava.compile/anon_ctor_itf_arg.java: New file.
|
||||
|
37
libjava/testsuite/libjava.lang/invoke_from_inner.java
Normal file
37
libjava/testsuite/libjava.lang/invoke_from_inner.java
Normal file
@ -0,0 +1,37 @@
|
||||
// This test case once showed that `f[0].execute(x)' woudln't be
|
||||
// expanded properly, attempting to retrieve this$0 to be used in
|
||||
// place of `f[0]'.
|
||||
|
||||
abstract class A {
|
||||
abstract public void execute(C x);
|
||||
}
|
||||
|
||||
class C {}
|
||||
|
||||
class Z extends A {
|
||||
public void execute (C x) {
|
||||
System.out.println ("Z.execute");
|
||||
}
|
||||
}
|
||||
|
||||
public class invoke_from_inner extends A {
|
||||
|
||||
Z f[] = new Z[1];
|
||||
class D extends C {
|
||||
D (C x) {
|
||||
f[0].execute (x);
|
||||
execute (x);
|
||||
}
|
||||
}
|
||||
public void execute (C x) {
|
||||
System.out.println ("invoke_from_inner.execute");
|
||||
}
|
||||
|
||||
public static void main (String a[]) {
|
||||
new invoke_from_inner().foo();
|
||||
}
|
||||
void foo () {
|
||||
f[0] = new Z();
|
||||
new D(new C());
|
||||
}
|
||||
}
|
2
libjava/testsuite/libjava.lang/invoke_from_inner.out
Normal file
2
libjava/testsuite/libjava.lang/invoke_from_inner.out
Normal file
@ -0,0 +1,2 @@
|
||||
Z.execute
|
||||
invoke_from_inner.execute
|
Loading…
x
Reference in New Issue
Block a user