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

ForStatement wrong line, column data

    XMLWordPrintableJSON

    Details

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

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

              Dates

              • Created:
                Updated:
                Resolved: