re PR java/17500 (Anonymous inner class compile freakout)
authorTom Tromey <tromey@redhat.com>
Sat, 25 Sep 2004 19:08:27 +0000 (19:08 +0000)
committerTom Tromey <tromey@gcc.gnu.org>
Sat, 25 Sep 2004 19:08:27 +0000 (19:08 +0000)
PR java/17500:
* testsuite/libjava.compile/pr17500.java: New file.

From-SVN: r88107

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

index 64ac4ce8a02c7465dcf4ad08e16c33d2b8dcb16a..af24b1d7ff1c9b9e2f35ab0fd0cbef9807ebf1d3 100644 (file)
@@ -1,3 +1,8 @@
+2004-09-25  Tom Tromey  <tromey@redhat.com>
+
+       PR java/17500:
+       * testsuite/libjava.compile/pr17500.java: New file.
+
 2004-09-25  Shashank Bapat  <shashankbapat@yahoo.com>
             Mark Wielaard  <mark@klomp.org>
 
diff --git a/libjava/testsuite/libjava.compile/pr17500.java b/libjava/testsuite/libjava.compile/pr17500.java
new file mode 100644 (file)
index 0000000..825133d
--- /dev/null
@@ -0,0 +1,28 @@
+// gcj had a problem compiling code where two anonymous classes had
+// captured constructor arguments of the same type but with different
+// names.
+
+public class pr17500
+{
+  public Object m1 (final Object one)
+  {
+    return new Comparable()
+      {
+       public int compareTo(Object other)
+       {
+         return one == other ? 0 : 1;
+       }
+      };
+  }
+
+  public Object m2 (final Object two)
+  {
+    return new Comparable()
+      {
+       public int compareTo(Object other)
+       {
+         return two == other ? 0 : 1;
+       }
+      };
+  }
+}