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

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

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

   ## 
[Codecov](https://app.codecov.io/gh/apache/groovy/pull/3184?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 `89.47368%` with `4 lines` in your changes missing 
coverage. Please review.
   :white_check_mark: Project coverage is 74.1610%. 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 
([`c99e1e3`](https://app.codecov.io/gh/apache/groovy/commit/c99e1e385285faf666049a18baa8b7a3531d4837?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/3184?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 | Patch % | Lines |
   |---|---|---|
   | 
[...rg/codehaus/groovy/classgen/asm/ClosureWriter.java](https://app.codecov.io/gh/apache/groovy/pull/3184?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fclassgen%2Fasm%2FClosureWriter.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2NsYXNzZ2VuL2FzbS9DbG9zdXJlV3JpdGVyLmphdmE=)
 | 89.4737% | [0 Missing and 4 partials :warning: 
](https://app.codecov.io/gh/apache/groovy/pull/3184?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/3184/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/3184?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   
   ```diff
   @@                Coverage Diff                 @@
   ##               master      #3184        +/-   ##
   ==================================================
   + Coverage     74.1533%   74.1610%   +0.0077%     
   - Complexity      43751      43766        +15     
   ==================================================
     Files            1692       1692                
     Lines          149516     149553        +37     
     Branches        28366      28377        +11     
   ==================================================
   + Hits           110871     110910        +39     
   + Misses          28448      28447         -1     
   + Partials        10197      10196         -1     
   ```
   
   | [Files with missing 
lines](https://app.codecov.io/gh/apache/groovy/pull/3184?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 | Coverage Δ | |
   |---|---|---|
   | 
[...rg/codehaus/groovy/classgen/asm/ClosureWriter.java](https://app.codecov.io/gh/apache/groovy/pull/3184?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fclassgen%2Fasm%2FClosureWriter.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2NsYXNzZ2VuL2FzbS9DbG9zdXJlV3JpdGVyLmphdmE=)
 | `90.2564% <89.4737%> (+0.0814%)` | :arrow_up: |
   
   ... and [12 files with indirect coverage 
changes](https://app.codecov.io/gh/apache/groovy/pull/3184/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>




> @PackedClosures packs dynamic closures whose calls resolve against a closure 
> object, calling the owner instead
> --------------------------------------------------------------------------------------------------------------
>
>                 Key: GROOVY-12663
>                 URL: https://issues.apache.org/jira/browse/GROOVY-12663
>             Project: Groovy
>          Issue Type: Bug
>    Affects Versions: 7.0.0-alpha-1, 6.0.0
>            Reporter: Scott Murphy Heiberg
>            Priority: Major
>
> {code:groovy}
> class C {
>     String toString() { 'C' }
>     @groovy.transform.PackedClosures Object m() { Closure outer = { -> { -> 
> toString() }() }; [outer(), outer.toString()] }
>     @groovy.transform.PackedClosures Object mem() { def c = { -> memoize() }; 
> c() }
> }
> println new C().m()
> new C().mem()
> {code}
> *Actual:* {{m()}} returns {{[C, C.$packed$closure$0@...]}} (the owner's 
> toString, not the outer closure's), and {{mem()}} throws 
> {{MissingMethodException: No signature of method: memoize for class: C}}. The 
> same happens for:
> * other methods Closure declares: curry, dehydrate, rehydrate, asWritable, 
> trampoline, rightShift, and recursion through call or doCall; clone() throws 
> CloneNotSupportedException;
> * the properties maximumNumberOfParameters and parameterTypes, which throw 
> MissingPropertyException;
> * hashCode, equals, getClass and GDK methods such as with or is in a nested 
> closure.
> *Expected:* the same results as without the annotation. Methods that Closure 
> declares resolve against the closure itself, and Object and GDK methods 
> called in a nested closure resolve against the enclosing closure.
> Cause: in dynamic code the annotation is trusted, and the packing check only 
> rejects the pseudo-property calls such as getDelegate(). The hoisted body is 
> a method of the owner class, and a nested closure created in it gets the 
> owner instance as its owner, so these calls reach the owner. The 
> @CompileStatic counterpart is GROOVY-12660.
> Verified on 6.0.0 and master.



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

Reply via email to