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

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

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

   ## 
[Codecov](https://app.codecov.io/gh/apache/groovy/pull/3127?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 `75.00000%` with `3 lines` in your changes missing 
coverage. Please review.
   :white_check_mark: Project coverage is 74.4090%. Comparing base 
([`5222105`](https://app.codecov.io/gh/apache/groovy/commit/52221051ab78f260b1461b53ba071231ec150b57?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache))
 to head 
([`38f148f`](https://app.codecov.io/gh/apache/groovy/commit/38f148f1a07a4ca5e5f83e216d31cd134aaef352?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   :warning: Report is 2 commits behind head on master.
   
   | [Files with missing 
lines](https://app.codecov.io/gh/apache/groovy/pull/3127?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 | Patch % | Lines |
   |---|---|---|
   | 
[.../sc/transformers/StaticCompilationTransformer.java](https://app.codecov.io/gh/apache/groovy/pull/3127?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Ftransform%2Fsc%2Ftransformers%2FStaticCompilationTransformer.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3RyYW5zZm9ybS9zYy90cmFuc2Zvcm1lcnMvU3RhdGljQ29tcGlsYXRpb25UcmFuc2Zvcm1lci5qYXZh)
 | 50.0000% | [0 Missing and 3 partials :warning: 
](https://app.codecov.io/gh/apache/groovy/pull/3127?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/3127/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/3127?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   
   ```diff
   @@                Coverage Diff                 @@
   ##               master      #3127        +/-   ##
   ==================================================
   + Coverage     74.4085%   74.4090%   +0.0005%     
   - Complexity      44367      44378        +11     
   ==================================================
     Files            1699       1699                
     Lines          151050     151061        +11     
     Branches        28783      28788         +5     
   ==================================================
   + Hits           112394     112403         +9     
   - Misses          28376      28380         +4     
   + Partials        10280      10278         -2     
   ```
   
   | [Files with missing 
lines](https://app.codecov.io/gh/apache/groovy/pull/3127?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 | Coverage Δ | |
   |---|---|---|
   | 
[...sc/transformers/VariableExpressionTransformer.java](https://app.codecov.io/gh/apache/groovy/pull/3127?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Ftransform%2Fsc%2Ftransformers%2FVariableExpressionTransformer.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3RyYW5zZm9ybS9zYy90cmFuc2Zvcm1lcnMvVmFyaWFibGVFeHByZXNzaW9uVHJhbnNmb3JtZXIuamF2YQ==)
 | `98.4375% <100.0000%> (+0.1042%)` | :arrow_up: |
   | 
[.../sc/transformers/StaticCompilationTransformer.java](https://app.codecov.io/gh/apache/groovy/pull/3127?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Ftransform%2Fsc%2Ftransformers%2FStaticCompilationTransformer.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3RyYW5zZm9ybS9zYy90cmFuc2Zvcm1lcnMvU3RhdGljQ29tcGlsYXRpb25UcmFuc2Zvcm1lci5qYXZh)
 | `93.6364% <50.0000%> (-1.5560%)` | :arrow_down: |
   
   ... and [10 files with indirect coverage 
changes](https://app.codecov.io/gh/apache/groovy/pull/3127/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>




> SC: a private field of the outer class referenced by its bare name in a class 
> nested in a static nested subclass throws VerifyError
> -----------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: GROOVY-12600
>                 URL: https://issues.apache.org/jira/browse/GROOVY-12600
>             Project: Groovy
>          Issue Type: Bug
>    Affects Versions: 5.0.8, 6.0.0
>            Reporter: Scott Murphy Heiberg
>            Priority: Major
>
> {code:groovy}
> class Base {
>     private String z = 'x'
>     @groovy.transform.CompileStatic
>     static class Sub extends Base {
>         def m() { z }
>     }
> }
> assert new Base.Sub().m() == 'x'
> {code}
> Actual: the class fails verification when loaded:
> {noformat}
> java.lang.VerifyError: Bad type on operand stack
>   Location: Base$Sub.m()Ljava/lang/Object; @1: invokevirtual
>   Reason: Type 'Base$Sub' (current frame, stack[0]) is not assignable to 
> 'groovy/lang/Closure'
> {noformat}
> The same happens for assignment, compound assignment and increment of the 
> bare name, inside closures and lambdas, in an anonymous class within the 
> subclass, and for a non-static inner subclass of a static nested class.
> Expected: {{m()}} returns 'x', the field the subclass inherits, as {{this.z}} 
> and {{super.z}} already do under static compilation.
> Cause: the type checker resolves the name to the inherited field as a 
> nestmate private access, but the static compilation transformer always 
> rewrites it to {{Base.this.@z}}. The subclass has no enclosing Base instance, 
> so the class generator falls back to the closure path and emits 
> {{Closure.getThisObject()}} on a non-closure.
> Seen in 5.0.8 and 6.0.0. 4.0.33 compiles it to a dynamic access that throws 
> MissingPropertyException.
> PR: https://github.com/apache/groovy/pull/3127



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

Reply via email to