[
https://issues.apache.org/jira/browse/GROOVY-12561?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18134454#comment-18134454
]
ASF GitHub Bot commented on GROOVY-12561:
-----------------------------------------
codecov-commenter commented on PR #3090:
URL: https://github.com/apache/groovy/pull/3090#issuecomment-6507976876
##
[Codecov](https://app.codecov.io/gh/apache/groovy/pull/3090?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 `86.95652%` with `3 lines` in your changes missing
coverage. Please review.
:white_check_mark: Project coverage is 73.6739%. Comparing base
([`5b077f9`](https://app.codecov.io/gh/apache/groovy/commit/5b077f9dcf610898e3415f1f1cebbaab8eecab61?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache))
to head
([`1727d5a`](https://app.codecov.io/gh/apache/groovy/commit/1727d5aaebdf3a5c7b86b129bcd2ccb5e71a8532?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
:warning: Report is 4 commits behind head on master.
| [Files with missing
lines](https://app.codecov.io/gh/apache/groovy/pull/3090?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
| Patch % | Lines |
|---|---|---|
|
[...m/sc/transformers/BinaryExpressionTransformer.java](https://app.codecov.io/gh/apache/groovy/pull/3090?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Ftransform%2Fsc%2Ftransformers%2FBinaryExpressionTransformer.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3RyYW5zZm9ybS9zYy90cmFuc2Zvcm1lcnMvQmluYXJ5RXhwcmVzc2lvblRyYW5zZm9ybWVyLmphdmE=)
| 81.2500% | [0 Missing and 3 partials :warning:
](https://app.codecov.io/gh/apache/groovy/pull/3090?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/3090?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
```diff
@@ Coverage Diff @@
## master #3090 +/- ##
==================================================
+ Coverage 73.6711% 73.6739% +0.0028%
- Complexity 42584 42598 +14
==================================================
Files 1678 1678
Lines 146907 146934 +27
Branches 27790 27800 +10
==================================================
+ Hits 108228 108252 +24
Misses 28528 28528
- Partials 10151 10154 +3
```
| [Files with missing
lines](https://app.codecov.io/gh/apache/groovy/pull/3090?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
| Coverage Δ | |
|---|---|---|
|
[...rm/sc/transformers/ConstructorCallTransformer.java](https://app.codecov.io/gh/apache/groovy/pull/3090?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Ftransform%2Fsc%2Ftransformers%2FConstructorCallTransformer.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3RyYW5zZm9ybS9zYy90cmFuc2Zvcm1lcnMvQ29uc3RydWN0b3JDYWxsVHJhbnNmb3JtZXIuamF2YQ==)
| `95.2756% <100.0000%> (+0.1143%)` | :arrow_up: |
|
[...roovy/transform/stc/StaticTypeCheckingVisitor.java](https://app.codecov.io/gh/apache/groovy/pull/3090?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.5000% <100.0000%> (+0.0337%)` | :arrow_up: |
|
[...m/sc/transformers/BinaryExpressionTransformer.java](https://app.codecov.io/gh/apache/groovy/pull/3090?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Ftransform%2Fsc%2Ftransformers%2FBinaryExpressionTransformer.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3RyYW5zZm9ybS9zYy90cmFuc2Zvcm1lcnMvQmluYXJ5RXhwcmVzc2lvblRyYW5zZm9ybWVyLmphdmE=)
| `91.5441% <81.2500%> (-0.6434%)` | :arrow_down: |
... and [13 files with indirect coverage
changes](https://app.codecov.io/gh/apache/groovy/pull/3090/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 closure assigned to a subscript or property of a functional interface
> type is stored unconverted
> ------------------------------------------------------------------------------------------------------
>
> Key: GROOVY-12561
> URL: https://issues.apache.org/jira/browse/GROOVY-12561
> Project: Groovy
> Issue Type: Bug
> Components: Static compilation
> Affects Versions: 4.0.33, 5.0.8, 6.0.0
> Reporter: Scott Murphy Heiberg
> Priority: Major
>
> Under {{@CompileStatic}}, a closure assigned to a subscript or a property
> whose type is a functional interface is stored as the closure itself when the
> method that stores it declares its parameter with a type parameter: {{putAt}}
> of a {{Map<String, Function<String, String>>}} or {{List<Supplier<String>>}},
> or the setter or field of a {{Holder<T>}} property for a
> {{Holder<Supplier<String>>}}. A later call of the interface method fails:
> {code:groovy}
> import java.util.function.Function
> @groovy.transform.CompileStatic
> Map<String, Function<String, String>> make() {
> Map<String, Function<String, String>> map = [:]
> map['shout'] = { String s -> s + '!' }
> map
> }
> make().shout.apply('hi') // MissingMethodException: No signature of method:
> apply ... (a Closure was stored)
> {code}
> The same holds for {{map?['k'] = ...}}, {{map.k = ...}}, {{holder.value =
> ...}}, {{box.@field = ...}} and the named constructor argument {{new
> Holder<Supplier<String>>(value: { ... })}}. Assigning to a variable of the
> interface type converts the closure.
> Expected: the closure is converted to the type of the subscript or property,
> as for a variable, and the value of the assignment is the converted closure.
> PR: https://github.com/apache/groovy/pull/3090
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)