[
https://issues.apache.org/jira/browse/GROOVY-12609?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18135642#comment-18135642
]
ASF GitHub Bot commented on GROOVY-12609:
-----------------------------------------
codecov-commenter commented on PR #3136:
URL: https://github.com/apache/groovy/pull/3136#issuecomment-6540012728
##
[Codecov](https://app.codecov.io/gh/apache/groovy/pull/3136?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 `80.55556%` with `7 lines` in your changes missing
coverage. Please review.
:white_check_mark: Project coverage is 74.0972%. 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
([`53853a1`](https://app.codecov.io/gh/apache/groovy/commit/53853a1ae3e048c61184376292736b461f4e1f31?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/3136?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/3136?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==)
| 71.4286% | [1 Missing and 5 partials :warning:
](https://app.codecov.io/gh/apache/groovy/pull/3136?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/3136?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==)
| 93.3333% | [0 Missing and 1 partial :warning:
](https://app.codecov.io/gh/apache/groovy/pull/3136?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/3136?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
```diff
@@ Coverage Diff @@
## master #3136 +/- ##
==================================================
- Coverage 74.1016% 74.0972% -0.0045%
- Complexity 43596 43609 +13
==================================================
Files 1692 1692
Lines 149245 149281 +36
Branches 28284 28295 +11
==================================================
+ Hits 110593 110613 +20
- Misses 28475 28481 +6
- Partials 10177 10187 +10
```
| [Files with missing
lines](https://app.codecov.io/gh/apache/groovy/pull/3136?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/stc/TraitTypeCheckingExtension.java](https://app.codecov.io/gh/apache/groovy/pull/3136?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==)
| `83.7209% <93.3333%> (+2.7083%)` | :arrow_up: |
|
[...oovy/transform/trait/TraitReceiverTransformer.java](https://app.codecov.io/gh/apache/groovy/pull/3136?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.0968% <71.4286%> (-1.7357%)` | :arrow_down: |
... and [10 files with indirect coverage
changes](https://app.codecov.io/gh/apache/groovy/pull/3136/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>
> STC rejects the remapped name of a super trait field in a closure or for an
> instance field ("The variable [T__x] is undeclared" / "No such property:
> T__x")
> -----------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: GROOVY-12609
> URL: https://issues.apache.org/jira/browse/GROOVY-12609
> Project: Groovy
> Issue Type: Bug
> Affects Versions: 4.0.33, 5.0.8, 6.0.0
> Reporter: Scott Murphy Heiberg
> Priority: Major
>
> {code:groovy}
> @groovy.transform.TypeChecked // or @CompileStatic
> trait T {
> public static String shared = 'x'
> public String f = 'i'
> }
> @groovy.transform.TypeChecked
> trait U extends T {
> static m() { def c = { T__shared }; c() }
> def n() { T__f }
> }
> class C implements U {}
> assert C.m() == 'x'
> assert new C().n() == 'i'
> {code}
> Actual: compilation fails with "[Static type checking] - The variable
> [T__shared] is undeclared." and "[Static type checking] - No such property:
> T__f for class: U". The same happens for writes, lambdas, an instance field
> in a closure, and a precompiled super trait.
> Expected: both compile and return x and i, as they do in dynamic Groovy. The
> remapped name is the documented way to use a super trait's field
> (GROOVY-11641, GROOVY-11663).
> The trait transformation leaves a dynamic variable in a closure as it is, so
> the GROOVY-11663 handling of the remapped name on the trait receiver never
> sees it. That handling also only looks for static field getters.
> Seen in 5.0.8 and 6.0.0; 4.0.33 reports the closure case the same way.
> PR: https://github.com/apache/groovy/pull/3136
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)