Edoardo Luppi
07/02/2023, 8:49 PMPromise { resolve, _ ->
resolve("a string")
}.catch {
12
}.then {
val v: Int = it
println(v) // Expected an Int, but a string is received
}
Big Chungus
07/02/2023, 8:51 PMBig Chungus
07/02/2023, 8:51 PMturansky
07/02/2023, 8:58 PMcatch
call signature is invalid right now.
We will try to fix it here (with other Promise
problems).
In described example second then
will receive data with type String | Int
.Edoardo Luppi
07/02/2023, 9:02 PMString | Int
? Any
?turansky
07/02/2023, 9:10 PMComparable<*>
expectedturansky
07/02/2023, 9:10 PMturansky
07/02/2023, 9:31 PMEdoardo Luppi
07/02/2023, 9:46 PMturansky
07/04/2023, 11:01 PMturansky
07/05/2023, 10:26 AMpre.585
Edoardo Luppi
07/05/2023, 10:56 AM