parse.y (patch_new_array_init): Don't set length on array.

gcc/java:
	* parse.y (patch_new_array_init): Don't set length on array.
libjava:
	* testsuite/libjava.compile/rh174912.java: New file.

From-SVN: r108099
This commit is contained in:
Tom Tromey 2005-12-06 02:30:11 +00:00 committed by Tom Tromey
parent 409e35fadc
commit 45c76dbb43
4 changed files with 31 additions and 2 deletions

View file

@ -0,0 +1,17 @@
// Derived from Red Hat bugzilla 174912
// https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=174912
// The bug is that the anonymous class constructor here will end up
// with a bogus '[3C' in its signature.
public class rh174912 {
public rh174912(char[][] args) { }
public Object m() {
return new rh174912(new char[][] { "hi".toCharArray(),
"bob".toCharArray(),
"and joe".toCharArray() }) {
};
}
public static void main(String[] args) { }
}