OSDN Git Service

* libjava.compile/SuperConstr.java: New test case.
authorbryce <bryce@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 8 Jan 2001 02:13:32 +0000 (02:13 +0000)
committerbryce <bryce@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 8 Jan 2001 02:13:32 +0000 (02:13 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38793 138bc75d-0d04-0410-961f-82ee72b054a4

libjava/testsuite/ChangeLog
libjava/testsuite/libjava.compile/SuperConstr.java [new file with mode: 0644]

index 15c61dd..6f3ca8d 100644 (file)
@@ -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 (file)
index 0000000..eef5050
--- /dev/null
@@ -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);
+    }
+  }
+}