[
https://issues.apache.org/jira/browse/GROOVY-12598?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18135588#comment-18135588
]
ASF GitHub Bot commented on GROOVY-12598:
-----------------------------------------
codecov-commenter commented on PR #3125:
URL: https://github.com/apache/groovy/pull/3125#issuecomment-6539643350
##
[Codecov](https://app.codecov.io/gh/apache/groovy/pull/3125?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 `63.63636%` with `4 lines` in your changes missing
coverage. Please review.
:white_check_mark: Project coverage is 74.0976%. 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
([`8f6d9d8`](https://app.codecov.io/gh/apache/groovy/commit/8f6d9d8d11e625e913889cdcbeaa721dabe604b1?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/3125?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
| Patch % | Lines |
|---|---|---|
|
[...oovy/transform/trait/TraitReceiverTransformer.java](https://app.codecov.io/gh/apache/groovy/pull/3125?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==)
| 63.6364% | [0 Missing and 4 partials :warning:
](https://app.codecov.io/gh/apache/groovy/pull/3125?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/3125?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
```diff
@@ Coverage Diff @@
## master #3125 +/- ##
==================================================
- Coverage 74.1016% 74.0976% -0.0041%
- Complexity 43596 43609 +13
==================================================
Files 1692 1692
Lines 149245 149264 +19
Branches 28284 28291 +7
==================================================
+ Hits 110593 110601 +8
- Misses 28475 28480 +5
- Partials 10177 10183 +6
```
| [Files with missing
lines](https://app.codecov.io/gh/apache/groovy/pull/3125?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
| Coverage Δ | |
|---|---|---|
|
[...oovy/transform/trait/TraitReceiverTransformer.java](https://app.codecov.io/gh/apache/groovy/pull/3125?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==)
| `87.4396% <63.6364%> (-1.3929%)` | :arrow_down: |
... and [14 files with indirect coverage
changes](https://app.codecov.io/gh/apache/groovy/pull/3125/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 trait property referenced from a closure ignores the closure's delegate and
> resolve strategy
> ----------------------------------------------------------------------------------------------
>
> Key: GROOVY-12598
> URL: https://issues.apache.org/jira/browse/GROOVY-12598
> 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 {
> def cnt = 1
> def m() { [cnt: 42].with { cnt } }
> }
> class C implements T {}
> assert new C().m() == 42
> {code}
> Actual: 1. The closure reads the trait's own property, in dynamic,
> @TypeChecked and @CompileStatic code. Assigning, as in a with closure that
> does cnt = 5, writes the trait property instead of the map. An accessor-only
> property (a getCnt method) behaves the same way, and assigning to it throws
> ReadOnlyPropertyException. A method parameter annotated with DelegatesTo and
> DELEGATE_FIRST behaves the same as with.
> Expected: 42, as for the same code in a class. The delegate is checked first
> under DELEGATE_FIRST, and the property of the implementing instance is used
> only when the delegate does not have one.
> Cause: TraitReceiverTransformer rewrites a reference to a trait field or
> property into a direct access on the implementing instance or a field-helper
> call, even inside a closure. The closure's resolve strategy is therefore
> never consulted.
> Seen in 4.0.33, 5.0.8 and 6.0.0.
> PR: https://github.com/apache/groovy/pull/3125
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)