[
https://issues.apache.org/jira/browse/GROOVY-12622?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18135696#comment-18135696
]
ASF GitHub Bot commented on GROOVY-12622:
-----------------------------------------
codecov-commenter commented on PR #3148:
URL: https://github.com/apache/groovy/pull/3148#issuecomment-6540646867
##
[Codecov](https://app.codecov.io/gh/apache/groovy/pull/3148?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.1041%. 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
([`fac7976`](https://app.codecov.io/gh/apache/groovy/commit/fac79764ac91cdc0bb9df10657aca6fe84e66872?dropdown=coverage&el=desc&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/3148?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
```diff
@@ Coverage Diff @@
## master #3148 +/- ##
==================================================
+ Coverage 74.1012% 74.1041% +0.0029%
- Complexity 43600 43604 +4
==================================================
Files 1692 1692
Lines 149254 149259 +5
Branches 28286 28286
==================================================
+ Hits 110599 110607 +8
+ Misses 28475 28472 -3
Partials 10180 10180
```
| [Files with missing
lines](https://app.codecov.io/gh/apache/groovy/pull/3148?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
| Coverage Δ | |
|---|---|---|
|
[...taticTypesBinaryExpressionMultiTypeDispatcher.java](https://app.codecov.io/gh/apache/groovy/pull/3148?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fclassgen%2Fasm%2Fsc%2FStaticTypesBinaryExpressionMultiTypeDispatcher.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2NsYXNzZ2VuL2FzbS9zYy9TdGF0aWNUeXBlc0JpbmFyeUV4cHJlc3Npb25NdWx0aVR5cGVEaXNwYXRjaGVyLmphdmE=)
| `86.7470% <100.0000%> (+0.4116%)` | :arrow_up: |
... and [12 files with indirect coverage
changes](https://app.codecov.io/gh/apache/groovy/pull/3148/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 evaluates the operand twice for ++ and -- on a non-primitive property or
> subscript
> -------------------------------------------------------------------------------------
>
> Key: GROOVY-12622
> URL: https://issues.apache.org/jira/browse/GROOVY-12622
> Project: Groovy
> Issue Type: Bug
> Affects Versions: 4.0.33, 5.0.8, 6.0.0
> Reporter: Scott Murphy Heiberg
> Priority: Major
>
> {code:groovy}
> @groovy.transform.CompileStatic
> class Box {
> int gets = 0
> BigDecimal d = 1
> BigDecimal getD() { gets++; d }
> void setD(BigDecimal v) { d = v }
> }
> @groovy.transform.CompileStatic
> def m() { def b = new Box(); b.d++; [b.gets, b.@d] }
> assert m() == [1, 2]
> @groovy.transform.CompileStatic
> def n() { int idx = 0; List<Integer> list = [10, 20]; def r = list[idx++]++;
> [idx, list, r] }
> assert n() == [1, [11, 20], 10]
> {code}
> Actual: m() returns [2, 2] (getD is called twice), and n() returns [2, [21,
> 20], 10]: the index expression runs twice and the incremented value of
> list[1] is stored into list[0].
> Expected: [1, 2] and [1, [11, 20], 10], as in dynamic Groovy and with
> @TypeChecked.
> When next() or previous() has a resolved target,
> StaticTypesBinaryExpressionMultiTypeDispatcher.writePostOrPrefixMethod
> discards the operand value already loaded and makes the call on the operand
> expression again. That evaluates the getter or getAt (and a subscript's
> receiver and index) a second time.
> Seen in 4.0.33, 5.0.8 and 6.0.0.
> PR: https://github.com/apache/groovy/pull/3148
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)