From 4fd297757d05e95e21ab9b39ba99d8592454e2e6 Mon Sep 17 00:00:00 2001 From: Bryce McKinlay Date: Mon, 8 Jan 2001 02:13:32 +0000 Subject: * libjava.compile/SuperConstr.java: New test case. From-SVN: r38793 --- libjava/testsuite/libjava.compile/SuperConstr.java | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 libjava/testsuite/libjava.compile/SuperConstr.java (limited to 'libjava/testsuite/libjava.compile/SuperConstr.java') 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); + } + } +} -- cgit v1.1