prims.cc (_Jv_NewMultiArrayUnchecked): New method.

* prims.cc (_Jv_NewMultiArrayUnchecked): New method.
	(_Jv_NewMultiArray): Use it.  Check each array dimension.
	(_Jv_NewMultiArray): Likewise.
	* java/lang/reflect/natMethod.cc (can_widen): Nothing promotes to
	`char'.
	* java/lang/reflect/natArray.cc (newInstance): Throw
	IllegalArgumentException if there are no dimensions.

From-SVN: r45951
This commit is contained in:
Tom Tromey 2001-10-02 13:44:32 +00:00 committed by Tom Tromey
parent 6cbd1b6f7e
commit 62a040818a
4 changed files with 34 additions and 9 deletions

View file

@ -100,8 +100,8 @@ can_widen (jclass from, jclass to)
// Boolean arguments may not be widened.
if (fromx == BOOLEAN && tox != BOOLEAN)
return false;
// Special-case short->char conversions.
if (fromx == SHORT && tox == CHAR)
// Nothing promotes to char.
if (tox == CHAR && fromx != CHAR)
return false;
return fromx <= tox;