[ 
https://issues.apache.org/jira/browse/GROOVY-8778?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Paul King updated GROOVY-8778:
------------------------------
    Description: 
We support:
{code}
println Date[time:0]
def map = [time:0]
println Date[*:map]
map = [:]
println Date[*:map]
{code}
but not:
{code}
println Date[:]
{code}
This is a breaking change since we currently support printing an empty map 
without brackets but would require them after this change:
{code}
println [:]
{code}
would need to be:
{code}
println [:]
{code}
But we require the brackets for lists (empty and non-empty) and non-empty maps 
already.

  was:
We support:
{code}
println Date[time:0]
def map = [time:0]
println Date[*:map]
map = [:]
println Date[*:map]
{code}
but not:
{code}
println Date[:]
{code}


> Constructor short-hand breaks for empty map
> -------------------------------------------
>
>                 Key: GROOVY-8778
>                 URL: https://issues.apache.org/jira/browse/GROOVY-8778
>             Project: Groovy
>          Issue Type: Dependency upgrade
>            Reporter: Paul King
>            Assignee: Paul King
>            Priority: Major
>
> We support:
> {code}
> println Date[time:0]
> def map = [time:0]
> println Date[*:map]
> map = [:]
> println Date[*:map]
> {code}
> but not:
> {code}
> println Date[:]
> {code}
> This is a breaking change since we currently support printing an empty map 
> without brackets but would require them after this change:
> {code}
> println [:]
> {code}
> would need to be:
> {code}
> println [:]
> {code}
> But we require the brackets for lists (empty and non-empty) and non-empty 
> maps already.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to