[
https://issues.apache.org/jira/browse/GROOVY-11853?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18056452#comment-18056452
]
Eric Milles edited comment on GROOVY-11853 at 2/4/26 2:39 PM:
--------------------------------------------------------------
Examples of (1):
*
https://github.com/apache/groovy/blob/a7bebd3bcfbb4ab8379dc20de13be3bed68935ca/src/test/groovy/gls/innerClass/InnerClassTest.groovy#L916
*
https://github.com/apache/groovy/blob/a7bebd3bcfbb4ab8379dc20de13be3bed68935ca/src/test/groovy/gls/innerClass/InnerClassTest.groovy#L2442
was (Author: emilles):
Example of (1):
https://github.com/apache/groovy/blob/a7bebd3bcfbb4ab8379dc20de13be3bed68935ca/src/test/groovy/gls/innerClass/InnerClassTest.groovy#L916
> breaking changes for inner class methodMissing and propertyMissing protocol
> ---------------------------------------------------------------------------
>
> Key: GROOVY-11853
> URL: https://issues.apache.org/jira/browse/GROOVY-11853
> Project: Groovy
> Issue Type: Bug
> Components: groovy-runtime
> Affects Versions: 6.0.0-alpha-1
> Reporter: Eric Milles
> Assignee: Eric Milles
> Priority: Major
> Labels: breaking
>
> There were some scenarios that allowed access to an object's outer class
> members that no longer work under the GROOVY-11823 redesign.
> 1) access to outer class field through object expression:
> {code:groovy}
> class Outer {
> class Inner {
> }
> def p = "p"
> }
> def o = new Outer()
> def i = new Outer.Inner(o)
> println i.p
> {code}
> 2) outer class invokeMethod or other such MOP overloads:
> {code:groovy}
> String string = new Object() {
> @Override String toString() {
> // outer class is a Script and overrides getProperty, setProperty and
> invokeMethod
> dynamicVariable = "foo"
> }
> }
> println dynamicVariable
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)