Björn Kautler created GROOVY-9440:
-------------------------------------

             Summary: 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: 3.0.0, 2.5.8
            Reporter: Björn Kautler


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.3.4#803005)

Reply via email to