[ 
https://issues.apache.org/jira/browse/GROOVY-12611?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18140669#comment-18140669
 ] 

ASF GitHub Bot commented on GROOVY-12611:
-----------------------------------------

testlens-app[bot] commented on PR #3138:
URL: https://github.com/apache/groovy/pull/3138#issuecomment-6720205884

   ## 🚨 Jobs failed without executing tests 🚨
   
   ### Failed Jobs without Test Failures
   
   ❌ [Check licenses / test 
\(ubuntu-latest\)](https://github.com/apache/groovy/actions/runs/42470269392/job/128699163243?pr=3138)
   ❌ [Generate SNAPSHOT artifacts / 
dist](https://github.com/apache/groovy/actions/runs/42470269466/job/128699163618?pr=3138)
   ❌ [Generate SNAPSHOT distributions / 
dist](https://github.com/apache/groovy/actions/runs/42470269371/job/128699163307?pr=3138)
   ❌ [Lint gate / 
lint](https://github.com/apache/groovy/actions/runs/42470269390/job/128699163326?pr=3138)
   ❌ [Native Image Metadata Check / 
native-check](https://github.com/apache/groovy/actions/runs/42470269384/job/128699163340?pr=3138)
   ❌ [Performance check / 
test](https://github.com/apache/groovy/actions/runs/42470269469/job/128699163664?pr=3138)
   ❌ [jmh / test \(core-ag, 
\\\\.perf\\\\.[A-G]\)](https://github.com/apache/groovy/actions/runs/42470269449/job/128699163722?pr=3138)
   ❌ [jmh / test \(core-hz, 
\\\\.perf\\\\.[H-Z]\)](https://github.com/apache/groovy/actions/runs/42470269449/job/128699163910?pr=3138)
   ❌ [jmh / test \(grails-ad, 
\\\\.perf\\\\.grails\\\\.[A-D]\)](https://github.com/apache/groovy/actions/runs/42470269449/job/128699163874?pr=3138)
   ❌ [jmh / test \(grails-ez, 
\\\\.perf\\\\.grails\\\\.[E-Z]\)](https://github.com/apache/groovy/actions/runs/42470269449/job/128699163728?pr=3138)
   ❌ [jmh-classic / test \(core-ag, 
\\\\.perf\\\\.[A-G]\)](https://github.com/apache/groovy/actions/runs/42470269500/job/128699163864?pr=3138)
   ❌ [jmh-classic / test \(core-hz, 
\\\\.perf\\\\.[H-Z]\)](https://github.com/apache/groovy/actions/runs/42470269500/job/128699163861?pr=3138)
   ❌ [jmh-classic / test \(grails-ad, 
\\\\.perf\\\\.grails\\\\.[A-D]\)](https://github.com/apache/groovy/actions/runs/42470269500/job/128699163763?pr=3138)
   ❌ [jmh-classic / test \(grails-ez, 
\\\\.perf\\\\.grails\\\\.[E-Z]\)](https://github.com/apache/groovy/actions/runs/42470269500/job/128699163969?pr=3138)
   
   🏷️ Commit: 1435d6d21311afc381a13213dabc9ff1d35f3f32
   ▶️ Tests:  0 executed
   🟡 Checks: 16/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 private or static trait method called from a closure ignores the closure's 
> delegate
> -------------------------------------------------------------------------------------
>
>                 Key: GROOVY-12611
>                 URL: https://issues.apache.org/jira/browse/GROOVY-12611
>             Project: Groovy
>          Issue Type: Bug
>    Affects Versions: 4.0.33, 5.0.8, 6.0.0
>            Reporter: Scott Murphy Heiberg
>            Priority: Major
>
> {code:groovy}
> trait T {
>     private int size() { 1 }   // or: static int size() { 1 }
>     def m() { [5, 6].with { size() } }
> }
> class C implements T {}
> assert new C().m() == 2
> {code}
> Actual: 1, in dynamic, @TypeChecked and @CompileStatic code. The same happens 
> for a static trait method called from a static trait method.
> Expected: 2, as for the same code in a class. The delegate's method is used 
> when the resolve strategy tries the delegate first and the delegate has the 
> method. Otherwise the trait method is called. A public instance trait method 
> already behaves this way.
> Cause: TraitReceiverTransformer rewrites an implicit-this call to a private 
> or static trait method inside a closure into a direct call on the trait 
> helper class, so the closure's delegate is never consulted.
> Seen in 4.0.33, 5.0.8 and 6.0.0 (4.0.33 is right for public static methods).
> PR: https://github.com/apache/groovy/pull/3138



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to