aboutsummaryrefslogtreecommitdiff
path: root/libjava/testsuite
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2004-09-25 19:08:27 +0000
committerTom Tromey <tromey@gcc.gnu.org>2004-09-25 19:08:27 +0000
commit4b2582f0556dd99416042c355941ed08e75a975f (patch)
tree7fbbeae273f0a61dd67a39b765deb458e28d7aa4 /libjava/testsuite
parent27a92d683b4fcfa5b2446580b1aadaa50fe5840b (diff)
downloadgcc-4b2582f0556dd99416042c355941ed08e75a975f.zip
gcc-4b2582f0556dd99416042c355941ed08e75a975f.tar.gz
gcc-4b2582f0556dd99416042c355941ed08e75a975f.tar.bz2
re PR java/17500 (Anonymous inner class compile freakout)
PR java/17500: * testsuite/libjava.compile/pr17500.java: New file. From-SVN: r88107
Diffstat (limited to 'libjava/testsuite')
-rw-r--r--libjava/testsuite/libjava.compile/pr17500.java28
1 files changed, 28 insertions, 0 deletions
diff --git a/libjava/testsuite/libjava.compile/pr17500.java b/libjava/testsuite/libjava.compile/pr17500.java
new file mode 100644
index 0000000..825133d
--- /dev/null
+++ b/libjava/testsuite/libjava.compile/pr17500.java
@@ -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;
+ }
+ };
+ }
+}