[
https://issues.apache.org/jira/browse/GROOVY-9433?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Paul King updated GROOVY-9433:
------------------------------
Issue Type: Bug (was: Task)
> grammar ambiguity with ternary expression being confused with safe indexing
> ---------------------------------------------------------------------------
>
> Key: GROOVY-9433
> URL: https://issues.apache.org/jira/browse/GROOVY-9433
> Project: Groovy
> Issue Type: Bug
> Affects Versions: 3.0.1
> Reporter: Paul King
> Assignee: Daniel Sun
> Priority: Major
> Fix For: 4.0.0-alpha-1, 3.0.2
>
>
> The following works fine in 2.5.9 and 3.0.1:
> {code:java}
> false ? ['abc'] : ['def']
> {code}
> but the following onyl works in 2.5.9:
> {code:groovy}
> true ? ["abc"] as String[] : new String[0]
> {code}
> In 3.0.1 it gives:
> {noformat}
> groovy.lang.MissingPropertyException: No such property: abc for class:
> java.lang.Boolean
> {noformat}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)