// TARGET_BACKEND: JVM // WITH_STDLIB // ISSUE: KT-33545 import kotlin.experimental.ExperimentalTypeInference interface Flow { suspend fun collect(collector: FlowCollector) } interface FlowCollector { suspend fun emit(value: T) } inline fun Flow.collect(crossinline action: suspend (value: T) -> Unit): Unit {} abstract class LiveData interface LiveDataScope { suspend fun emit(value: T) } @OptIn(ExperimentalTypeInference::class) fun liveData(@BuilderInference block: suspend LiveDataScope.() -> Unit): LiveData = null!! fun Flow.asLiveData() = liveData { collect(this::emit) // collect { emit(it) } } fun box(): String = "OK"