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

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

codecov-commenter commented on PR #3337:
URL: https://github.com/apache/groovy/pull/3337#issuecomment-7089863735

   ## 
[Codecov](https://app.codecov.io/gh/apache/groovy/pull/3337?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 `66.66667%` with `2 lines` in your changes missing 
coverage. Please review.
   :white_check_mark: Project coverage is 74.9524%. 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 
([`23ae956`](https://app.codecov.io/gh/apache/groovy/commit/23ae956d93cca6fddd93afd83509cafed6ad1b44?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/3337?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/3337?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)
 | 66.6667% | [0 Missing and 2 partials :warning: 
](https://app.codecov.io/gh/apache/groovy/pull/3337?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>
   
   
   
   [![Impacted file tree 
graph](https://app.codecov.io/gh/apache/groovy/pull/3337/graphs/tree.svg?width=650&height=150&src=pr&token=1r45138NfQ&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)](https://app.codecov.io/gh/apache/groovy/pull/3337?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   
   ```diff
   @@                Coverage Diff                 @@
   ##               master      #3337        +/-   ##
   ==================================================
   + Coverage     74.9518%   74.9524%   +0.0006%     
   - Complexity      48908      48936        +28     
   ==================================================
     Files            1768       1768                
     Lines          161213     161261        +48     
     Branches        31728      31746        +18     
   ==================================================
   + Hits           120832     120869        +37     
   - Misses          28968      28974         +6     
   - Partials        11413      11418         +5     
   ```
   
   | [Files with missing 
lines](https://app.codecov.io/gh/apache/groovy/pull/3337?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/3337?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.9310% <66.6667%> (+0.0139%)` | :arrow_up: |
   
   ... and [13 files with indirect coverage 
changes](https://app.codecov.io/gh/apache/groovy/pull/3337/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 for a type parameter that only the call's 
> target type gives is rejected
> -----------------------------------------------------------------------------------------------------
>
>                 Key: GROOVY-12823
>                 URL: https://issues.apache.org/jira/browse/GROOVY-12823
>             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 test() {
>         Function<String, String> f = id(String::trim)
>         f.apply(' a ')
>     }
> }
> 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}
> Since GROOVY-12727, the type a call's value is assigned, returned or cast to 
> gives a type parameter that the arguments leave open, when the argument is a 
> lambda or a closure: the same call with (String s) -> s.trim() compiles and 
> runs. A method reference or a constructor reference, such as 
> StringBuilder::new or ArrayList::new, is still rejected, whether the call is 
> assigned, returned or cast.



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

Reply via email to