[
https://issues.apache.org/jira/browse/GROOVY-9440?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17772626#comment-17772626
]
Eric Milles commented on GROOVY-9440:
-------------------------------------
Line number available for Groovy 3.0.19 and Spock 2.2
> Missing line number information in stack trace
> ----------------------------------------------
>
> Key: GROOVY-9440
> URL: https://issues.apache.org/jira/browse/GROOVY-9440
> Project: Groovy
> Issue Type: Bug
> Affects Versions: 2.5.8, 3.0.0
> Reporter: Björn Kautler
> Assignee: Eric Milles
> Priority: Minor
>
> If you try to run these two features in a Spock spec:
> {code:java}
> def foo() {
> expect: true
> where: a << [b]
> }
> def bar() {
> expect: true
> where: a << b
> } {code}
> You will get a {{MissingPropertyException}} for both of them, which is
> perfectly fine.
> The problem is, that for {{foo}} there is a line number in the stack trace
> while for {{bar}} there is not.
> I checked the byte code, there it is also missing for the {{bar}} case.
> According to [~paulk] the line number information is present in the AST:
> {quote}BlockStatement (no info) -> ReturnStatement (no info) -> Variable
> (with line number info) // b
> BlockStatement (no info) -> ReturnStatement (no info) -> ListExp (correct
> info) -> Variable (correct info) // [b]
> {quote}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)