[
https://issues.apache.org/jira/browse/GROOVY-12651?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18137363#comment-18137363
]
ASF GitHub Bot commented on GROOVY-12651:
-----------------------------------------
codecov-commenter commented on PR #3172:
URL: https://github.com/apache/groovy/pull/3172#issuecomment-6609562326
##
[Codecov](https://app.codecov.io/gh/apache/groovy/pull/3172?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 74.1571%. 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
([`3e97192`](https://app.codecov.io/gh/apache/groovy/commit/3e97192f878cd60fd3304144fd21bc024d31596d?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.
<details><summary>Additional details and impacted files</summary>
[](https://app.codecov.io/gh/apache/groovy/pull/3172?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
```diff
@@ Coverage Diff @@
## master #3172 +/- ##
==================================================
+ Coverage 74.1533% 74.1571% +0.0039%
- Complexity 43751 43760 +9
==================================================
Files 1692 1692
Lines 149516 149519 +3
Branches 28366 28366
==================================================
+ Hits 110871 110879 +8
+ Misses 28448 28444 -4
+ Partials 10197 10196 -1
```
| [Files with missing
lines](https://app.codecov.io/gh/apache/groovy/pull/3172?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/3172?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.2145% <100.0000%> (+0.0395%)` | :arrow_up: |
... and [12 files with indirect coverage
changes](https://app.codecov.io/gh/apache/groovy/pull/3172/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>
> Closure packing packs a closure literal stored or composed into a field,
> property or index by ?=, ??=, <<=, >>= or +=
> ---------------------------------------------------------------------------------------------------------------------
>
> Key: GROOVY-12651
> URL: https://issues.apache.org/jira/browse/GROOVY-12651
> Project: Groovy
> Issue Type: Bug
> Affects Versions: 7.0.0-alpha-1, 6.0.0
> Reporter: Scott Murphy Heiberg
> Priority: Major
>
> {code:groovy}
> @groovy.transform.PackedClosures
> class C {
> void install(Holder h) { h.handler ?= { x -> x * 2 } }
> }
> class Holder { Closure handler }
> def h = new Holder()
> new C().install(h)
> h.handler.delegate = 'some delegate'
> println h.handler(21)
> {code}
> *Actual:* the literal is packed ({{PackedClosure$Fixed1}}), and setting the
> delegate throws {{UnsupportedOperationException: Cannot set a delegate on a
> @PackedClosures closure (hoisted method '$packed$closure$0') ...}}
> *Expected:* the closure escapes its method, so the escape gate declines it
> and keeps its closure class. The script then prints 42, as it does without
> packing.
> The same happens for {{??=}}, for {{<<=}} and {{>>=}} on a Closure slot (the
> stored ComposedClosure keeps a packed clone of the literal and passes
> setDelegate on to it), and for {{<<=}} and {{+=}} on a collection slot. It
> happens in dynamic code, under {{@TypeChecked}} and under {{@CompileStatic}},
> and with {{-Dgroovy.target.closure.pack=true}}.
> {{ClosureWriter.collectEscapingClosures}} counted only {{=}} on a non-local
> target and {{<<}} as escapes.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)