After I ran the
migration script, there was 1 thing that wasn’t automatically fixable in my codebase, and that was the Option has a function with the signature
public suspend fun <B> Option<B>.bind(shift: () -> R): B
but with the new Raise scope nothing exists.
My use case was that I was basically doing
someList.firstOrNone { it.someCheck }.bind { ErrorType }
and there was nothing that the IDE could help me with, it was simply red in this case.
I’ll simply move over to using firstOrNull and deal with the null type with a simple
ensureNotNull
instead of getting an Option in the first place, but just thought I’d let you know of this edge case. Not sure if you want to have things to cover
all cases, so just writing this here so you know 😊