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

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

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

   ## 
[Codecov](https://app.codecov.io/gh/apache/groovy/pull/3152?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.00000%` with `3 lines` in your changes missing 
coverage. Please review.
   :white_check_mark: Project coverage is 74.1046%. 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 
([`0422cd9`](https://app.codecov.io/gh/apache/groovy/commit/0422cd9695ac2349eedb4551db50354a470291c2?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   
   | [Files with missing 
lines](https://app.codecov.io/gh/apache/groovy/pull/3152?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/3152?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)
 | 66.6667% | [0 Missing and 3 partials :warning: 
](https://app.codecov.io/gh/apache/groovy/pull/3152?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/3152/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/3152?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   
   ```diff
   @@                Coverage Diff                 @@
   ##               master      #3152        +/-   ##
   ==================================================
   + Coverage     74.1012%   74.1046%   +0.0034%     
   - Complexity      43600      43609         +9     
   ==================================================
     Files            1692       1692                
     Lines          149254     149266        +12     
     Branches        28286      28292         +6     
   ==================================================
   + Hits           110599     110613        +14     
     Misses          28475      28475                
   + Partials        10180      10178         -2     
   ```
   
   | [Files with missing 
lines](https://app.codecov.io/gh/apache/groovy/pull/3152?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/3152?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/3152?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)
 | `94.6808% <66.6667%> (-0.6680%)` | :arrow_down: |
   
   ... and [13 files with indirect coverage 
changes](https://app.codecov.io/gh/apache/groovy/pull/3152/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 bare private field name in an enum constant body, or in an anonymous 
> subclass created in a static method, fails with VerifyError
> --------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: GROOVY-12626
>                 URL: https://issues.apache.org/jira/browse/GROOVY-12626
>             Project: Groovy
>          Issue Type: Bug
>    Affects Versions: 5.0.8, 6.0.0
>            Reporter: Scott Murphy Heiberg
>            Priority: Major
>
> {code:groovy}
> @groovy.transform.CompileStatic
> enum E { A { def n() { z } }; private String z = 'x' }
> assert E.A.n() == 'x'
> {code}
> Actual: {{java.lang.VerifyError: Bad type on operand stack}}. The same 
> happens for this.z, assignment, compound assignment, a closure, a lambda or 
> an anonymous class in the constant body. It also happens for an anonymous 
> subclass created in a static method of the declaring class:
> {code:groovy}
> @groovy.transform.CompileStatic
> class B { private String z = 'x'; static B make() { new B() { String 
> toString() { z } } } }
> assert B.make().toString() == 'x'
> {code}
> Expected: the field the class inherits is read and written; both scripts pass.
> Cause: the static compiler rewrites the field access through the enclosing E 
> instance because it treats the constant body (and the anonymous class) as 
> having an enclosing instance of the declaring class. Neither has one: the 
> constant body is created by the enum's static initializer, and the anonymous 
> class by a static method.
> 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/3152



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

Reply via email to