From 4b2582f0556dd99416042c355941ed08e75a975f Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Sat, 25 Sep 2004 19:08:27 +0000 Subject: re PR java/17500 (Anonymous inner class compile freakout) PR java/17500: * testsuite/libjava.compile/pr17500.java: New file. From-SVN: r88107 --- libjava/testsuite/libjava.compile/pr17500.java | 28 ++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 libjava/testsuite/libjava.compile/pr17500.java (limited to 'libjava/testsuite/libjava.compile') 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; + } + }; + } +} -- cgit v1.1