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

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

testlens-app[bot] commented on PR #2620:
URL: https://github.com/apache/groovy/pull/2620#issuecomment-4775336984

   ## 🚨 TestLens detected 1 failed test 🚨
   
   Here is what you can do:
   
   1) Inspect the test failures carefully.
   2) If you are convinced that some of the tests are flaky, you can mute them 
below.
   3) Finally, trigger a rerun by checking the rerun checkbox.
   
   ### Test Summary
   
   #### [Build and test / lts \(17, 
macos-latest\)](https://github.com/apache/groovy/actions/runs/27999686614/job/82869181938?pr=2620)
 > :test
   
   | Test | Runs |
   |---|---|
   | ActorTest > testScheduleAtFixedRateCancelStopsFurtherFires\(\) | ❌ |
   
   🏷️ Commit: 444ed10ddc6a75059342f1fd4bcb845fa54d2b93
   ▶️ Tests:  41079 executed
   🟡 Checks: 5/28 completed
   
   ### Test Failures
   
   <details>
   
   <summary><strong>ActorTest > 
testScheduleAtFixedRateCancelStopsFurtherFires()</strong> (:test in <a 
href="https://github.com/apache/groovy/actions/runs/27999686614/job/82869181938?pr=2620";>Build
 and test / lts (17, macos-latest)</a>)</summary>
   
   ```
   java.lang.AssertionError: expected 2 or 3 ticks (got 4). Expression: (n in 
[2, 3]). Values: n = 4
        at 
org.codehaus.groovy.runtime.InvokerHelper.createAssertError(InvokerHelper.java:402)
        at TestScript20.run(TestScript20.groovy:28)
        at groovy.lang.GroovyShell.evaluate(GroovyShell.java:553)
        at groovy.lang.GroovyShell.evaluate(GroovyShell.java:588)
        at groovy.lang.GroovyShell.evaluate(GroovyShell.java:572)
        at groovy.test.GroovyAssert.assertScript(GroovyAssert.java:106)
        at groovy.test.GroovyAssert.assertScript(GroovyAssert.java:96)
        at 
groovy.concurrent.ActorTest.testScheduleAtFixedRateCancelStopsFurtherFires(ActorTest.groovy:1372)
   ```
   
   </details>
   
   ### Muted Tests
   > [!NOTE]
   > Checks are currently running using the configuration below.
   
   Select tests to mute in this pull request:
   
   🔲 ActorTest > testScheduleAtFixedRateCancelStopsFurtherFires\(\) <!

> 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