Details
Description
Repro:
Compile and run the following:
class Test { String string URI[] uris public Test(String string, URI[] uris) { this.string = string this.uris = uris } public Test(String string, List uris) { this(string, uris.collect { new URI(it) } as URI[]) } public static void main(String[] args) { def test = new Test('hello', ["world"]) println test.string println test.strings } }
Observed Result:
$ groovyc Test.groovy $ groovy Test Caught: java.lang.VerifyError: (class: Test, method: <init> signature: (Ljava/lang/String;Ljava/util/List;)V) Expecting to find object/array on stack
Expected Result:
hello [world]