aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre Petit-Bianco <apbianco@redhat.com>2001-07-12 14:39:56 -0700
committerAlexandre Petit-Bianco <apbianco@gcc.gnu.org>2001-07-12 14:39:56 -0700
commitc813baa415260f431f2a5c67312338802cbe5671 (patch)
treeffb2ce94d42e9dd4253b89b0b19184952e28d15d
parent29fcdaaeadf0bad89f10e9c09411683c4c76b0e1 (diff)
downloadgcc-c813baa415260f431f2a5c67312338802cbe5671.zip
gcc-c813baa415260f431f2a5c67312338802cbe5671.tar.gz
gcc-c813baa415260f431f2a5c67312338802cbe5671.tar.bz2
anon_ctor_itf_arg.java: New file.
2001-07-12 Alexandre Petit-Bianco <apbianco@redhat.com> * libjava.compile/anon_ctor_itf_arg.java: New file. * libjava.compile/anon_ctor_itf_arg.out: New file. (http://gcc.gnu.org/ml/java-patches/2001-q3/msg00059.html) From-SVN: r43974
-rw-r--r--libjava/testsuite/ChangeLog5
-rw-r--r--libjava/testsuite/libjava.compile/anon_ctor_itf_arg.java38
-rw-r--r--libjava/testsuite/libjava.compile/anon_ctor_itf_arg.out1
3 files changed, 44 insertions, 0 deletions
diff --git a/libjava/testsuite/ChangeLog b/libjava/testsuite/ChangeLog
index d9117f8..3ca3d52 100644
--- a/libjava/testsuite/ChangeLog
+++ b/libjava/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2001-07-12 Alexandre Petit-Bianco <apbianco@redhat.com>
+
+ * libjava.compile/anon_ctor_itf_arg.java: New file.
+ * libjava.compile/anon_ctor_itf_arg.out: New file.
+
2001-07-12 Tom Tromey <tromey@redhat.com>
* libjava.lang/N19990310_4.xfail: Removed.
diff --git a/libjava/testsuite/libjava.compile/anon_ctor_itf_arg.java b/libjava/testsuite/libjava.compile/anon_ctor_itf_arg.java
new file mode 100644
index 0000000..1fd16f1
--- /dev/null
+++ b/libjava/testsuite/libjava.compile/anon_ctor_itf_arg.java
@@ -0,0 +1,38 @@
+/* From java/3285, By p.thio@valescom.com */
+
+interface I
+{
+ void print ();
+};
+
+class C1
+implements I
+{
+ public void print () { System.out.println ("C1: Message"); }
+}
+
+abstract
+class C2
+{
+ C2(I i)
+ {
+ i.print ();
+ }
+ abstract void h();
+}
+
+public
+class anon_ctor_itf_arg
+{
+ public static
+ void main(String argv[])
+ {
+ C1 c1 = new C1();
+ new C2(c1)
+ {
+ void h()
+ {
+ }
+ };
+ }
+}
diff --git a/libjava/testsuite/libjava.compile/anon_ctor_itf_arg.out b/libjava/testsuite/libjava.compile/anon_ctor_itf_arg.out
new file mode 100644
index 0000000..abddf8e
--- /dev/null
+++ b/libjava/testsuite/libjava.compile/anon_ctor_itf_arg.out
@@ -0,0 +1 @@
+C1: Message