[FE 1.0] Substituted possible fixed type variables after completion in accordance with @OverloadResolutionByLambdaReturnType

^KT-48031 Fixed
This commit is contained in:
Victor Petukhov
2022-07-02 12:07:46 +02:00
committed by teamcity
parent 5b5da025f4
commit 3ed87c29c7
9 changed files with 69 additions and 5 deletions
@@ -0,0 +1,15 @@
// FIR_IDENTICAL
// WITH_STDLIB
class Flow<out T>
@OverloadResolutionByLambdaReturnType
@OptIn(kotlin.experimental.ExperimentalTypeInference::class)
fun <T> Flow<T>.debounce(timeoutMillis: (T) -> Long): Flow<T> = this
@JvmName("debounceDuration")
@OptIn(kotlin.experimental.ExperimentalTypeInference::class)
@OverloadResolutionByLambdaReturnType
fun <T> Flow<T>.debounce(timeout: (T) -> String): Flow<T> = this
fun invalidFlow(x: Flow<Int>): Flow<Int> = x.debounce { value -> 0 }