Eric Milles created GROOVY-11854:
------------------------------------
Summary: Enclosing method not set for AIC in script statements
Key: GROOVY-11854
URL: https://issues.apache.org/jira/browse/GROOVY-11854
Project: Groovy
Issue Type: Bug
Components: class generator
Affects Versions: 5.0.4
Reporter: Eric Milles
Assignee: Eric Milles
Consider the following:
{code:groovy}
def fun = { -> }
println fun.getClass().getEnclosingClass() // the script
println fun.getClass().getEnclosingMethod() // the run() method
{code}
{code:groovy}
def obj = new Object() {}
println obj.getClass().getEnclosingClass() // the script
println obj.getClass().getEnclosingMethod() // null
{code}
At the time the AIC is created, the script class and run method are not
available, so the metadata is incomplete.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)