[
https://issues.apache.org/jira/browse/GROOVY-12611?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18135643#comment-18135643
]
ASF GitHub Bot commented on GROOVY-12611:
-----------------------------------------
codecov-commenter commented on PR #3138:
URL: https://github.com/apache/groovy/pull/3138#issuecomment-6540015943
##
[Codecov](https://app.codecov.io/gh/apache/groovy/pull/3138?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 `84.93151%` with `11 lines` in your changes missing
coverage. Please review.
:white_check_mark: Project coverage is 74.1103%. Comparing base
([`cd944a5`](https://app.codecov.io/gh/apache/groovy/commit/cd944a5f0ee353126e6f6a484f574b4b53e555fd?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache))
to head
([`48490c8`](https://app.codecov.io/gh/apache/groovy/commit/48490c84ca7ab3d3edaf92e66ad6e29ebe5562a9?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/3138?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
| Patch % | Lines |
|---|---|---|
|
[...aus/groovy/runtime/metaclass/ClosureMetaClass.java](https://app.codecov.io/gh/apache/groovy/pull/3138?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fruntime%2Fmetaclass%2FClosureMetaClass.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3J1bnRpbWUvbWV0YWNsYXNzL0Nsb3N1cmVNZXRhQ2xhc3MuamF2YQ==)
| 80.0000% | [1 Missing and 5 partials :warning:
](https://app.codecov.io/gh/apache/groovy/pull/3138?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
|
|
[...oovy/transform/stc/TraitTypeCheckingExtension.java](https://app.codecov.io/gh/apache/groovy/pull/3138?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Ftransform%2Fstc%2FTraitTypeCheckingExtension.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3RyYW5zZm9ybS9zdGMvVHJhaXRUeXBlQ2hlY2tpbmdFeHRlbnNpb24uamF2YQ==)
| 82.6087% | [1 Missing and 3 partials :warning:
](https://app.codecov.io/gh/apache/groovy/pull/3138?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
|
|
[...oovy/transform/trait/TraitReceiverTransformer.java](https://app.codecov.io/gh/apache/groovy/pull/3138?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Ftransform%2Ftrait%2FTraitReceiverTransformer.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3RyYW5zZm9ybS90cmFpdC9UcmFpdFJlY2VpdmVyVHJhbnNmb3JtZXIuamF2YQ==)
| 91.6667% | [0 Missing and 1 partial :warning:
](https://app.codecov.io/gh/apache/groovy/pull/3138?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/3138?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
```diff
@@ Coverage Diff @@
## master #3138 +/- ##
==================================================
+ Coverage 74.1016% 74.1103% +0.0087%
- Complexity 43596 43637 +41
==================================================
Files 1692 1692
Lines 149245 149326 +81
Branches 28284 28312 +28
==================================================
+ Hits 110593 110666 +73
+ Misses 28475 28474 -1
- Partials 10177 10186 +9
```
| [Files with missing
lines](https://app.codecov.io/gh/apache/groovy/pull/3138?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
| Coverage Δ | |
|---|---|---|
|
[...groovy/transform/trait/TraitASTTransformation.java](https://app.codecov.io/gh/apache/groovy/pull/3138?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Ftransform%2Ftrait%2FTraitASTTransformation.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3RyYW5zZm9ybS90cmFpdC9UcmFpdEFTVFRyYW5zZm9ybWF0aW9uLmphdmE=)
| `92.6829% <100.0000%> (+0.1621%)` | :arrow_up: |
|
[...oovy/transform/trait/TraitReceiverTransformer.java](https://app.codecov.io/gh/apache/groovy/pull/3138?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Ftransform%2Ftrait%2FTraitReceiverTransformer.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3RyYW5zZm9ybS90cmFpdC9UcmFpdFJlY2VpdmVyVHJhbnNmb3JtZXIuamF2YQ==)
| `88.9423% <91.6667%> (+0.1098%)` | :arrow_up: |
|
[...oovy/transform/stc/TraitTypeCheckingExtension.java](https://app.codecov.io/gh/apache/groovy/pull/3138?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Ftransform%2Fstc%2FTraitTypeCheckingExtension.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3RyYW5zZm9ybS9zdGMvVHJhaXRUeXBlQ2hlY2tpbmdFeHRlbnNpb24uamF2YQ==)
| `81.3726% <82.6087%> (+0.3599%)` | :arrow_up: |
|
[...aus/groovy/runtime/metaclass/ClosureMetaClass.java](https://app.codecov.io/gh/apache/groovy/pull/3138?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fruntime%2Fmetaclass%2FClosureMetaClass.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3J1bnRpbWUvbWV0YWNsYXNzL0Nsb3N1cmVNZXRhQ2xhc3MuamF2YQ==)
| `72.4359% <80.0000%> (+0.8047%)` | :arrow_up: |
... and [14 files with indirect coverage
changes](https://app.codecov.io/gh/apache/groovy/pull/3138/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>
> A private or static trait method called from a closure ignores the closure's
> delegate
> -------------------------------------------------------------------------------------
>
> Key: GROOVY-12611
> URL: https://issues.apache.org/jira/browse/GROOVY-12611
> Project: Groovy
> Issue Type: Bug
> Affects Versions: 4.0.33, 5.0.8, 6.0.0
> Reporter: Scott Murphy Heiberg
> Priority: Major
>
> {code:groovy}
> trait T {
> private int size() { 1 } // or: static int size() { 1 }
> def m() { [5, 6].with { size() } }
> }
> class C implements T {}
> assert new C().m() == 2
> {code}
> Actual: 1, in dynamic, @TypeChecked and @CompileStatic code. The same happens
> for a static trait method called from a static trait method.
> Expected: 2, as for the same code in a class. The delegate's method is used
> when the resolve strategy tries the delegate first and the delegate has the
> method. Otherwise the trait method is called. A public instance trait method
> already behaves this way.
> Cause: TraitReceiverTransformer rewrites an implicit-this call to a private
> or static trait method inside a closure into a direct call on the trait
> helper class, so the closure's delegate is never consulted.
> Seen in 4.0.33, 5.0.8 and 6.0.0 (4.0.33 is right for public static methods).
> PR: https://github.com/apache/groovy/pull/3138
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)