Hey. I'm seeing a strange behavior where even thou...
# stdlib
g
Hey. I'm seeing a strange behavior where even though a
Result
is wrapping a failure, the
isSuccess
checks return
true
. The behavior matches the debugger output there. What could be going on?
w
I think you’re hitting https://youtrack.jetbrains.com/issue/KT-44527. The
result
should not be another
Result
instance I think, so your result is
Result.Success(Result.Failure)
?
Unless you’re using 1.5.0 already which should have it fixed
g
I'm using 1.5.0. The
Result
I have is the outcome of a
runCatching {}
but it actually seems like
isSuccess() = false
at first, then
isSuccess() = true
when I send/receive it through a channel 🤔
🤔 1
I tried this in the Playground and it just outputs
Copy code
Result 1 is false
Result 2 is false
as expected. But in my case, Result 2 is true. It must be something on my end then