summaryrefslogtreecommitdiff
path: root/libjava/testsuite
diff options
context:
space:
mode:
authorbryce <bryce@138bc75d-0d04-0410-961f-82ee72b054a4>2001-01-08 02:13:32 +0000
committerbryce <bryce@138bc75d-0d04-0410-961f-82ee72b054a4>2001-01-08 02:13:32 +0000
commit751cb6fa8413854d208ba3f67d49d73edeb4c7a1 (patch)
treed1489ac00984102cdae86f89d2fed3e2a30dd491 /libjava/testsuite
parent9300ba12b995d04f31b502191a7d8bbfb89a289a (diff)
downloadgcc-751cb6fa8413854d208ba3f67d49d73edeb4c7a1.tar.gz
* libjava.compile/SuperConstr.java: New test case.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38793 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/testsuite')
-rw-r--r--libjava/testsuite/ChangeLog4
-rw-r--r--libjava/testsuite/libjava.compile/SuperConstr.java20
2 files changed, 24 insertions, 0 deletions
diff --git a/libjava/testsuite/ChangeLog b/libjava/testsuite/ChangeLog
index 15c61dd0263..6f3ca8d01a5 100644
--- a/libjava/testsuite/ChangeLog
+++ b/libjava/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2001-01-08 Bryce McKinlay <bryce@albatross.co.nz>
+
+ * libjava.compile/SuperConstr.java: New test case.
+
2000-12-18 Tom Tromey <tromey@redhat.com>
* libjava.mauve/mauve.exp (test_mauve): Don't look for exceptions
diff --git a/libjava/testsuite/libjava.compile/SuperConstr.java b/libjava/testsuite/libjava.compile/SuperConstr.java
new file mode 100644
index 00000000000..eef50508109
--- /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);
+ }
+ }
+}