[
https://issues.apache.org/jira/browse/GROOVY-12660?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18137426#comment-18137426
]
ASF GitHub Bot commented on GROOVY-12660:
-----------------------------------------
codecov-commenter commented on PR #3181:
URL: https://github.com/apache/groovy/pull/3181#issuecomment-6610567919
##
[Codecov](https://app.codecov.io/gh/apache/groovy/pull/3181?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 `83.33333%` with `3 lines` in your changes missing
coverage. Please review.
:white_check_mark: Project coverage is 74.1597%. 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
([`ef5ec22`](https://app.codecov.io/gh/apache/groovy/commit/ef5ec222d0376c3beded1cffe3a9843aa218c1d7?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/3181?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/3181?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==)
| 83.3333% | [0 Missing and 3 partials :warning:
](https://app.codecov.io/gh/apache/groovy/pull/3181?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/3181?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
```diff
@@ Coverage Diff @@
## master #3181 +/- ##
==================================================
+ Coverage 74.1533% 74.1597% +0.0064%
- Complexity 43751 43760 +9
==================================================
Files 1692 1692
Lines 149516 149534 +18
Branches 28366 28374 +8
==================================================
+ Hits 110871 110894 +23
+ Misses 28448 28447 -1
+ Partials 10197 10193 -4
```
| [Files with missing
lines](https://app.codecov.io/gh/apache/groovy/pull/3181?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
| Coverage Δ | |
|---|---|---|
|
[...oovy/classgen/asm/sc/StaticTypesClosureWriter.java](https://app.codecov.io/gh/apache/groovy/pull/3181?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==)
| `66.4234% <83.3333%> (+4.2385%)` | :arrow_up: |
... and [13 files with indirect coverage
changes](https://app.codecov.io/gh/apache/groovy/pull/3181/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 closure packing calls methods resolved against a closure object on the
> owner class (TO_SELF, nested closures, Closure methods)
> ---------------------------------------------------------------------------------------------------------------------------------
>
> Key: GROOVY-12660
> URL: https://issues.apache.org/jira/browse/GROOVY-12660
> Project: Groovy
> Issue Type: Bug
> Affects Versions: 7.0.0-alpha-1, 6.0.0
> Reporter: Scott Murphy Heiberg
> Priority: Major
>
> With closure packing ({{@PackedClosures}} or
> {{-Dgroovy.target.closure.pack=true}}), a statically compiled closure body is
> hoisted into a method of the owner class. Calls that the type checker
> resolved against a closure object are then compiled as if they targeted the
> owner.
> {code:groovy}
> @groovy.transform.CompileStatic
> class C {
> String toString() { 'C' }
> static Object self(@DelegatesTo(value=String, strategy=Closure.TO_SELF)
> Closure c) { c.resolveStrategy = Closure.TO_SELF; c() }
> Object a() { self { -> toString() } }
> Object b() { Closure<String> outer = { -> { -> toString() }() };
> [outer(), outer.toString()] }
> Object c() { Closure c = { -> memoize() }; c() }
> }
> {code}
> *Actual*, with packing:
> * {{a()}} returns {{C}}.
> * {{b()}} throws {{MissingPropertyException: No such property: owner for
> class: C}} (on 6.0.0 it returns {{C}} for the inner call).
> * Loading {{C}} fails with {{VerifyError: Bad type on operand stack ... Type
> 'C' is not assignable to 'groovy/lang/Closure'}}.
> *Expected*, as without packing and in dynamic Groovy: {{a()}} returns the
> closure's own toString(), {{b()}} returns the outer closure's toString()
> twice, {{c()}} returns the memoized closure.
> Cause: the packing decision only checks for delegate-resolved names and for
> the named closure pseudo-properties. It does not decline a call resolved
> against the closure itself: an Object method under TO_SELF, an Object method
> in a nested closure (resolved against the enclosing closure since
> GROOVY-12576), or a method that Closure declares.
> Verified on 6.0.0 and master.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)