You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Daniel Sun (Jira)" <ji...@apache.org> on 2020/03/27 22:54:00 UTC
[jira] [Updated] (GROOVY-9484) Closure on the next line should not
be treated as argument
[ https://issues.apache.org/jira/browse/GROOVY-9484?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Daniel Sun updated GROOVY-9484:
-------------------------------
Labels: breaking_change (was: )
> Closure on the next line should not be treated as argument
> ----------------------------------------------------------
>
> Key: GROOVY-9484
> URL: https://issues.apache.org/jira/browse/GROOVY-9484
> Project: Groovy
> Issue Type: Bug
> Reporter: Daniel Sun
> Priority: Major
> Labels: breaking_change
>
> in groovy 2.5
> {code:java}
> modification | expected
> { Instant i, ZoneId z -> i.plusSeconds(1) } | defaultInstant.plusSeconds(1)
> {code}
> these were treated as separate expressions
> in groovy 3.0 the closure gets merged as argument to the expected above.
> {code:java}
> modification | this.expected({ Instant i, ZoneId z ->
> i.plusSeconds(1)
> }) | defaultInstant.plusSeconds(1)
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)