[ https://issues.apache.org/jira/browse/GROOVY-11486?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17935791#comment-17935791 ]
ASF GitHub Bot commented on GROOVY-11486: ----------------------------------------- codecov-commenter commented on PR #2157: URL: https://github.com/apache/groovy/pull/2157#issuecomment-2727155703 ## [Codecov](https://app.codecov.io/gh/apache/groovy/pull/2157?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report Attention: Patch coverage is `76.92308%` with `3 lines` in your changes missing coverage. Please review. > Project coverage is 68.8489%. Comparing base [(`4baefde`)](https://app.codecov.io/gh/apache/groovy/commit/4baefde7aeea5157a250eeb8311e901b597d8cc9?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) to head [(`a907045`)](https://app.codecov.io/gh/apache/groovy/commit/a907045a252acb7ee795b8684ec9ca4f82ab2f3e?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache). | [Files with missing lines](https://app.codecov.io/gh/apache/groovy/pull/2157?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines | |---|---|---| | [.../codehaus/groovy/runtime/DefaultGroovyMethods.java](https://app.codecov.io/gh/apache/groovy/pull/2157?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fruntime%2FDefaultGroovyMethods.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3J1bnRpbWUvRGVmYXVsdEdyb292eU1ldGhvZHMuamF2YQ==) | 76.9231% | [3 Missing :warning: ](https://app.codecov.io/gh/apache/groovy/pull/2157?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | <details><summary>Additional details and impacted files</summary> [](https://app.codecov.io/gh/apache/groovy/pull/2157?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) ```diff @@ Coverage Diff @@ ## master #2157 +/- ## ================================================== + Coverage 68.8480% 68.8489% +0.0009% - Complexity 29484 29487 +3 ================================================== Files 1421 1421 Lines 113264 113264 Branches 19584 19584 ================================================== + Hits 77980 77981 +1 - Misses 28736 28737 +1 + Partials 6548 6546 -2 ``` | [Files with missing lines](https://app.codecov.io/gh/apache/groovy/pull/2157?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Ξ | | |---|---|---| | [.../codehaus/groovy/runtime/DefaultGroovyMethods.java](https://app.codecov.io/gh/apache/groovy/pull/2157?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fruntime%2FDefaultGroovyMethods.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3J1bnRpbWUvRGVmYXVsdEdyb292eU1ldGhvZHMuamF2YQ==) | `73.3223% <76.9231%> (ΓΈ)` | | ... and [2 files with indirect coverage changes](https://app.codecov.io/gh/apache/groovy/pull/2157/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) </details> <details><summary>π New features to boost your workflow: </summary> - β [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems. - π¦ [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges. </details> > DGM flatten return type is often incorrect > ------------------------------------------ > > Key: GROOVY-11486 > URL: https://issues.apache.org/jira/browse/GROOVY-11486 > Project: Groovy > Issue Type: Bug > Reporter: Eric Milles > Assignee: Eric Milles > Priority: Major > > The groovy method {{flatten}} for {{Object[]}}, {{Collection}}, {{Iterable}}, > {{List}}, {{Set}} and {{SortedSet}} does not inference to the correct return > type except for the case where there were no aggregate elements to flatten. > There isn't anything the type checker can do to detect the return type for > non-trivial cases, but the {{flatten}} methods that accept a transform are a > reasonable model: > {code:java} > public static <T, E> Collection<T> flatten(Iterable<E> self, Closure<?> > flattenUsing) { > // ... > } > {code} > This allows the programmer to declare the expected type: > {code:groovy} > def list = [1,[2],[[3],[4]]] > Collection<Integer> coll = list.flatten(Closure.IDENTITY) > {code} -- This message was sent by Atlassian Jira (v8.20.10#820010)