I don't know if this expected or if we're using th...
# arrow
s
I don't know if this expected or if we're using this incorrectly, but we get a lot of warnings in our code when turning on the newish Kotlin return value checker ("-Xreturn-value-checker=check") in combination with RaiseAccumulate:
Copy code
import arrow.core.raise.context.RaiseAccumulate
import arrow.core.raise.context.ensureOrAccumulate

context(_: RaiseAccumulate<StateFailure>)
private fun checkCase(expected: ExpectedKnownCase, actual: KnownCase) {
    ensureOrAccumulate(expected.isArt11Workaround == null ||       
                       expected.isArt11Workaround == actual.isArt11Workaround) {
        StateFailure("Unexpected case Article 11 workaround flag.")
    }
}
All the
ensureOrAccumulate
usages are marked with
Unused return value of 'ensureOrAccumulate'.
Is the fix just to suppress these warnings?
s
Hey @strindberg, It was fixed here, github.com/arrow-kt/arrow/pull/3932. You can try 2.3.0-alpha.4 to try the fix ☺️ It'll be released probably next month after the summer.
s
Great! I had missed that. Thank you for the quick reply, I'll check with the alpha release.
🙌 1