[
https://issues.apache.org/jira/browse/GROOVY-8689?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18149139#comment-18149139
]
Daniel Sun commented on GROOVY-8689:
------------------------------------
Fixed on master; added a regression test in
b90b1f7f989f40456bb0c853b1490828468fae9b
(https://github.com/apache/groovy/commit/b90b1f7f989f40456bb0c853b1490828468fae9b).
> New line between constructor call and {}
> ----------------------------------------
>
> Key: GROOVY-8689
> URL: https://issues.apache.org/jira/browse/GROOVY-8689
> Project: Groovy
> Issue Type: Bug
> Components: parser-antlr4
> Affects Versions: 3.0.0-alpha-3
> Reporter: Daniil Ovchinnikov
> Assignee: Daniel Sun
> Priority: Major
> Fix For: 7.0.0-alpha-1
>
>
> {code:groovy}
> new A()
> {}
> {code}
> is parsed as {{this.(new A())({})}} i.e. method call with constructor call as
> method expression.
> This results in invocation of whatever `#toString()` returns which doesn't
> make sense.
> In older version it was parsed as {{new A().call({})}}.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)