[
https://issues.apache.org/jira/browse/GROOVY-12000?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18113557#comment-18113557
]
ASF GitHub Bot commented on GROOVY-12000:
-----------------------------------------
testlens-app[bot] commented on PR #2914:
URL: https://github.com/apache/groovy/pull/2914#issuecomment-5609453946
## ✅ All tests passed ✅
🏷️ Commit: 88971c62788405dcbcea01fc4cb8da4a4a927e22
▶️ Tests: 116925 executed
⚪️ Checks: 32/32 completed
---
_Learn more about TestLens at
[testlens.app/docs](https://testlens.app/docs/features/pr-comment/)._
> STC: instanceof or combined with not
> ------------------------------------
>
> Key: GROOVY-12000
> URL: https://issues.apache.org/jira/browse/GROOVY-12000
> Project: Groovy
> Issue Type: Bug
> Components: Static Type Checker
> Affects Versions: 6.0.0-alpha-1
> Reporter: Eric Milles
> Priority: Major
>
> Consider the following:
> {code:groovy}
> @groovy.transform.TypeChecked
> void test(Number number) {
> if (!(number instanceof Cloneable || number instanceof Closeable)) {
> number
> } else {
> number
> }
> }
> {code}
> Currently this passes the check for "can invert" and produces a type like
> (Number & (Cloneable | Closeable))" for the else path. Not sure if we're
> ready for that or not.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)