[
https://issues.apache.org/jira/browse/GROOVY-12825?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18149529#comment-18149529
]
ASF GitHub Bot commented on GROOVY-12825:
-----------------------------------------
codecov-commenter commented on PR #3339:
URL: https://github.com/apache/groovy/pull/3339#issuecomment-7090142580
##
[Codecov](https://app.codecov.io/gh/apache/groovy/pull/3339?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
Report
:x: Patch coverage is `75.43860%` with `14 lines` in your changes missing
coverage. Please review.
:white_check_mark: Project coverage is 74.9566%. Comparing base
([`09e84fa`](https://app.codecov.io/gh/apache/groovy/commit/09e84fa4b0d4c37a5ac2efc48dfd2db93a84cab7?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache))
to head
([`fa97f17`](https://app.codecov.io/gh/apache/groovy/commit/fa97f1726b17425b69287aeece30debf15e9b0c7?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
:warning: Report is 1 commits behind head on master.
| [Files with missing
lines](https://app.codecov.io/gh/apache/groovy/pull/3339?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
| Patch % | Lines |
|---|---|---|
|
[...roovy/transform/stc/StaticTypeCheckingVisitor.java](https://app.codecov.io/gh/apache/groovy/pull/3339?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)
| 75.4386% | [0 Missing and 14 partials :warning:
](https://app.codecov.io/gh/apache/groovy/pull/3339?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/3339?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
```diff
@@ Coverage Diff @@
## master #3339 +/- ##
==================================================
+ Coverage 74.9518% 74.9566% +0.0048%
- Complexity 48908 48955 +47
==================================================
Files 1768 1768
Lines 161213 161312 +99
Branches 31728 31759 +31
==================================================
+ Hits 120832 120914 +82
- Misses 28968 28971 +3
- Partials 11413 11427 +14
```
| [Files with missing
lines](https://app.codecov.io/gh/apache/groovy/pull/3339?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/3339?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.8301% <75.4386%> (-0.0870%)` | :arrow_down: |
... and [12 files with indirect coverage
changes](https://app.codecov.io/gh/apache/groovy/pull/3339/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>
> SC: a method reference passed to a generic call that is itself an argument is
> rejected when only the enclosing parameter gives its type
> ---------------------------------------------------------------------------------------------------------------------------------------
>
> Key: GROOVY-12825
> URL: https://issues.apache.org/jira/browse/GROOVY-12825
> Project: Groovy
> Issue Type: Bug
> Reporter: Scott Murphy Heiberg
> Priority: Major
>
> {code:groovy}
> import java.util.function.Function
> @groovy.transform.CompileStatic
> class C {
> static <T> T id(T t) { t }
> static String take(Function<String, String> f) { f.apply(' a ') }
> static String test() {
> take(id(String::trim))
> }
> }
> assert C.test() == 'a'
> {code}
> With 6.0.0 and master this does not compile:
> {noformat}
> [Static type checking] - Argument is a method reference, but parameter type
> 'T' is not a functional interface
> {noformat}
> The call id(String::trim) is an argument of take, whose parameter gives T, as
> javac infers it. The type checker visits id(String::trim) before it chooses
> take, so when it checks the method reference nothing gives T yet. The same
> holds for a constructor reference, for a call that is a constructor argument,
> and through more than one call, as in take(wrap(id(String::trim))).
> This is the case of GROOVY-12823 where the target type is the parameter of
> the enclosing call rather than an assignment, a return or a cast. A lambda in
> the same place is compiled as a closure and converted when it is passed, so
> it works.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)