[
https://issues.apache.org/jira/browse/GROOVY-12718?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18140665#comment-18140665
]
ASF GitHub Bot commented on GROOVY-12718:
-----------------------------------------
testlens-app[bot] commented on PR #3252:
URL: https://github.com/apache/groovy/pull/3252#issuecomment-6720130273
## 🚨 Jobs failed without executing tests 🚨
### Failed Jobs without Test Failures
❌ [Check licenses / test
\(ubuntu-latest\)](https://github.com/apache/groovy/actions/runs/42469658839/job/128697228574?pr=3252)
❌ [Generate SNAPSHOT distributions /
dist](https://github.com/apache/groovy/actions/runs/42469658875/job/128697228779?pr=3252)
❌ [Performance check /
test](https://github.com/apache/groovy/actions/runs/42469658846/job/128697228488?pr=3252)
❌ [jmh / test \(bench,
\\\\.bench\\\\.\)](https://github.com/apache/groovy/actions/runs/42469658849/job/128697228728?pr=3252)
❌ [jmh / test \(core-hz,
\\\\.perf\\\\.[H-Z]\)](https://github.com/apache/groovy/actions/runs/42469658849/job/128697228637?pr=3252)
❌ [jmh / test \(grails-ad,
\\\\.perf\\\\.grails\\\\.[A-D]\)](https://github.com/apache/groovy/actions/runs/42469658849/job/128697228684?pr=3252)
❌ [jmh / test \(grails-ez,
\\\\.perf\\\\.grails\\\\.[E-Z]\)](https://github.com/apache/groovy/actions/runs/42469658849/job/128697228648?pr=3252)
❌ [jmh-classic /
summary](https://github.com/apache/groovy/actions/runs/42469658964/job/128697343714?pr=3252)
❌ [jmh-classic / test \(bench,
\\\\.bench\\\\.\)](https://github.com/apache/groovy/actions/runs/42469658964/job/128697229046?pr=3252)
❌ [jmh-classic / test \(core-ag,
\\\\.perf\\\\.[A-G]\)](https://github.com/apache/groovy/actions/runs/42469658964/job/128697228976?pr=3252)
❌ [jmh-classic / test \(core-hz,
\\\\.perf\\\\.[H-Z]\)](https://github.com/apache/groovy/actions/runs/42469658964/job/128697229096?pr=3252)
❌ [jmh-classic / test \(grails-ad,
\\\\.perf\\\\.grails\\\\.[A-D]\)](https://github.com/apache/groovy/actions/runs/42469658964/job/128697229027?pr=3252)
❌ [jmh-classic / test \(grails-ez,
\\\\.perf\\\\.grails\\\\.[E-Z]\)](https://github.com/apache/groovy/actions/runs/42469658964/job/128697228871?pr=3252)
🏷️ Commit: ab140cfa0ab25d052d3cf478f884afc135d33d70
▶️ Tests: 0 executed
🟡 Checks: 15/25 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/)._
> super.f, super.@f and this.@f of a package-private field of a superclass of
> another class loader fail with IllegalAccessError in dynamic code
> ---------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: GROOVY-12718
> URL: https://issues.apache.org/jira/browse/GROOVY-12718
> Project: Groovy
> Issue Type: Bug
> Affects Versions: 4.0.32, 5.0.8, 6.0.0
> Reporter: Scott Murphy Heiberg
> Priority: Major
>
> {code:groovy}
> def shell = new GroovyShell()
> shell.evaluate '''package p
> class F { @groovy.transform.PackageScope String pf = 'pf' }
> true'''
> shell.evaluate '''package p
> class C extends F {
> def test() {
> assert pf == 'pf' // works
> assert this.pf == 'pf' // works
> super.pf // IllegalAccessError, as are super.@pf,
> this.@pf and writes through them
> }
> }
> new C().test()'''
> {code}
> *Actual:* {{IllegalAccessError: class p.C tried to access field p.F.pf}}.
> *Expected:* the value of the field, through the meta-class, as for {{pf}} and
> {{this.pf}}.
> Cause: {{F}} comes from an earlier parse, so it has the same package name as
> {{C}} but another class loader, which makes it another run-time package.
> {{AsmClassGenerator.visitPropertyExpression}} and
> {{visitAttributeExpression}} decide by the package name and write
> {{GETFIELD}} or {{PUTFIELD}}, in dynamic and {{@TypeChecked}} code too.
> Verified on 4.0.32, 5.0.8, 6.0.0 and master.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)