groovy-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul King (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (GROOVY-3898) Allow the specification of types when initializing multiple iteration variables in a "for" construct
Date Tue, 02 May 2017 02:04:15 GMT

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

Paul King closed GROOVY-3898.
-----------------------------

> Allow the specification of types when initializing multiple iteration variables in a
"for" construct
> ----------------------------------------------------------------------------------------------------
>
>                 Key: GROOVY-3898
>                 URL: https://issues.apache.org/jira/browse/GROOVY-3898
>             Project: Groovy
>          Issue Type: Improvement
>          Components: Compiler, parser, parser-antlr, syntax
>    Affects Versions: 1.6.5, 1.7-beta-2
>            Reporter: Ed Clark
>            Assignee: Daniel Sun
>            Priority: Minor
>             Fix For: 3.0
>
>
> def( int i, int j) = [0,0] works as a stand alone assignment, but it does not work in
the initialization portion of a for.  For example, while
> for( (i, j)=[0,0]; i<10; {i++; j++ }()){ ... }
> compiles
> for( def( int i, int j)=[0,0]; i<10; {i++; j++ }()){ ... }
> does not.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message