So, not sure if it's a bug or am I not using the operator right.
Maybe.empty<Int>()
.switchIfEmpty { Maybe.just(2) }
.subscribe {
println("got $it")
}
Block above completes without any results as if Maybe is empty. While block below completes successfully with got 2 output.
Maybe.empty<Int>()
.switchIfEmpty(Maybe.just(2))
.subscribe {
println("got $it")
}
From documentation I expect, that both cases should work the same.
So, not sure if it's a bug or am I not using the operator right.
Block above completes without any results as if
Maybeis empty. While block below completes successfully withgot 2output.From documentation I expect, that both cases should work the same.