https://kotlinlang.org logo
#coroutines
Title
# coroutines
r

Rob

12/15/2020, 5:07 PM
I’m getting this compiler crash when compiling this suspend function that I’ve simplified for illustration. Where should I report the bug?
Copy code
private val events: MutableSharedFlow<Unit> =
    MutableSharedFlow()

fun foo(): Pair<String, String>? = null

private suspend fun bar(): String = events
    .transform {
        emit(
            foo()
                ?.let { it.first }
                ?: return@transform
        )
    }
    .first()
2 Views