You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Eric Milles (Jira)" <ji...@apache.org> on 2023/10/06 16:03:00 UTC
[jira] [Resolved] (GROOVY-9440) Missing line number information in stack trace
[ https://issues.apache.org/jira/browse/GROOVY-9440?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eric Milles resolved GROOVY-9440.
---------------------------------
Assignee: Eric Milles
Resolution: Fixed
> 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)