[
https://issues.apache.org/jira/browse/GROOVY-12627?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18135703#comment-18135703
]
ASF GitHub Bot commented on GROOVY-12627:
-----------------------------------------
codecov-commenter commented on PR #3153:
URL: https://github.com/apache/groovy/pull/3153#issuecomment-6540813222
##
[Codecov](https://app.codecov.io/gh/apache/groovy/pull/3153?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 `80.00000%` with `1 line` in your changes missing
coverage. Please review.
:white_check_mark: Project coverage is 74.1014%. Comparing base
([`ef76fcb`](https://app.codecov.io/gh/apache/groovy/commit/ef76fcba756be3331227627f78b5ba6b62109645?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache))
to head
([`ec38e4a`](https://app.codecov.io/gh/apache/groovy/commit/ec38e4ad4613dafd45411954d7ef9428c87395f9?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
| [Files with missing
lines](https://app.codecov.io/gh/apache/groovy/pull/3153?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
| Patch % | Lines |
|---|---|---|
|
[src/main/java/groovy/lang/MetaClassImpl.java](https://app.codecov.io/gh/apache/groovy/pull/3153?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Fgroovy%2Flang%2FMetaClassImpl.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9ncm9vdnkvbGFuZy9NZXRhQ2xhc3NJbXBsLmphdmE=)
| 80.0000% | [0 Missing and 1 partial :warning:
](https://app.codecov.io/gh/apache/groovy/pull/3153?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/3153?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
```diff
@@ Coverage Diff @@
## master #3153 +/- ##
==================================================
+ Coverage 74.1012% 74.1014% +0.0002%
- Complexity 43600 43602 +2
==================================================
Files 1692 1692
Lines 149254 149259 +5
Branches 28286 28287 +1
==================================================
+ Hits 110599 110603 +4
Misses 28475 28475
- Partials 10180 10181 +1
```
| [Files with missing
lines](https://app.codecov.io/gh/apache/groovy/pull/3153?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
| Coverage Δ | |
|---|---|---|
|
[src/main/java/groovy/lang/MetaClassImpl.java](https://app.codecov.io/gh/apache/groovy/pull/3153?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Fgroovy%2Flang%2FMetaClassImpl.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9ncm9vdnkvbGFuZy9NZXRhQ2xhc3NJbXBsLmphdmE=)
| `79.1667% <80.0000%> (+0.0023%)` | :arrow_up: |
... and [9 files with indirect coverage
changes](https://app.codecov.io/gh/apache/groovy/pull/3153/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>
> Writing a property of the enclosing instance from a closure in an inner class
> throws MissingPropertyException unless the receiver is a plain this
> -------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: GROOVY-12627
> URL: https://issues.apache.org/jira/browse/GROOVY-12627
> Project: Groovy
> Issue Type: Bug
> Affects Versions: 6.0.0
> Reporter: Scott Murphy Heiberg
> Priority: Major
>
> {code:groovy}
> class Base {
> private String z = 'outer'
> class Sub extends Base {
> def m() { { -> Sub.this.z = 'w' }(); Base.this.z }
> }
> def t() { new Sub().m() }
> }
> assert new Base().t() == 'w'
> {code}
> Actual: groovy.lang.MissingPropertyException: No such property: z for class:
> Base$Sub
> Expected: 'w'. The write goes to the enclosing instance, as this.z = 'w' in
> the closure does, as Sub.this.z = 'w' outside the closure does, and as
> reading Sub.this.z in the closure does. Groovy 4.0.33, 5.0.8 and 5.1.3 return
> 'w'.
> The same happens for s.z = 'w' with def s = this (also under @TypeChecked),
> for compound assignment and ++, for nested closures and lambdas, for a
> non-subclass inner class (Inner.this.z = 'w'), and for a spread-dot read or
> write in a closure.
> A call site in a closure passes the closure class as the sender. The
> enclosing-instance fallback that GROOVY-11823 added to MetaClassImpl checks
> the nesting of that closure class rather than of the class that declares the
> closure, so it never applies there.
> Seen in 6.0.0 (regression); 4.0.33, 5.0.8 and 5.1.3 work.
> PR: https://github.com/apache/groovy/pull/3153
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)