[
https://issues.apache.org/jira/browse/GROOVY-12597?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18140687#comment-18140687
]
ASF GitHub Bot commented on GROOVY-12597:
-----------------------------------------
testlens-app[bot] commented on PR #3124:
URL: https://github.com/apache/groovy/pull/3124#issuecomment-6720381779
## 🚨 Jobs failed without executing tests 🚨
### Failed Jobs without Test Failures
❌ [Build and test / lts \(17,
ubuntu-latest\)](https://github.com/apache/groovy/actions/runs/42471407816/job/128702783005?pr=3124)
❌ [Build and test / lts \(21,
ubuntu-latest\)](https://github.com/apache/groovy/actions/runs/42471407816/job/128702783441?pr=3124)
❌ [Build and test / lts \(25,
ubuntu-latest\)](https://github.com/apache/groovy/actions/runs/42471407816/job/128702783353?pr=3124)
❌ [Check licenses / test
\(ubuntu-latest\)](https://github.com/apache/groovy/actions/runs/42471407800/job/128702783001?pr=3124)
❌ [Generate SNAPSHOT artifacts /
dist](https://github.com/apache/groovy/actions/runs/42471407768/job/128702782553?pr=3124)
❌ [Performance check /
test](https://github.com/apache/groovy/actions/runs/42471407788/job/128702782512?pr=3124)
❌ [jmh /
summary](https://github.com/apache/groovy/actions/runs/42471407812/job/128702868492?pr=3124)
❌ [jmh / test \(bench,
\\\\.bench\\\\.\)](https://github.com/apache/groovy/actions/runs/42471407812/job/128702782947?pr=3124)
❌ [jmh / test \(core-ag,
\\\\.perf\\\\.[A-G]\)](https://github.com/apache/groovy/actions/runs/42471407812/job/128702782830?pr=3124)
❌ [jmh / test \(core-hz,
\\\\.perf\\\\.[H-Z]\)](https://github.com/apache/groovy/actions/runs/42471407812/job/128702782998?pr=3124)
❌ [jmh / test \(grails-ad,
\\\\.perf\\\\.grails\\\\.[A-D]\)](https://github.com/apache/groovy/actions/runs/42471407812/job/128702782614?pr=3124)
❌ [jmh / test \(grails-ez,
\\\\.perf\\\\.grails\\\\.[E-Z]\)](https://github.com/apache/groovy/actions/runs/42471407812/job/128702782790?pr=3124)
❌ [jmh-classic / test \(bench,
\\\\.bench\\\\.\)](https://github.com/apache/groovy/actions/runs/42471407809/job/128702783127?pr=3124)
❌ [jmh-classic / test \(core-ag,
\\\\.perf\\\\.[A-G]\)](https://github.com/apache/groovy/actions/runs/42471407809/job/128702782960?pr=3124)
❌ [jmh-classic / test \(grails-ad,
\\\\.perf\\\\.grails\\\\.[A-D]\)](https://github.com/apache/groovy/actions/runs/42471407809/job/128702782989?pr=3124)
🏷️ Commit: 72d970387249c1c55d68b8fe3c4bb8db24f29d04
▶️ Tests: 0 executed
🟡 Checks: 18/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/)._
> Calling a stateful trait static method through the trait fails with
> MissingMethodException for the internal field accessor
> --------------------------------------------------------------------------------------------------------------------------
>
> Key: GROOVY-12597
> URL: https://issues.apache.org/jira/browse/GROOVY-12597
> Project: Groovy
> Issue Type: Bug
> Affects Versions: 6.0.0
> Reporter: Scott Murphy Heiberg
> Priority: Major
>
> {code:groovy}
> trait T {
> private static boolean flag = true
> static boolean isReady() { flag }
> }
> class C implements T {}
> assert C.isReady()
> assert T.isReady()
> {code}
> Actual: {{T.isReady()}} (and {{T.ready}}) throws
> {{groovy.lang.MissingMethodException: No signature of static method:
> T__flag$get for class: T is applicable for argument types: () values: []}}.
> The same happens in dynamic Groovy, with @TypeChecked and with
> @CompileStatic, and for static properties, setters, closures and private
> static helpers.
> Expected: trait static state belongs to each implementing class, so the trait
> itself has none. The call should fail with an error that says so, not with a
> missing internal accessor. Stateless static methods called through the trait
> keep working.
> Cause: the promoted interface static forwarder passes the trait class as the
> static self of the helper method. A static field access in the helper becomes
> a call to the generated accessor (here T__flag$get) on that class, and only
> implementing classes declare one.
> Seen in 6.0.0. 5.x does not promote trait statics onto the interface.
> PR: https://github.com/apache/groovy/pull/3124
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)