[
https://issues.apache.org/jira/browse/GROOVY-10724?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Eric Milles updated GROOVY-10724:
---------------------------------
Language: groovy
> 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
> Priority: Major
>
> 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
(v8.20.10#820010)