[ 
https://issues.apache.org/jira/browse/GROOVY-9612?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17149094#comment-17149094
 ] 

Daniel Sun commented on GROOVY-9612:
------------------------------------

Groovy does not support such a syntax since 2.4. If we support it, more 
ambiguities will be introduced because parenthesis expressions can exist 
standalone.
{code:java}
println GroovySystem.version

println
(
    123
)
{code}
You can try the above code via [https://groovy-playground.appspot.com/]

> Should parse parenthesis and bracket after newline correctly
> ------------------------------------------------------------
>
>                 Key: GROOVY-9612
>                 URL: https://issues.apache.org/jira/browse/GROOVY-9612
>             Project: Groovy
>          Issue Type: Wish
>          Components: parser
>    Affects Versions: 3.0.4
>            Reporter: Laurent RICHARD de LAPRADE
>            Priority: Major
>
> For example, this should compile correctly. Current groovy parser forces 
> coding style format which is not the one we choose when we code Java. 
> {code:java}
> import java.io.*;
> import groovy.io.*;
> def dir = new File("C:\\");
> dir.eachFileRecurse
> (    
>     f
>     ->
>     println(f.name)
> );
> {code}
> groovy.lang.MissingPropertyException: No such property: eachFileRecurse for 
> class: java.io.File
>  



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

Reply via email to