[ https://issues.apache.org/jira/browse/GROOVY-11683?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17959540#comment-17959540 ]
ASF GitHub Bot commented on GROOVY-11683: ----------------------------------------- codecov-commenter commented on PR #2253: URL: https://github.com/apache/groovy/pull/2253#issuecomment-2959958684 ## [Codecov](https://app.codecov.io/gh/apache/groovy/pull/2253?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report All modified and coverable lines are covered by tests :white_check_mark: > Project coverage is 69.0450%. Comparing base [(`55f31a3`)](https://app.codecov.io/gh/apache/groovy/commit/55f31a3aec6cdab1f80aa76d27af08e2c621876d?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) to head [(`76f071a`)](https://app.codecov.io/gh/apache/groovy/commit/76f071a62d84ae55fc423a6f7cfb5460ffa36974?dropdown=coverage&el=desc&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/2253?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) ```diff @@ Coverage Diff @@ ## master #2253 +/- ## ================================================== + Coverage 69.0412% 69.0450% +0.0038% Complexity 29711 29711 ================================================== Files 1423 1423 Lines 114423 114424 +1 Branches 19846 19847 +1 ================================================== + Hits 78999 79004 +5 + Misses 28789 28786 -3 + Partials 6635 6634 -1 ``` | [Files with missing lines](https://app.codecov.io/gh/apache/groovy/pull/2253?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | | |---|---|---| | [...roovy/transform/stc/StaticTypeCheckingVisitor.java](https://app.codecov.io/gh/apache/groovy/pull/2253?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Ftransform%2Fstc%2FStaticTypeCheckingVisitor.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3RyYW5zZm9ybS9zdGMvU3RhdGljVHlwZUNoZWNraW5nVmlzaXRvci5qYXZh) | `87.5598% <100.0000%> (+0.0035%)` | :arrow_up: | ... and [3 files with indirect coverage changes](https://app.codecov.io/gh/apache/groovy/pull/2253/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> :rocket: New features to boost your workflow: </summary> - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems. - :package: [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> > STC loses generic information on method reference > ------------------------------------------------- > > Key: GROOVY-11683 > URL: https://issues.apache.org/jira/browse/GROOVY-11683 > Project: Groovy > Issue Type: Bug > Components: Static Type Checker > Affects Versions: 4.0.27 > Reporter: Christopher Smith > Assignee: Eric Milles > Priority: Minor > > I am using a typical stream pipeline to get a list of pages of results and > flatMap them to the individual records: > {code} > // > software.amazon.awssdk.services.cognitoidentityprovider.CognitoIdentityProviderClient > cognito > cognito.listUsersPaginator { it.userPoolId(cognitoUserPool) } > .stream() > .map(ListUsersResponse::users) > .flatMap(List::stream) // produces UserType > .map(UserType::username) > .toList() > {code} > Both groovyc and GRECLIPSE report the compile-time error > {code} > Failed to find class method 'username(java.lang.Object)' or instance method > 'username()' for the type: > software.amazon.awssdk.services.cognitoidentityprovider.model.UserType > {code} > The cause appears to be a failure to propagate the type information out of > the {{flatMap}} call: On hover, Eclipse correctly identifies the > {{List::stream}} as returning {{Stream<UserType>}}, but the {{flatMap}} is > reported as {{Stream<Object>}}. Inserting a type witness before the > {{flatMap}} call resolves the error. Both the loss of type information and > the incorrect error message appear to be bugs. -- This message was sent by Atlassian Jira (v8.20.10#820010)