[ 
https://issues.apache.org/jira/browse/GROOVY-12610?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18136988#comment-18136988
 ] 

ASF GitHub Bot commented on GROOVY-12610:
-----------------------------------------

codecov-commenter commented on PR #3169:
URL: https://github.com/apache/groovy/pull/3169#issuecomment-6596055128

   ## 
[Codecov](https://app.codecov.io/gh/apache/groovy/pull/3169?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 `64.44444%` with `16 lines` in your changes missing 
coverage. Please review.
   :white_check_mark: Project coverage is 74.1537%. Comparing base 
([`0941dba`](https://app.codecov.io/gh/apache/groovy/commit/0941dbacf496a1667c27681c6fe76deee59bfb57?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache))
 to head 
([`915a1f6`](https://app.codecov.io/gh/apache/groovy/commit/915a1f60f3cd6e2db1d75029716176a27cf4c658?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   :warning: Report is 11 commits behind head on master.
   
   | [Files with missing 
lines](https://app.codecov.io/gh/apache/groovy/pull/3169?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 | Patch % | Lines |
   |---|---|---|
   | 
[src/main/java/groovy/lang/MetaClassImpl.java](https://app.codecov.io/gh/apache/groovy/pull/3169?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Fgroovy%2Flang%2FMetaClassImpl.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9ncm9vdnkvbGFuZy9NZXRhQ2xhc3NJbXBsLmphdmE=)
 | 66.6667% | [2 Missing and 11 partials :warning: 
](https://app.codecov.io/gh/apache/groovy/pull/3169?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 |
   | 
[...aus/groovy/runtime/metaclass/ClosureMetaClass.java](https://app.codecov.io/gh/apache/groovy/pull/3169?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==)
 | 25.0000% | [0 Missing and 3 partials :warning: 
](https://app.codecov.io/gh/apache/groovy/pull/3169?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>
   
   
   
   [![Impacted file tree 
graph](https://app.codecov.io/gh/apache/groovy/pull/3169/graphs/tree.svg?width=650&height=150&src=pr&token=1r45138NfQ&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)](https://app.codecov.io/gh/apache/groovy/pull/3169?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   
   ```diff
   @@                Coverage Diff                 @@
   ##               master      #3169        +/-   ##
   ==================================================
   + Coverage     74.1533%   74.1537%   +0.0004%     
   - Complexity      43751      43787        +36     
   ==================================================
     Files            1692       1692                
     Lines          149516     149561        +45     
     Branches        28366      28390        +24     
   ==================================================
   + Hits           110871     110905        +34     
   + Misses          28448      28445         -3     
   - Partials        10197      10211        +14     
   ```
   
   | [Files with missing 
lines](https://app.codecov.io/gh/apache/groovy/pull/3169?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 | Coverage Δ | |
   |---|---|---|
   | 
[...java/org/codehaus/groovy/vmplugin/v8/Selector.java](https://app.codecov.io/gh/apache/groovy/pull/3169?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fvmplugin%2Fv8%2FSelector.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3ZtcGx1Z2luL3Y4L1NlbGVjdG9yLmphdmE=)
 | `81.2914% <100.0000%> (+0.0622%)` | :arrow_up: |
   | 
[...aus/groovy/runtime/metaclass/ClosureMetaClass.java](https://app.codecov.io/gh/apache/groovy/pull/3169?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==)
 | `71.4286% <25.0000%> (-0.5573%)` | :arrow_down: |
   | 
[src/main/java/groovy/lang/MetaClassImpl.java](https://app.codecov.io/gh/apache/groovy/pull/3169?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Fgroovy%2Flang%2FMetaClassImpl.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9ncm9vdnkvbGFuZy9NZXRhQ2xhc3NJbXBsLmphdmE=)
 | `78.8871% <66.6667%> (-0.2773%)` | :arrow_down: |
   
   ... and [11 files with indirect coverage 
changes](https://app.codecov.io/gh/apache/groovy/pull/3169/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 accepts access to a private superclass field through a nested subclass 
> under @TypeChecked, which fails at run time
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: GROOVY-12610
>                 URL: https://issues.apache.org/jira/browse/GROOVY-12610
>             Project: Groovy
>          Issue Type: Bug
>    Affects Versions: 4.0.33, 5.0.8, 6.0.0
>            Reporter: Scott Murphy Heiberg
>            Priority: Major
>
> {code:groovy}
> class Base {
>     private String z = 'x'
>     @groovy.transform.TypeChecked
>     static class Sub extends Base {
>         def m() { this.z }   // also: z, super.z, closures, lambdas, writes, 
> that.z
>     }
> }
> new Base.Sub().m()
> {code}
> Actual: the code compiles, then fails with MissingPropertyException: No such 
> property: z for class: Base$Sub. Dynamic Groovy fails the same way.
> Expected: under @TypeChecked, a compile error "No such property: z for class: 
> Base$Sub", as already reported when Base and Sub are both nested in another 
> class. @CompileStatic keeps accepting the code, because it accesses the field 
> directly from a nest-mate.
> Cause: the type checker uses the nest-mate accessibility rule of static 
> compilation for @TypeChecked code too. Type-checked code is dispatched 
> dynamically, and the metaclass of a subclass does not list a private field of 
> its superclass.
> Seen in 4.0.33, 5.0.8 and 6.0.0.
> PR: https://github.com/apache/groovy/pull/3137



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to