Coroutines Riddle: What happens when you execute t...
# coroutines
p
Coroutines Riddle: What happens when you execute this with coroutines 1.4.0?
Copy code
inline class A(val value: String)

fun main() {
    runBlocking {
        val aFlow = flowOf(A("Hello"))
        combine(aFlow, aFlow) { a, b ->
            a to b
        }.toList()
    }
}
t
I have
java.lang.ClassCastException: A cannot be cast to java.lang.String
... probably an issue with boxed inline classes
m
It no longer crashes on certain Android 7 devices? 😆 🤷‍♂️
I guess I was referring to usage of `combine`; not the actual usage of
fun main
🙂
p
@Marcelo Hernandez Ha, that was my issue 😍
😄 1
m