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

Eric Milles commented on GROOVY-11509:
--------------------------------------

I think the safe indexing handling is at play.

> Ternary Operator Spacing Issue
> ------------------------------
>
>                 Key: GROOVY-11509
>                 URL: https://issues.apache.org/jira/browse/GROOVY-11509
>             Project: Groovy
>          Issue Type: Question
>          Components: parser-antlr4
>    Affects Versions: 4.0.0
>            Reporter: James Daugherty
>            Priority: Trivial
>
> When converting the Grails project to groovy 4, we noticed a compile error 
> for the following code:
> {code:java}
> def tags = null;
> tags = tags?[tags]:[] {code}
> Adding a space after the question mark succeeds in groovy 4.  Is this an 
> expected compilation error or should no spaces be allowed?



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to