Details
-
Bug
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
None
-
None
Description
Probably a regeression.
I have the following program
class Foo<T> { Foo(T[] x) {} } class Main { static final void test() { Byte[][] arg = null; Foo<Byte[]> res = new Foo<Byte[]>(arg) } }
Actual behavior
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: Main.groovy: 8: [Static type checking] - Cannot call Foo#<init>(java.lang.Byte[][]) with arguments [java.lang.Byte[][]] @ line 8, column 23. Foo<Byte[]> res = new Foo<Byte[]>(arg) ^ 1 error
Expected behavior
Compile successfully
Notes
Tested against master
adapted from the following program
class Main { static final void test() { byte[][] arg = null; byte[] res = new com.fasterxml.jackson.databind.util.ArrayIterator<byte[]>(arg).next(); } }