[ 
https://issues.apache.org/jira/browse/GROOVY-11073?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Paul King closed GROOVY-11073.
------------------------------

> Cannot infer type of parameterized method when dealing with arrays
> ------------------------------------------------------------------
>
>                 Key: GROOVY-11073
>                 URL: https://issues.apache.org/jira/browse/GROOVY-11073
>             Project: Groovy
>          Issue Type: Bug
>          Components: Static Type Checker
>            Reporter: Thodoris Sotiropoulos
>            Assignee: Eric Milles
>            Priority: Minor
>             Fix For: 5.0.0-alpha-1
>
>
> I have the following code
> {code}
> class Main {
>   static final void test() {
>     double[] x = 
> Tuple.tuple(org.codehaus.groovy.runtime.ArrayGroovyMethods.max((double[][]) 
> null, { -> 1 })).getV1();
>   }
> }
> {code}
> h3. Actual behavior
> {code}
> org.codehaus.groovy.control.MultipleCompilationErrorsException: startup 
> failed:
> Main.groovy: 3: [Static type checking] - Cannot assign value of type 
> (java.io.Serializable or java.lang.Cloneable) to variable of type double[]
>  @ line 3, column 18.
>        double[] x = 
> Tuple.tuple(org.codehaus.groovy.runtime.ArrayGroovyMethods.max((double[][]) 
> null, { -> 1 })).getV1();
>                     ^
> 1 error
> {code}
> h3. Expected behavior
> Compile successully
> Tested against master (commit: 73c0f12ab35427bc3e7fd76929b482df61e1b80d)



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to