Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-8778

Cast short-hand breaks for empty map

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.0.0-alpha-3
    • 3.0.0-alpha-4
    • None

    Description

      We support:

      println Date[time:0]
      def map = [time:0]
      println Date[*:map]
      map = [:]
      println Date[*:map]
      

      but not:

      println Date[:]
      

      This is a breaking change since we currently support printing an empty map without brackets but would require them after this change:

      println [:]
      

      would need to be:

      println([:])
      

      But we require the brackets for lists (empty and non-empty) and non-empty maps already.

      Attachments

        Issue Links

          Activity

            People

              paulk Paul King
              paulk Paul King
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: