[
https://issues.apache.org/jira/browse/GROOVY-12666?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18137479#comment-18137479
]
ASF GitHub Bot commented on GROOVY-12666:
-----------------------------------------
codecov-commenter commented on PR #3187:
URL: https://github.com/apache/groovy/pull/3187#issuecomment-6611741084
##
[Codecov](https://app.codecov.io/gh/apache/groovy/pull/3187?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 `82.50000%` with `7 lines` in your changes missing
coverage. Please review.
:white_check_mark: Project coverage is 74.1567%. 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
([`334515c`](https://app.codecov.io/gh/apache/groovy/commit/334515cfcd481e3b1340d0c1da53c7b8cc2ed5c9?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/3187?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
| Patch % | Lines |
|---|---|---|
|
[...oovy/classgen/asm/sc/StaticTypesClosureWriter.java](https://app.codecov.io/gh/apache/groovy/pull/3187?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fclassgen%2Fasm%2Fsc%2FStaticTypesClosureWriter.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2NsYXNzZ2VuL2FzbS9zYy9TdGF0aWNUeXBlc0Nsb3N1cmVXcml0ZXIuamF2YQ==)
| 80.0000% | [0 Missing and 5 partials :warning:
](https://app.codecov.io/gh/apache/groovy/pull/3187?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
|
|
[...ava/org/codehaus/groovy/runtime/PackedClosure.java](https://app.codecov.io/gh/apache/groovy/pull/3187?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fruntime%2FPackedClosure.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3J1bnRpbWUvUGFja2VkQ2xvc3VyZS5qYXZh)
| 77.7778% | [1 Missing and 1 partial :warning:
](https://app.codecov.io/gh/apache/groovy/pull/3187?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>
[](https://app.codecov.io/gh/apache/groovy/pull/3187?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
```diff
@@ Coverage Diff @@
## master #3187 +/- ##
==================================================
+ Coverage 74.1533% 74.1567% +0.0034%
- Complexity 43751 43766 +15
==================================================
Files 1692 1692
Lines 149516 149555 +39
Branches 28366 28377 +11
==================================================
+ Hits 110871 110905 +34
Misses 28448 28448
- Partials 10197 10202 +5
```
| [Files with missing
lines](https://app.codecov.io/gh/apache/groovy/pull/3187?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/3187?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.4953% <100.0000%> (+0.3203%)` | :arrow_up: |
|
[...codehaus/groovy/runtime/ScriptBytecodeAdapter.java](https://app.codecov.io/gh/apache/groovy/pull/3187?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fruntime%2FScriptBytecodeAdapter.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3J1bnRpbWUvU2NyaXB0Qnl0ZWNvZGVBZGFwdGVyLmphdmE=)
| `68.7646% <100.0000%> (+0.0730%)` | :arrow_up: |
|
[...ava/org/codehaus/groovy/runtime/PackedClosure.java](https://app.codecov.io/gh/apache/groovy/pull/3187?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fruntime%2FPackedClosure.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3J1bnRpbWUvUGFja2VkQ2xvc3VyZS5qYXZh)
| `57.6687% <77.7778%> (+1.1752%)` | :arrow_up: |
|
[...oovy/classgen/asm/sc/StaticTypesClosureWriter.java](https://app.codecov.io/gh/apache/groovy/pull/3187?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fclassgen%2Fasm%2Fsc%2FStaticTypesClosureWriter.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2NsYXNzZ2VuL2FzbS9zYy9TdGF0aWNUeXBlc0Nsb3N1cmVXcml0ZXIuamF2YQ==)
| `65.2778% <80.0000%> (+3.0929%)` | :arrow_up: |
... and [13 files with indirect coverage
changes](https://app.codecov.io/gh/apache/groovy/pull/3187/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>
> Rehydrating a @CompileStatic packed closure ignores the new this object and
> keeps calling the original owner
> ------------------------------------------------------------------------------------------------------------
>
> Key: GROOVY-12666
> URL: https://issues.apache.org/jira/browse/GROOVY-12666
> Project: Groovy
> Issue Type: Bug
> Affects Versions: 7.0.0-alpha-1, 6.0.0
> Reporter: Scott Murphy Heiberg
> Priority: Major
>
> {code:groovy}
> import groovy.transform.CompileStatic
> import groovy.transform.PackedClosures
> class D {}
> @CompileStatic
> @PackedClosures
> class O {
> String name
> String foo() { 'foo ' + name }
> List run(O b) {
> Closure c1 = { -> foo() }
> Closure c2 = { -> name }
> [c1.rehydrate(null, b, b)(), c2.rehydrate(null, b, b)(),
> c1.rehydrate(new D(), new D(), new D())()]
> }
> }
> println new O(name: 'a').run(new O(name: 'b'))
> {code}
> *Actual:* {{[foo a, a, foo a]}}. The same happens without the annotation when
> compiling with {{-Dgroovy.target.closure.pack=true}}.
> *Expected*, as with the closure class compiled without packing: {{[foo b,
> b]}}, then a ClassCastException from the third call, because D is not an O.
> A @CompileStatic closure class runs its body against getThisObject(). A
> packed closure dispatches its hoisted method to the receiver captured at
> construction, and Closure.rehydrate only replaces the visible owner, delegate
> and this object, so the new this object is silently ignored.
> Verified on 6.0.0 and master.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)