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

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

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

   ## 🚨 TestLens detected 1 failed test 🚨
   
   ### Test Summary
   > [!TIP]
   > Inspect all details with the [TestLens 
CLI](https://testlens.app/docs/features/cli): `testlens pr 3246`
   
   #### [Build and test / lts \(17, 
macos-latest\)](https://github.com/apache/groovy/actions/runs/42257292740/job/128027971640?pr=3246)
 > :test
   
   | Test | Runs | Flakiness |
   |---|---|--:|
   | Groovy9338 > testGenericsUnsatisfied1\(\) | ❌ | 0% 🟢 |
   
   🏷️ Commit: fb8061cdda6df6afaccf3b2f41d3490b980f901c
   ▶️ Tests:  19384 executed
   🟡 Checks: 15/35 completed
   
   ### Test Failures
   
   <details><summary><strong>Groovy9338 > testGenericsUnsatisfied1()</strong> 
(:test in <a 
href="https://github.com/apache/groovy/actions/runs/42257292740/job/128027971640?pr=3246";>Build
 and test / lts (17, macos-latest)</a>)</summary>
   
   ```
   java.lang.AssertionError: Script should have failed
        at groovy.test.GroovyAssert.fail(GroovyAssert.java:121)
        at groovy.test.GroovyAssert.shouldFail(GroovyAssert.java:156)
        at groovy.test.GroovyAssert.shouldFail(GroovyAssert.java:134)
        at bugs.Groovy9338.testGenericsUnsatisfied1(Groovy9338.groovy:29)
   ```
   
   </details>
   
   ### Rerun Controls
   > [!NOTE]
   > Checks are currently running using the configuration below.
   
   Select tests to mute in this pull request:
   
   🔲 Groovy9338 > testGenericsUnsatisfied1\(\) <!

> `@CompileStatic` PECS wildcard containment diverges from javac (JLS 4.5.1)
> --------------------------------------------------------------------------
>
>                 Key: GROOVY-12714
>                 URL: https://issues.apache.org/jira/browse/GROOVY-12714
>             Project: Groovy
>          Issue Type: Bug
>          Components: Static Type Checker
>            Reporter: Daniel Sun
>            Priority: Major
>
> h2. Problem
> Under {{@CompileStatic}}, Groovy's generics / wildcard containment was more 
> permissive than javac for several JLS 4.5.1 PECS cases, including:
> * adding a non-subtype into {{List<? super Integer>}} (e.g. {{add(Double)}})
> * treating {{? extends Number}} as contained in {{? extends Integer}} (and 
> the dual lower-bound mistake)
> * assigning a wildcard producer {{List<? extends Number>}} to an invariant 
> {{List<Number>}}
> h2. Fix
> Align containment and capture write checks with JLS SE 25 §§4.5.1, 4.5.2, 
> 4.10.2, 5.1.10 so {{@CompileStatic}} matches javac.
> h2. Tests
> Extend {{gls.generics.GenericsJavaCompatibilityTest}} with PECS containment / 
> transfer / negative cases that both compilers must agree on.
> h2. PR
> https://github.com/apache/groovy/pull/3246



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to