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

ASF GitHub Bot commented on GROOVY-8778:
----------------------------------------

GitHub user paulk-asert opened a pull request:

    https://github.com/apache/groovy/pull/792

    GROOVY-8778: Cast short-hand breaks for empty map

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/paulk-asert/groovy groovy8778

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/groovy/pull/792.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #792
    
----
commit 921fbda4568592691fcda60919a90f93caf39135
Author: Paul King <paulk@...>
Date:   2018-09-08T00:22:37Z

    GROOVY-8778: Cast short-hand breaks for empty map

----


> Cast short-hand breaks for empty map
> ------------------------------------
>
>                 Key: GROOVY-8778
>                 URL: https://issues.apache.org/jira/browse/GROOVY-8778
>             Project: Groovy
>          Issue Type: Bug
>    Affects Versions: 3.0.0-alpha-3
>            Reporter: Paul King
>            Assignee: Paul King
>            Priority: Major
>              Labels: breaking
>
> 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