diff options
author | Bryce McKinlay <bryce@albatross.co.nz> | 2001-01-08 02:13:32 +0000 |
---|---|---|
committer | Bryce McKinlay <bryce@gcc.gnu.org> | 2001-01-08 02:13:32 +0000 |
commit | 4fd297757d05e95e21ab9b39ba99d8592454e2e6 (patch) | |
tree | d1489ac00984102cdae86f89d2fed3e2a30dd491 /libjava/testsuite/libjava.compile | |
parent | 0c58da3ed06415bce7a2cc636b9c8343237c8736 (diff) | |
download | gcc-4fd297757d05e95e21ab9b39ba99d8592454e2e6.zip gcc-4fd297757d05e95e21ab9b39ba99d8592454e2e6.tar.gz gcc-4fd297757d05e95e21ab9b39ba99d8592454e2e6.tar.bz2 |
* libjava.compile/SuperConstr.java: New test case.
From-SVN: r38793
Diffstat (limited to 'libjava/testsuite/libjava.compile')
-rw-r--r-- | libjava/testsuite/libjava.compile/SuperConstr.java | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/libjava/testsuite/libjava.compile/SuperConstr.java b/libjava/testsuite/libjava.compile/SuperConstr.java new file mode 100644 index 0000000..eef5050 --- /dev/null +++ b/libjava/testsuite/libjava.compile/SuperConstr.java @@ -0,0 +1,20 @@ +// It is legal to reference "this" from an enclosing type, or an instance +// field from an enclosing type, in a super constructor call. + +public class SuperConstr +{ + SuperConstr (Object x, Outer y) {} +} + +class Outer +{ + Object x; + + class Sub extends SuperConstr + { + Sub() + { + super(x, Outer.this); + } + } +} |