Details
-
Question
-
Status: Closed
-
Trivial
-
Resolution: Duplicate
-
4.0.0
-
None
-
None
Description
When converting the Grails project to groovy 4, we noticed a compile error for the following code:
def tags = null;
tags = tags?[tags]:[]
Adding a space after the question mark succeeds in groovy 4. Is this an expected compilation error or should no spaces be allowed?
Attachments
Issue Links
- is related to
-
GROOVY-9561 Some ternary expressions with []'s and 'as' are not parsed properly
- Open
-
GROOVY-10755 Ternary returning a list gets parsed improperly
- Open