[ 
https://issues.apache.org/jira/browse/GROOVY-12097?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18090797#comment-18090797
 ] 

ASF GitHub Bot commented on GROOVY-12097:
-----------------------------------------

codecov-commenter commented on PR #2620:
URL: https://github.com/apache/groovy/pull/2620#issuecomment-4775406786

   ## 
[Codecov](https://app.codecov.io/gh/apache/groovy/pull/2620?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 `6 lines` in your changes missing 
coverage. Please review.
   :white_check_mark: Project coverage is 68.4598%. Comparing base 
([`40c6203`](https://app.codecov.io/gh/apache/groovy/commit/40c62030da295c38d1f851fdff15802f4cac4889?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache))
 to head 
([`444ed10`](https://app.codecov.io/gh/apache/groovy/commit/444ed10ddc6a75059342f1fd4bcb845fa54d2b93?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   :warning: Report is 4 commits behind head on master.
   
   | [Files with missing 
lines](https://app.codecov.io/gh/apache/groovy/pull/2620?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 | Patch % | Lines |
   |---|---|---|
   | 
[...us/groovy/classgen/asm/BinaryExpressionHelper.java](https://app.codecov.io/gh/apache/groovy/pull/2620?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fclassgen%2Fasm%2FBinaryExpressionHelper.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2NsYXNzZ2VuL2FzbS9CaW5hcnlFeHByZXNzaW9uSGVscGVyLmphdmE=)
 | 80.0000% | [1 Missing and 5 partials :warning: 
](https://app.codecov.io/gh/apache/groovy/pull/2620?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>
   
   
   
   [![Impacted file tree 
graph](https://app.codecov.io/gh/apache/groovy/pull/2620/graphs/tree.svg?width=650&height=150&src=pr&token=1r45138NfQ&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)](https://app.codecov.io/gh/apache/groovy/pull/2620?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   
   ```diff
   @@                Coverage Diff                 @@
   ##               master      #2620        +/-   ##
   ==================================================
   + Coverage     68.4541%   68.4598%   +0.0056%     
   - Complexity      33505      33522        +17     
   ==================================================
     Files            1518       1518                
     Lines          127107     127136        +29     
     Branches        23065      23076        +11     
   ==================================================
   + Hits            87010      87037        +27     
   + Misses          32371      32370         -1     
   - Partials         7726       7729         +3     
   ```
   
   | [Files with missing 
lines](https://app.codecov.io/gh/apache/groovy/pull/2620?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 | Coverage Δ | |
   |---|---|---|
   | 
[...us/groovy/classgen/asm/BinaryExpressionHelper.java](https://app.codecov.io/gh/apache/groovy/pull/2620?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fclassgen%2Fasm%2FBinaryExpressionHelper.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2NsYXNzZ2VuL2FzbS9CaW5hcnlFeHByZXNzaW9uSGVscGVyLmphdmE=)
 | `88.3970% <80.0000%> (-0.4209%)` | :arrow_down: |
   
   ... and [4 files with indirect coverage 
changes](https://app.codecov.io/gh/apache/groovy/pull/2620/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>




> a[index] = expr evaluates RHS before index, breaking left-to-right evaluation 
> order
> -----------------------------------------------------------------------------------
>
>                 Key: GROOVY-12097
>                 URL: https://issues.apache.org/jira/browse/GROOVY-12097
>             Project: Groovy
>          Issue Type: Bug
>            Reporter: Paul King
>            Priority: Major
>
> bq. AI read: The intent of GROOVY-2556 was to stop double-evaluating the 
> object/index in compound subscript assignments (x[i] += v) — the first hunk 
> of that commit. Reordering plain = was an unintended side effect of the 
> "related problems" cleanup.
> GROOVY-2556 fixed some cases involved array expressions with side effects but 
> also changed the index value on the LHS of an assignment. The following Java 
> and Groovy program gave the same result prior to the change (Groovy 1.5.2ish) 
> but the behavior below since then:
> {code:groovy}
> public class C {
>   public static void main(String[] args) {
>     int[] a = new int[]{-1, -1, -1, -1};
>     int x = 0;
>     int y = 3;
>     a[x] = x++;
>     a[y] = --y;
>     System.out.println("[" + a[0] + "," + a[1] + "," + a[2] + "," + a[3] + 
> "]");
>     // Groovy: [-1,0,2,-1], Java: [0,-1,-1,2]
>   }
> }
> {code}
> JLS Links for comparison with Java (Java SE 21 JLS):
> * §15.7 (left-to-right): 
> https://docs.oracle.com/javase/specs/jls/se21/html/jls-15.html#jls-15.7
> * §15.26.1 (the array-assignment order): 
> https://docs.oracle.com/javase/specs/jls/se21/html/jls-15.html#jls-15.26.1



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to