diff options
Diffstat (limited to 'libjava')
-rw-r--r-- | libjava/ChangeLog | 5 | ||||
-rw-r--r-- | libjava/testsuite/libjava.compile/pr17500.java | 28 |
2 files changed, 33 insertions, 0 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 64ac4ce..af24b1d 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -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 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; + } + }; + } +} |