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

Wrong line/column numbers for method and closure blocks

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.5.7
    • 2.6.0-alpha-1
    • parser
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: