Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 2.0-rc-2
    • Fix Version/s: None
    • Component/s: parser
    • Labels:
      None

      Description

      It seems that annotating declarations breaks the line number of the AST node which is annotated, replacing it with the line number of the annotation itself.

      Test case:

      void testLineNumber() {
              assertScript '''//1
                  @ASTTest(phase=INSTRUCTION_SELECTION, value= { // 2
                      assert node.lineNumber == 5 // 3
                  }) // 4
                  int x = 1
              '''
          }
      

        Attachments

          Activity

            People

            • Assignee:
              daniel_sun Daniel Sun
              Reporter:
              melix C├ędric Champeau
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: