[
https://issues.apache.org/jira/browse/GROOVY-12627?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18140672#comment-18140672
]
ASF GitHub Bot commented on GROOVY-12627:
-----------------------------------------
testlens-app[bot] commented on PR #3153:
URL: https://github.com/apache/groovy/pull/3153#issuecomment-6720234801
## 🚨 Jobs failed without executing tests 🚨
### Failed Jobs without Test Failures
❌ [Check licenses / test
\(ubuntu-latest\)](https://github.com/apache/groovy/actions/runs/42470465394/job/128699776485?pr=3153)
❌ [CodeQL / Analyze \(java,
21\)](https://github.com/apache/groovy/actions/runs/42470465587/job/128699777273?pr=3153)
❌ [Generate SNAPSHOT artifacts /
dist](https://github.com/apache/groovy/actions/runs/42470465468/job/128699776888?pr=3153)
❌ [Generate SNAPSHOT distributions /
dist](https://github.com/apache/groovy/actions/runs/42470465638/job/128699778069?pr=3153)
❌ [Lint gate /
lint](https://github.com/apache/groovy/actions/runs/42470465685/job/128699778482?pr=3153)
❌ [Native Image Metadata Check /
native-check](https://github.com/apache/groovy/actions/runs/42470465408/job/128699776495?pr=3153)
❌ [Performance check /
test](https://github.com/apache/groovy/actions/runs/42470465590/job/128699777642?pr=3153)
❌ [jmh / test \(core-ag,
\\\\.perf\\\\.[A-G]\)](https://github.com/apache/groovy/actions/runs/42470465579/job/128699777925?pr=3153)
❌ [jmh / test \(core-hz,
\\\\.perf\\\\.[H-Z]\)](https://github.com/apache/groovy/actions/runs/42470465579/job/128699777792?pr=3153)
❌ [jmh / test \(grails-ad,
\\\\.perf\\\\.grails\\\\.[A-D]\)](https://github.com/apache/groovy/actions/runs/42470465579/job/128699777902?pr=3153)
❌ [jmh / test \(grails-ez,
\\\\.perf\\\\.grails\\\\.[E-Z]\)](https://github.com/apache/groovy/actions/runs/42470465579/job/128699777654?pr=3153)
❌ [jmh-classic /
summary](https://github.com/apache/groovy/actions/runs/42470465440/job/128699896389?pr=3153)
❌ [jmh-classic / test \(bench,
\\\\.bench\\\\.\)](https://github.com/apache/groovy/actions/runs/42470465440/job/128699776825?pr=3153)
❌ [jmh-classic / test \(core-ag,
\\\\.perf\\\\.[A-G]\)](https://github.com/apache/groovy/actions/runs/42470465440/job/128699776962?pr=3153)
❌ [jmh-classic / test \(core-hz,
\\\\.perf\\\\.[H-Z]\)](https://github.com/apache/groovy/actions/runs/42470465440/job/128699776999?pr=3153)
❌ [jmh-classic / test \(grails-ad,
\\\\.perf\\\\.grails\\\\.[A-D]\)](https://github.com/apache/groovy/actions/runs/42470465440/job/128699777032?pr=3153)
❌ [jmh-classic / test \(grails-ez,
\\\\.perf\\\\.grails\\\\.[E-Z]\)](https://github.com/apache/groovy/actions/runs/42470465440/job/128699776933?pr=3153)
🏷️ Commit: 7be09d6e1e415e947ee7c6de84f15dfcac8dac6b
▶️ Tests: 0 executed
🟡 Checks: 19/26 completed
### Rerun Controls
Click the checkbox to trigger a rerun:
🔲 **Rerun jobs**
---
_Learn more about TestLens at
[testlens.app/docs](https://testlens.app/docs/features/pr-comment/)._
> Writing a property of the enclosing instance from a closure in an inner class
> throws MissingPropertyException unless the receiver is a plain this
> -------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: GROOVY-12627
> URL: https://issues.apache.org/jira/browse/GROOVY-12627
> Project: Groovy
> Issue Type: Bug
> Affects Versions: 6.0.0
> Reporter: Scott Murphy Heiberg
> Priority: Major
>
> {code:groovy}
> class Base {
> private String z = 'outer'
> class Sub extends Base {
> def m() { { -> Sub.this.z = 'w' }(); Base.this.z }
> }
> def t() { new Sub().m() }
> }
> assert new Base().t() == 'w'
> {code}
> Actual: groovy.lang.MissingPropertyException: No such property: z for class:
> Base$Sub
> Expected: 'w'. The write goes to the enclosing instance, as this.z = 'w' in
> the closure does, as Sub.this.z = 'w' outside the closure does, and as
> reading Sub.this.z in the closure does. Groovy 4.0.33, 5.0.8 and 5.1.3 return
> 'w'.
> The same happens for s.z = 'w' with def s = this (also under @TypeChecked),
> for compound assignment and ++, for nested closures and lambdas, for a
> non-subclass inner class (Inner.this.z = 'w'), and for a spread-dot read or
> write in a closure.
> A call site in a closure passes the closure class as the sender. The
> enclosing-instance fallback that GROOVY-11823 added to MetaClassImpl checks
> the nesting of that closure class rather than of the class that declares the
> closure, so it never applies there.
> Seen in 6.0.0 (regression); 4.0.33, 5.0.8 and 5.1.3 work.
> PR: https://github.com/apache/groovy/pull/3153
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)