[
https://issues.apache.org/jira/browse/GROOVY-12714?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18140210#comment-18140210
]
ASF GitHub Bot commented on GROOVY-12714:
-----------------------------------------
testlens-app[bot] commented on PR #3246:
URL: https://github.com/apache/groovy/pull/3246#issuecomment-6705212824
## ✅ All tests passed ✅
🏷️ Commit: 619188437742b210e87ff73d74832b69209ab844
▶️ Tests: 130450 executed
⚪️ Checks: 26/26 completed
---
_Learn more about TestLens at
[testlens.app/docs](https://testlens.app/docs/features/pr-comment/)._
> `@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)