summaryrefslogtreecommitdiffstats
path: root/libjava/testsuite
diff options
context:
space:
mode:
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2004-09-25 19:08:27 +0000
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2004-09-25 19:08:27 +0000
commit55145cad3ae46885cf698058a79c03953a27b784 (patch)
tree7fbbeae273f0a61dd67a39b765deb458e28d7aa4 /libjava/testsuite
parentd1148ca6beb9cad1102b63b8d54e213c4c86f9ad (diff)
downloadppe42-gcc-55145cad3ae46885cf698058a79c03953a27b784.tar.gz
ppe42-gcc-55145cad3ae46885cf698058a79c03953a27b784.zip
PR java/17500:
* testsuite/libjava.compile/pr17500.java: New file. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@88107 138bc75d-0d04-0410-961f-82ee72b054a4
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 00000000000..825133dc1bd
--- /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;
+ }
+ };
+ }
+}
OpenPOWER on IntegriCloud