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

Parser accepts invalid List literal

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.7-beta-2
    • Fix Version/s: 1.6.5, 1.7-beta-2
    • Component/s: parser
    • Labels:
      None
    • Environment:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: