[NI] Don't try inferring variables for effectively empty system
This commit is contained in:
Vendored
+28
-1
@@ -12,7 +12,29 @@ fun test() {
|
||||
flow {
|
||||
emit(1)
|
||||
}.flatMapLatest<Int, Long> {
|
||||
flow {}
|
||||
flow {
|
||||
expectInt(42)
|
||||
}
|
||||
}
|
||||
|
||||
flow {
|
||||
emit(1)
|
||||
}.flatMapLatest<Int, Long> {
|
||||
flow {
|
||||
expectInt(42)
|
||||
hang {
|
||||
expectInt(0)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
flow {
|
||||
emit(1)
|
||||
}.flatMap {
|
||||
if (it == 1)
|
||||
flow { expectGeneric(42) }
|
||||
else
|
||||
flow<Int> {}
|
||||
}
|
||||
|
||||
flow {
|
||||
@@ -33,6 +55,11 @@ fun test() {
|
||||
}
|
||||
}
|
||||
|
||||
fun expectInt(i: Int) {}
|
||||
fun <K> expectGeneric(i: K) {}
|
||||
|
||||
suspend inline fun hang(onCancellation: () -> Unit) {}
|
||||
|
||||
fun <T> Flow<T>.flatMap(mapper: suspend (T) -> Flow<T>): Flow<T> = TODO()
|
||||
|
||||
@OptIn(ExperimentalTypeInference::class)
|
||||
|
||||
Reference in New Issue
Block a user