K2: implement BUILDER_INFERENCE_MULTI_LAMBDA_RESTRICTION

#KT-59390 Fixed
This commit is contained in:
Mikhail Glukhikh
2023-11-29 08:09:41 +01:00
committed by Space Team
parent 299d279915
commit 526bc1744a
25 changed files with 219 additions and 23 deletions
@@ -3,7 +3,7 @@
fun test() {
foo(
flow { emit(0) }
) { <!BUILDER_INFERENCE_STUB_RECEIVER!>it.collect <!TOO_MANY_ARGUMENTS!>{}<!><!> }
) <!BUILDER_INFERENCE_MULTI_LAMBDA_RESTRICTION!>{ <!BUILDER_INFERENCE_STUB_RECEIVER!>it.collect <!TOO_MANY_ARGUMENTS!>{}<!><!> }<!>
// 0. Initial
// W <: Any / declared upper bound
@@ -53,4 +53,4 @@ class FlowCollectorImpl<C> : FlowCollector<C> {
override fun emit(value: C) {}
}
fun Flow<*>.collect() {}
fun Flow<*>.collect() {}