[
https://issues.apache.org/jira/browse/GROOVY-12618?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18140668#comment-18140668
]
ASF GitHub Bot commented on GROOVY-12618:
-----------------------------------------
testlens-app[bot] commented on PR #3144:
URL: https://github.com/apache/groovy/pull/3144#issuecomment-6720200400
## 🚨 Jobs failed without executing tests 🚨
### Failed Jobs without Test Failures
❌ [Generate SNAPSHOT artifacts /
dist](https://github.com/apache/groovy/actions/runs/42470269124/job/128699162760?pr=3144)
❌ [Lint gate /
lint](https://github.com/apache/groovy/actions/runs/42470268922/job/128699162132?pr=3144)
❌ [Performance check /
test](https://github.com/apache/groovy/actions/runs/42470268880/job/128699161889?pr=3144)
❌ [jmh / test \(bench,
\\\\.bench\\\\.\)](https://github.com/apache/groovy/actions/runs/42470269018/job/128699162616?pr=3144)
❌ [jmh / test \(core-ag,
\\\\.perf\\\\.[A-G]\)](https://github.com/apache/groovy/actions/runs/42470269018/job/128699162632?pr=3144)
❌ [jmh / test \(grails-ad,
\\\\.perf\\\\.grails\\\\.[A-D]\)](https://github.com/apache/groovy/actions/runs/42470269018/job/128699162681?pr=3144)
❌ [jmh-classic / test \(bench,
\\\\.bench\\\\.\)](https://github.com/apache/groovy/actions/runs/42470268882/job/128699162240?pr=3144)
❌ [jmh-classic / test \(core-ag,
\\\\.perf\\\\.[A-G]\)](https://github.com/apache/groovy/actions/runs/42470268882/job/128699162185?pr=3144)
❌ [jmh-classic / test \(grails-ad,
\\\\.perf\\\\.grails\\\\.[A-D]\)](https://github.com/apache/groovy/actions/runs/42470268882/job/128699161930?pr=3144)
❌ [jmh-classic / test \(grails-ez,
\\\\.perf\\\\.grails\\\\.[E-Z]\)](https://github.com/apache/groovy/actions/runs/42470268882/job/128699162209?pr=3144)
🏷️ Commit: 89c215e605f9d753bbf5990f1c2f47c9c7ba20e8
▶️ Tests: 0 executed
🟡 Checks: 12/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/)._
> A public static super trait method called from a closure in trait code
> ignores the closure's delegate
> -----------------------------------------------------------------------------------------------------
>
> Key: GROOVY-12618
> URL: https://issues.apache.org/jira/browse/GROOVY-12618
> Project: Groovy
> Issue Type: Bug
> Affects Versions: 5.0.8, 6.0.0
> Reporter: Scott Murphy Heiberg
> Priority: Major
>
> {code:groovy}
> trait T { static int size() { 1 } }
> trait U extends T {
> def m() { [5, 6].with { size() } }
> static sm() { [5, 6].with { size() } }
> }
> class C implements U {}
> assert new C().m() == 2
> assert C.sm() == 2
> {code}
> Actual: both calls return 1, in dynamic, @TypeChecked and @CompileStatic code.
> Expected: 2, as with the same code written with classes. Inside a with
> closure, the list delegate's size() comes before the owner's.
> The trait transformation rewrites an implicit-this call to a public static
> method inherited from a super trait into a direct call on the trait helper
> class, so the closure's delegate is never consulted. GROOVY-12611 changes
> this for private and static methods declared by the trait itself, but not for
> methods inherited from a super trait.
> Seen in 5.0.8 and 6.0.0.
> PR: https://github.com/apache/groovy/pull/3144
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)