You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Mauro Ciancio (Jira)" <ji...@apache.org> on 2023/10/02 12:57:00 UTC

[jira] [Created] (GROOVY-11185) each after transpose with 2 arguments does not compile

Mauro Ciancio created GROOVY-11185:
--------------------------------------

             Summary: each after transpose with 2 arguments does not compile
                 Key: GROOVY-11185
                 URL: https://issues.apache.org/jira/browse/GROOVY-11185
             Project: Groovy
          Issue Type: Bug
    Affects Versions: 3.0.19
            Reporter: Mauro Ciancio


Hi there, this code compiled up until groovy 3.0.18, in 3.0.19 stopped compiling:
{code:java}
@groovy.transform.CompileStatic
class Prueba {    public static void main(String[] args) {
        [
            [1],
            ['a'],
        ].transpose().each { int a, String b ->
            println(a)
            println(b)
        }
    }
}
 {code}
 
{code:java}
becho@blacksmoke:~$ groovy Prueba.groovy 
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
/home/becho/Prueba.groovy: 9: Incorrect number of parameters. Expected 1 but found 2
 @ line 9, column 22.
           ].transpose().each { int a, String b ->
                        ^1 error
 {code}
 

Is this an expected behavior? Or something got broken along the way?

 

 

 



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