Eric Milles created GROOVY-11846:
------------------------------------

             Summary: 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


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)

Reply via email to