-
Notifications
You must be signed in to change notification settings - Fork 451
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Either
deprecation replacement expressions
#2973
Conversation
Either
deprecation replacement expressionEither
deprecation replacement expressions
Kover Report
|
arrow-libs/core/arrow-core/src/commonMain/kotlin/arrow/core/Either.kt
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @gutiory!
…ther.kt Co-authored-by: Francisco Diaz <[email protected]>
RedundantAPI + "Prefer zipOrAccumulate", | ||
ReplaceWith("Either.zipOrAccumulate({ a, bb -> SGA.run { a.combine(bb) } }, this, b) { a, bb -> SGB.run { a.combine(bb) } }") | ||
ReplaceWith("Either.zipOrAccumulate<A, B, B, B>({ a:A, bb:A -> a.plus(bb) }, this, b) { a:B, bb:B -> a.plus(bb) }") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: Was the SGA.run { a.combine(bb) }
here broken? If yes, then I think this is an improvement but we should probably just use a + b
instead of a.plus(b)
or is that also broken? 😅
Perhaps we should also add in the description that for custom types, plus
needs to be replaced with a custom combine
function?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+
works fine! Thanks @nomisRev . See 6332005
(#2973)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really awesome @gutiory. Thank you so much 😘 One question/remark.
This PR fixes some of the deprecation
ReplaceWith
suggestions forEither
listed in #2964. I'll update the issue table once this is merged.