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

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

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

   ## 🚨 TestLens detected 1 failed test 🚨
   
   Here is what you can do:
   
   1) Inspect the test failures carefully.
   2) If you are convinced that some of the tests are flaky, you can mute them 
below.
   3) Finally, trigger a rerun by checking the rerun checkbox.
   
   ### Test Summary
   
   #### [Build and test / lts \(17, windows-latest, 
1\)](https://github.com/apache/groovy/actions/runs/30540518119/job/90864197250?pr=2751)
 > :test
   
   | Test | Runs | Flakiness |
   |---|---|--:|
   | ClassTagExtensionModuleTest | ❌ | 25% 🔴 |
   
   🏷️ Commit: afa9b70db1d40c436a3daf510a5a5cfb0c60f6b2
   ▶️ Tests:  0 executed
   🟡 Checks: 29/31 completed
   
   ### Muted Tests
   > [!NOTE]
   > Checks are currently running using the configuration below.
   
   Select tests to mute in this pull request:
   
   🔲 ClassTagExtensionModuleTest <!

> Fat-free twins for the fold/reduce DGM methods (inject, injectAll)
> ------------------------------------------------------------------
>
>                 Key: GROOVY-12216
>                 URL: https://issues.apache.org/jira/browse/GROOVY-12216
>             Project: Groovy
>          Issue Type: Sub-task
>            Reporter: Paul King
>            Assignee: Paul King
>            Priority: Major
>
> h3. Summary
> Sub-task of GROOVY-12205. Adds functional-interface twins for the fold/reduce 
> family. Grouped together because they share one design decision — the 
> {{BinaryOperator}} vs {{BiFunction}} choice and how it pairs with the 
> {{initialValue}} overloads — so the type conventions are settled once. 
> {{inject}} on {{Iterable}} already has both twins (from GROOVY-12054); this 
> completes the remaining receivers.
> ({{sum}} was originally grouped here but is split out — its twin collides 
> positionally with an existing {{Object initialValue}} overload; see the 
> separate {{sum}} item.)
> h3. Type convention
> * No-initial-value forms (2-arg reduce): {{BinaryOperator<T>}}.
> * Initial-value forms (3-arg reduce): {{BiFunction<? super U, ? super E, ? 
> extends U>}}, matching the existing {{inject(Iterable, U, BiFunction)}}.
> No collision risk: in both methods the reduce function sits in a distinct 
> trailing position after any explicit {{initialValue}} parameter, so it never 
> competes with the initial value for overload selection.
> h3. Methods
> ||Method||Closure overloads without a twin||Functional type||Receivers||
> |{{inject}}|8|{{BinaryOperator<T>}} (no init) / {{BiFunction<? super U, ? 
> super E, ? extends U>}} (init)|no-init: Object, {{E[]}}, Collection; 
> with-init: Object, Iterator, Map, {{E[]}}, Collection|
> |{{injectAll}}|5|{{BinaryOperator<T>}} (no init) / {{BiFunction}} 
> (init)|no-init: Iterable, Iterator; with-init: Iterable, Iterator, Map|
> Total: 13 new overloads.
> h3. Conventions (per GROOVY-12054)
> * PECS wildcards; {{@since 6.0.0}}; inline javadoc example via {{<pre 
> class="language-groovy groovyTestCase">}} cross-linking the {{Closure}} 
> counterpart with {{@link}}.
> * Plain single-SAM overloads only — not {{@Incubating}}.
> h3. Compatibility
> * *{{inject}} arity*: since {{BinaryOperator<T> extends BiFunction<T,T,T>}}, 
> the no-init ({{BinaryOperator}}, 2-arg) and with-init ({{BiFunction}}, 3-arg) 
> forms stay distinct by arity — no erasure clash, mirroring the existing 
> {{Iterable}} pair.
> * Existing closure/lambda call sites unaffected; method references and typed 
> functional values select the twin under {{@CompileStatic}} (GROOVY-12214). 
> Only check: an existing {{@CompileStatic}} call passing a literal {{null}} to 
> a currently-single-overload form would become ambiguous — grep-checkable, 
> resolved with a cast if found.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to