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

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

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

Eric Milles (Jira)
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)