[
https://issues.apache.org/jira/browse/GROOVY-5510?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15995907#comment-15995907
]
Paul King commented on GROOVY-5510:
-----------------------------------
It would be nice to merge regularly with master (and merge or backport to
GROOVY_2_6_X). I'll try to give you a hand if I can. I'm wondering whether the
line number for assignment issue is worth an email to the dev list? I agree
that what is there now is workable. On the other hand if we wanted to improve
what information is stored, now might be the time to make such a change.
> Wrong line number for assignment
> --------------------------------
>
> Key: GROOVY-5510
> URL: https://issues.apache.org/jira/browse/GROOVY-5510
> Project: Groovy
> Issue Type: Sub-task
> Components: parser
> Affects Versions: 2.0-rc-2
> Reporter: Cédric Champeau
> Assignee: Daniel Sun
> Fix For: 3.x
>
>
> 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:
> {code}
> void testLineNumber() {
> assertScript '''//1
> @ASTTest(phase=INSTRUCTION_SELECTION, value= { // 2
> assert node.lineNumber == 5 // 3
> }) // 4
> int x = 1
> '''
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)