[
https://issues.apache.org/jira/browse/GROOVY-12608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18140690#comment-18140690
]
ASF GitHub Bot commented on GROOVY-12608:
-----------------------------------------
testlens-app[bot] commented on PR #3135:
URL: https://github.com/apache/groovy/pull/3135#issuecomment-6720420880
## 🚨 All tests passed but jobs failed 🚨
### Failed Jobs without Test Failures
❌ [Build and test / lts \(21,
ubuntu-latest\)](https://github.com/apache/groovy/actions/runs/42471476009/job/128703014011?pr=3135)
❌ [Build and test for coverage /
test](https://github.com/apache/groovy/actions/runs/42471476006/job/128703013750?pr=3135)
❌ [Check licenses / test
\(ubuntu-latest\)](https://github.com/apache/groovy/actions/runs/42471476051/job/128703014014?pr=3135)
❌ [Generate SNAPSHOT artifacts /
dist](https://github.com/apache/groovy/actions/runs/42471475927/job/128703013408?pr=3135)
❌ [Generate SNAPSHOT distributions /
dist](https://github.com/apache/groovy/actions/runs/42471476057/job/128703013956?pr=3135)
❌ [Lint gate /
lint](https://github.com/apache/groovy/actions/runs/42471475922/job/128703013404?pr=3135)
❌ [Performance check /
test](https://github.com/apache/groovy/actions/runs/42471475972/job/128703013594?pr=3135)
❌ [jmh / test \(bench,
\\\\.bench\\\\.\)](https://github.com/apache/groovy/actions/runs/42471475919/job/128703013887?pr=3135)
❌ [jmh / test \(core-ag,
\\\\.perf\\\\.[A-G]\)](https://github.com/apache/groovy/actions/runs/42471475919/job/128703013619?pr=3135)
❌ [jmh / test \(grails-ad,
\\\\.perf\\\\.grails\\\\.[A-D]\)](https://github.com/apache/groovy/actions/runs/42471475919/job/128703013795?pr=3135)
❌ [jmh-classic / test \(bench,
\\\\.bench\\\\.\)](https://github.com/apache/groovy/actions/runs/42471476067/job/128703014128?pr=3135)
❌ [jmh-classic / test \(core-hz,
\\\\.perf\\\\.[H-Z]\)](https://github.com/apache/groovy/actions/runs/42471476067/job/128703014038?pr=3135)
❌ [jmh-classic / test \(grails-ad,
\\\\.perf\\\\.grails\\\\.[A-D]\)](https://github.com/apache/groovy/actions/runs/42471476067/job/128703013844?pr=3135)
❌ [jmh-classic / test \(grails-ez,
\\\\.perf\\\\.grails\\\\.[E-Z]\)](https://github.com/apache/groovy/actions/runs/42471476067/job/128703014000?pr=3135)
🏷️ Commit: ee173bf95dff695287be4f50e016afd692f0f71e
▶️ Tests: 3295 executed
🟡 Checks: 16/24 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/)._
> SC calls a super trait's static accessor, read as a property in a closure or
> lambda, with the trait instead of the implementing class
> -------------------------------------------------------------------------------------------------------------------------------------
>
> Key: GROOVY-12608
> URL: https://issues.apache.org/jira/browse/GROOVY-12608
> Project: Groovy
> Issue Type: Bug
> Affects Versions: 6.0.0
> Reporter: Scott Murphy Heiberg
> Priority: Major
>
> {code:groovy}
> @groovy.transform.CompileStatic
> trait T { private static int count = 1; static int getCnt() { count } }
> @groovy.transform.CompileStatic
> trait U extends T { String m() { def c = { -> cnt }; c() } }
> class C implements U {}
> assert new C().m() == '1'
> {code}
> Actual: MissingMethodException: No signature of static method: T__count$get
> for class: T is applicable for argument types: () values: []
> The same happens in a lambda, in a static trait method, and for a super
> trait's static property such as static int shared = 3. Writing such a
> property in a closure (cnt = n, cnt++, s = 'y') fails to compile under
> @TypeChecked and @CompileStatic: "Cannot set read-only property: cnt".
> Expected: the assertion passes, as it does in dynamic Groovy and with
> getCnt(). A delegate that has the property still comes first (p.with ... cnt).
> The static compiler calls the static method on the super trait interface,
> which passes the trait itself to the trait helper as the receiver class. The
> type checker looks for setters only on the receiver type, where a static
> interface method is not inherited.
> Seen on master with PR #3115 (GROOVY-12590) applied, which fixes the same
> call outside closures. 6.0.0 fails the same way.
> PR: https://github.com/apache/groovy/pull/3135
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)