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

[1,2,] or ["a":1,] should be supported

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.0-beta-10
    • 1.0-JSR-1
    • parser
    • None
    • all

    Description

      //test.groovy
      1 = [1,2,]
      l.each

      {println it}

      // end of test.groovy

      When I run it, an exception is thrown "Could not use ']' at 1:10". If l = [1,2], it will ok.

      But I think, groovy should support [1,2,] for in Java, array

      {"a", "b", }

      is supported. So, I think groovy should support the similar syntax

      Attachments

        Activity

          People

            jez Jeremy Rayner
            wangbin wangbin
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: