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

[jira] [Created] (GROOVY-9304) Difference between parsing of closure in 2.5 and 3.0

Alexey Afanasiev created GROOVY-9304:
----------------------------------------

             Summary: Difference between parsing of closure in 2.5 and 3.0 
                 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


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)