From 4b2582f0556dd99416042c355941ed08e75a975f Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Sat, 25 Sep 2004 19:08:27 +0000 Subject: [PATCH] re PR java/17500 (Anonymous inner class compile freakout) PR java/17500: * testsuite/libjava.compile/pr17500.java: New file. From-SVN: r88107 --- libjava/ChangeLog | 5 ++++ .../testsuite/libjava.compile/pr17500.java | 28 +++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 libjava/testsuite/libjava.compile/pr17500.java diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 64ac4ce8a02..af24b1d7ff1 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,8 @@ +2004-09-25 Tom Tromey + + PR java/17500: + * testsuite/libjava.compile/pr17500.java: New file. + 2004-09-25 Shashank Bapat Mark Wielaard 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; + } + }; + } +} -- 2.30.2