[FE 1.0] Introduce deprecation of inferred type variable into a declared upper bound within a builder inference call

This commit is contained in:
Victor Petukhov
2022-05-31 13:42:35 +02:00
committed by teamcity
parent 848075192c
commit b472ccd358
31 changed files with 300 additions and 35 deletions
@@ -1,3 +1,4 @@
// !RENDER_DIAGNOSTICS_FULL_TEXT
fun <T> flowOf(value: T): Flow<T> = TODO()
interface FlowCollector<in T> {}
@@ -8,5 +9,5 @@ fun <T, R> Flow<T>.transform(transform: FlowCollector<R>.(T) -> Unit): Flow<R> =
fun f() {
fun <T> doEmit(collector: FlowCollector<T>) {}
flowOf(1).<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>transform<!> { doEmit(this) }
flowOf(1).<!INFERRED_INTO_DECLARED_UPPER_BOUNDS!>transform<!> { doEmit(this) }
}