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

Parser accepts invalid List literal

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.7-beta-2
    • 1.6.5, 1.7-beta-2
    • parser
    • None
    • Mac OS 10.6.1
      Java 1.6.0_15

    Description

      class InvalidListLiteral {
        def x = [
          [foo: 1, bar: 2] // missing comma
          [foo: 1, bar: 2]
        ]
      }
      

      Compilation result:

      BUG! exception in phase 'class generation' in source unit 'ConsoleScript13' MapEntryExpression should not be visited here
      

      Attachments

        Activity

          People

            roshandawrani Roshan Dawrani
            pniederw Peter Niederwieser
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: