[
https://issues.apache.org/jira/browse/GROOVY-10724?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Daniel Sun resolved GROOVY-10724.
---------------------------------
Resolution: Fixed
> Parrot parser incorrectly treats an expression wrapped in parentheses as a
> cast
> -------------------------------------------------------------------------------
>
> Key: GROOVY-10724
> URL: https://issues.apache.org/jira/browse/GROOVY-10724
> Project: Groovy
> Issue Type: Bug
> Components: parser-antlr4
> Affects Versions: 3.0.12
> Reporter: Marcin Erdmann
> Assignee: Daniel Sun
> Priority: Major
> Fix For: 7.0.0-alpha-1
>
>
> Trying to compile this code:
> {code:java}
> def a = ""
> (a) in []
> {code}
> results in
> {code:java}
> /path/to/file/Foo.groovy: 10: unable to resolve class a
> @ line 21, column 9.
> (a) in []
> ^
> 1 error
> {code}
> Obviously the parentheses are not necessary and the problem goes away if you
> drop them but it would be good if that code was still allowed like it was in
> 2.5 or if at least the error wasn't so confusing.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)