[
https://issues.apache.org/jira/browse/GROOVY-11846?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Eric Milles resolved GROOVY-11846.
----------------------------------
Fix Version/s: 6.0.0-alpha-1
Resolution: Fixed
https://github.com/apache/groovy/commit/8684a3506cf6f69536d167e7a79a2f4ae6e85b5e
> AIC within closure has incorrect enclosing method and outer class
> -----------------------------------------------------------------
>
> Key: GROOVY-11846
> URL: https://issues.apache.org/jira/browse/GROOVY-11846
> Project: Groovy
> Issue Type: Bug
> Components: class generator
> Reporter: Eric Milles
> Assignee: Eric Milles
> Priority: Major
> Fix For: 6.0.0-alpha-1
>
>
> Consider the following:
> {code:groovy}
> class C {
> def m() {
> return { ->
> new Object() {}
> }
> }
> }
> {code}
> The anon. inner class {{C$1}} says its outer class is {{C}} and enclosing
> method is {{m()}} at runtime. However the {{this$0}} field returns the
> closure with class {{C$_m_closure1}}.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)