You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Eric Milles (Jira)" <ji...@apache.org> on 2019/11/18 16:31:00 UTC

[jira] [Updated] (GROOVY-9304) [Parrot] bitwise or followed by closure on next line parsed as command expression

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

Eric Milles updated GROOVY-9304:
--------------------------------
    Summary: [Parrot] bitwise or followed by closure on next line parsed as command expression  (was: Difference between parsing of closure in 2.5 and 3.0 )

> [Parrot] bitwise or followed by closure on next line parsed as command expression
> ---------------------------------------------------------------------------------
>
>                 Key: GROOVY-9304
>                 URL: https://issues.apache.org/jira/browse/GROOVY-9304
>             Project: Groovy
>          Issue Type: Bug
>          Components: Compiler
>    Affects Versions: 3.x
>            Reporter: Alexey Afanasiev
>            Priority: Major
>
> This code:
> {code:java}
> a | b
> {it -> true} (){code}
> will be parsed at 2.5.5 as two independent expressions:
> {code:java}
> a | b 
> { java.lang.Object it -> true}.call()
> {code}
> and will be parsed at 3.0.0-rc-1 as single expression:
> {code:java}
> a | this.b({ java.lang.Object it -> true }).call()
> {code}
> I believe this expression should be parsed same way in both versions.
> Spock depends on structure of ast for these kind of expressions. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)