Skip to content

Conversation

@kyay10
Copy link
Collaborator

@kyay10 kyay10 commented Dec 31, 2025

|| contracts don't result in smart casts. They really should, but in the meantime, doing blah !is SomeIorSubclass works well, and is shorter!
The removed contracts are clearly invalid. Consider when the relevant predicate(s) are { false }. The functions then return false, but that tells us nothing about the type of the Ior.
E.g. isBoth({false}) {false} is always false, no matter the Ior, so it doesn't mean that the Ior isn't Both.

@kyay10 kyay10 requested a review from serras December 31, 2025 04:42
@github-actions
Copy link
Contributor

Kover Report

File Coverage [84.00%]
arrow-libs/core/arrow-core/src/commonMain/kotlin/arrow/core/Ior.kt 84.00%
Total Project Coverage 47.65%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants