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

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

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

   ## 🚨 Jobs failed without executing tests 🚨
   
   ### Failed Jobs without Test Failures
   
   ❌ [Check licenses / test 
\(ubuntu-latest\)](https://github.com/apache/groovy/actions/runs/42469074601/job/128695346177?pr=3189)
   ❌ [Generate SNAPSHOT artifacts / 
dist](https://github.com/apache/groovy/actions/runs/42469074545/job/128695345939?pr=3189)
   ❌ [Generate SNAPSHOT distributions / 
dist](https://github.com/apache/groovy/actions/runs/42469074606/job/128695346247?pr=3189)
   ❌ [Performance check / 
test](https://github.com/apache/groovy/actions/runs/42469074602/job/128695346179?pr=3189)
   ❌ [jmh / test \(bench, 
\\\\.bench\\\\.\)](https://github.com/apache/groovy/actions/runs/42469074573/job/128695346534?pr=3189)
   ❌ [jmh / test \(core-ag, 
\\\\.perf\\\\.[A-G]\)](https://github.com/apache/groovy/actions/runs/42469074573/job/128695346821?pr=3189)
   ❌ [jmh / test \(core-hz, 
\\\\.perf\\\\.[H-Z]\)](https://github.com/apache/groovy/actions/runs/42469074573/job/128695346690?pr=3189)
   ❌ [jmh / test \(grails-ez, 
\\\\.perf\\\\.grails\\\\.[E-Z]\)](https://github.com/apache/groovy/actions/runs/42469074573/job/128695346677?pr=3189)
   ❌ [jmh-classic / test \(core-ag, 
\\\\.perf\\\\.[A-G]\)](https://github.com/apache/groovy/actions/runs/42469074543/job/128695346090?pr=3189)
   ❌ [jmh-classic / test \(core-hz, 
\\\\.perf\\\\.[H-Z]\)](https://github.com/apache/groovy/actions/runs/42469074543/job/128695346223?pr=3189)
   ❌ [jmh-classic / test \(grails-ez, 
\\\\.perf\\\\.grails\\\\.[E-Z]\)](https://github.com/apache/groovy/actions/runs/42469074543/job/128695346131?pr=3189)
   
   🏷️ Commit: cff10eeb826ef4ad7efea80bf5b34056a067294b
   ▶️ Tests:  0 executed
   🟡 Checks: 13/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 the Closure method instead of the enclosing class method of the same 
> name from a lambda
> ------------------------------------------------------------------------------------------------
>
>                 Key: GROOVY-12668
>                 URL: https://issues.apache.org/jira/browse/GROOVY-12668
>             Project: Groovy
>          Issue Type: Bug
>    Affects Versions: 5.0.8, 5.1.3, 6.0.0
>            Reporter: Scott Murphy Heiberg
>            Priority: Major
>
> {code:groovy}
> import groovy.transform.CompileStatic
> import java.util.function.Supplier
> @CompileStatic
> class C {
>     String getDelegate() { 'Cd' }
>     String memoizeAtMost(int i) { 'C' + i }
>     def m() {
>         Supplier<Object> s = () -> getDelegate()
>         Supplier<Object> t = () -> memoizeAtMost(2)
>         [s.get(), t.get()]
>     }
> }
> println new C().m()
> {code}
> *Actual* (5.0.8, 6.0.0, master): {{[C@6d1310f6, 
> org.codehaus.groovy.runtime.memoize.Memoize$MemoizeFunction@3228d990]}}. The 
> calls go to the lambda object's {{Closure.getDelegate()}} and 
> {{Closure.memoizeAtMost(int)}}. With {{curry(1)}}, {{rcurry}} or {{ncurry}} 
> declared in the class, compilation fails with "Reference to method is 
> ambiguous ... Closure#curry".
> *Expected* (as in 4.0.33): {{[Cd, C2]}}. The enclosing class's methods are 
> called, static ones included.
> Since GROOVY-11386, the type checker looks up an implicit-this call in a 
> closure or lambda on {{Closure}} before the owner and the delegate. A lambda 
> in statically compiled code follows Java semantics, so the enclosing class 
> should come first. A lambda in dynamic or @TypeChecked code is a closure at 
> run time, where the closure's own methods do come first.
> Verified: 5.0.8, 6.0.0 and master affected; 4.0.33 not affected.



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

Reply via email to