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

Wrong line/column numbers for method and closure blocks

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.5.7
    • Fix Version/s: 2.6.0-alpha-1
    • Component/s: parser
    • Labels:
      None

      Description

      Under certain circumstances code blocks (BlockStatement) of MethodNode and ClosureExpression have just [-1,-1,-1,-1] for line and column numbers, while parent (MethodNode, ClosureExpression) is ok. Sometimes even some statements in the block have [-1,-1,-1,-1] coordinates.

      Sample - method x:

      class GroovyClass {
          def x() {
              String a
      
              
          }
      }
      

      In this situation MethodNode [2,5,6,6], code BlockStatement [-1,-1,-1,-1] , ReturnStatement [-1,-1,-1,-1]

        Attachments

          Activity

            People

            • Assignee:
              daniel_sun Daniel Sun
              Reporter:
              phejl Petr Hejl
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: