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

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

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

   ## 
[Codecov](https://app.codecov.io/gh/apache/groovy/pull/3175?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 `66.66667%` with `1 line` in your changes missing 
coverage. Please review.
   :white_check_mark: Project coverage is 74.1504%. 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 
([`cd74e4e`](https://app.codecov.io/gh/apache/groovy/commit/cd74e4e61ad7013611aea23339e1479126294b78?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/3175?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 | Patch % | Lines |
   |---|---|---|
   | 
[...groovy/classgen/asm/sc/StaticInvocationWriter.java](https://app.codecov.io/gh/apache/groovy/pull/3175?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fclassgen%2Fasm%2Fsc%2FStaticInvocationWriter.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2NsYXNzZ2VuL2FzbS9zYy9TdGF0aWNJbnZvY2F0aW9uV3JpdGVyLmphdmE=)
 | 66.6667% | [0 Missing and 1 partial :warning: 
](https://app.codecov.io/gh/apache/groovy/pull/3175?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/3175/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/3175?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   
   ```diff
   @@                Coverage Diff                 @@
   ##               master      #3175        +/-   ##
   ==================================================
   - Coverage     74.1533%   74.1504%   -0.0028%     
     Complexity      43751      43751                
   ==================================================
     Files            1692       1692                
     Lines          149516     149519         +3     
     Branches        28366      28368         +2     
   ==================================================
   - Hits           110871     110869         -2     
   - Misses          28448      28451         +3     
   - Partials        10197      10199         +2     
   ```
   
   | [Files with missing 
lines](https://app.codecov.io/gh/apache/groovy/pull/3175?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 | Coverage Δ | |
   |---|---|---|
   | 
[...groovy/classgen/asm/sc/StaticInvocationWriter.java](https://app.codecov.io/gh/apache/groovy/pull/3175?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fclassgen%2Fasm%2Fsc%2FStaticInvocationWriter.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2NsYXNzZ2VuL2FzbS9zYy9TdGF0aWNJbnZvY2F0aW9uV3JpdGVyLmphdmE=)
 | `77.1266% <66.6667%> (-0.0597%)` | :arrow_down: |
   
   ... and [14 files with indirect coverage 
changes](https://app.codecov.io/gh/apache/groovy/pull/3175/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: calling an instance method of Class without a receiver in a static method 
> fails verification or uses the wrong receiver
> ---------------------------------------------------------------------------------------------------------------------------
>
>                 Key: GROOVY-12654
>                 URL: https://issues.apache.org/jira/browse/GROOVY-12654
>             Project: Groovy
>          Issue Type: Bug
>    Affects Versions: 5.0.8, 7.0.0-alpha-1, 6.0.0
>            Reporter: Scott Murphy Heiberg
>            Priority: Major
>
> {code:groovy}
> @groovy.transform.CompileStatic
> class C {
>     static Object sm() { getName() }
>     static Object st() { toString() }
>     static Object sp(Class type) { getName() }
> }
> println C.sm(); println C.st(); println C.sp(String)
> {code}
> *Actual:* {{java.lang.VerifyError: Bad local variable type}} 
> ({{C.sm()Ljava/lang/Object; @0: aload_0}}). With only {{sp}}, it prints 
> {{java.lang.String}}: the method is called on the parameter. A static field 
> initializer such as {{static String p = getName()}} fails the same way in the 
> static initializer. With closure packing ({{groovy.target.closure.pack=true}} 
> or {{@PackedClosures}}), a closure in a static method is hoisted into a 
> static method, so {{static m() ... toString() inside a closure}} fails 
> verification the same way.
> *Expected:* {{C}}, {{class C}}, {{C}}, as in dynamic and {{@TypeChecked}} 
> code, and as in 4.0.33.
> Cause: for an implicit-this call to a method declared outside the enclosing 
> class, {{StaticInvocationWriter.writeDirectMethodCall}} builds the receiver 
> {{Type.this}}, which in a static method loads local slot 0 instead of the 
> class.
> Verified: 4.0.33 prints the expected values; 5.0.8, 6.0.0 and master fail.



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

Reply via email to