[
https://issues.apache.org/jira/browse/GROOVY-12621?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18135716#comment-18135716
]
ASF GitHub Bot commented on GROOVY-12621:
-----------------------------------------
codecov-commenter commented on PR #3147:
URL: https://github.com/apache/groovy/pull/3147#issuecomment-6540963302
##
[Codecov](https://app.codecov.io/gh/apache/groovy/pull/3147?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 74.1149%. Comparing base
([`ef76fcb`](https://app.codecov.io/gh/apache/groovy/commit/ef76fcba756be3331227627f78b5ba6b62109645?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache))
to head
([`364d463`](https://app.codecov.io/gh/apache/groovy/commit/364d46348b4e54f3b00e7ea5da0d090795af3387?dropdown=coverage&el=desc&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/3147?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
```diff
@@ Coverage Diff @@
## master #3147 +/- ##
==================================================
+ Coverage 74.1012% 74.1149% +0.0137%
- Complexity 43600 43625 +25
==================================================
Files 1692 1692
Lines 149254 149271 +17
Branches 28286 28294 +8
==================================================
+ Hits 110599 110632 +33
+ Misses 28475 28471 -4
+ Partials 10180 10168 -12
```
| [Files with missing
lines](https://app.codecov.io/gh/apache/groovy/pull/3147?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
| Coverage Δ | |
|---|---|---|
|
[...va/org/apache/groovy/ast/tools/ClassNodeUtils.java](https://app.codecov.io/gh/apache/groovy/pull/3147?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fapache%2Fgroovy%2Fast%2Ftools%2FClassNodeUtils.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2dyb292eS9hc3QvdG9vbHMvQ2xhc3NOb2RlVXRpbHMuamF2YQ==)
| `85.5670% <100.0000%> (+0.0748%)` | :arrow_up: |
|
[...roovy/transform/stc/StaticTypeCheckingVisitor.java](https://app.codecov.io/gh/apache/groovy/pull/3147?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)
| `88.2703% <100.0000%> (+0.0613%)` | :arrow_up: |
... and [15 files with indirect coverage
changes](https://app.codecov.io/gh/apache/groovy/pull/3147/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 still accepts some private superclass field accesses under @TypeChecked
> that fail at run time
> -------------------------------------------------------------------------------------------------
>
> Key: GROOVY-12621
> URL: https://issues.apache.org/jira/browse/GROOVY-12621
> Project: Groovy
> Issue Type: Bug
> Affects Versions: 4.0.33, 5.0.8, 6.0.0
> Reporter: Scott Murphy Heiberg
> Priority: Major
>
> GROOVY-12610 makes the type checker reject property access to a private
> instance field of a superclass when dynamic dispatch can never find it. Three
> shapes are still accepted and fail with a MissingPropertyException.
> Enum constant body (z, this.z and super.z all fail):
> {code:groovy}
> @groovy.transform.TypeChecked
> enum E {
> A { def n() { z } }
> private String z = 'x'
> }
> E.A.n()
> {code}
> Write through super in a non-static inner subclass (compound assignment and
> increment also fail):
> {code:groovy}
> @groovy.transform.TypeChecked
> class Base {
> private String z = 'x'
> class Sub extends Base {
> def m() { super.z = 'y' }
> }
> def t() { new Sub().m() }
> }
> new Base().t()
> {code}
> Receiver that is not an instance of the calling inner class:
> {code:groovy}
> @groovy.transform.TypeChecked
> class Base {
> private String z = 'x'
> static class Sub extends Base {}
> class Inner {
> def m(Sub sub) { sub.z }
> }
> def t() { new Inner().m(new Sub()) }
> }
> new Base().t()
> {code}
> Actual: all three compile and then fail with MissingPropertyException: No
> such property: z for class: E$1 (or Base$Sub).
> Expected: compile errors "No such property: z for class: ...", as for the
> shapes GROOVY-12610 covers. Under @CompileStatic all three keep compiling,
> since static compilation accesses the field directly.
> Cause: ClassNodeUtils.hasNoEnclosingInstance returned false for an enum
> constant body, which is created in the enum's static initializer. The type
> checker also did not take two run-time limits into account: there is no
> enclosing-instance fallback for a write through super (GROOVY-11823), and the
> fallback applies only when the receiver is an instance of the calling class.
> The enum case is seen in 4.0.33, 5.0.8 and 6.0.0.
> PR: https://github.com/apache/groovy/pull/3147
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)