Skip to content

Parrot Parser: GroovyCastException for multi-dimensional array initializer #1241

@eric-milles

Description

@eric-milles

Consider the following:

int[][] array = new int[][]{ new int[]{1}, new int[]{2} }
assert array.length == 2
assert array[0][0] == 1
assert array[1][0] == 2
org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object '[I@17310943' with class '[I' to class 'int'
	at org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation.castToNumber(DefaultTypeTransformation.java:175)
	at org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation.intUnbox(DefaultTypeTransformation.java:81)
	at Script.run(Script.groovy:1)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions