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

ForStatement wrong line, column data

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.5.6
    • 1.5.7, 1.6-beta-2
    • parser
    • None

    Description

      Parsing the following script

      for(Object item in [1:1,2:2]) {}
      

      gives the following results:
      ForStatement: line = 1, column = 1, endLine = 1, endColumn = 33
      ---variable(Parameter): line = -1, column = -1, endLine = -1, endColumn = -1
      ---collectionExpression(MapExpression): line = 1, column = 20, endLine = 1, endColumn = 21
      ---loopBlock(BlockStatement): line = 1, column = 31, endLine = 1, endColumn = 33

      Similar problem occurs for

      for(Object item in [1,2]) {}
      

      Attachments

        Activity

          People

            blackdrag Jochen Theodorou
            phejl Petr Hejl
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: