FIR: Fix builder inference case with independent calls inside lambda

This commit is contained in:
Denis.Zharkov
2021-01-29 18:51:20 +03:00
parent 29ac4cb9cc
commit e7669ef9d6
7 changed files with 82 additions and 16 deletions
@@ -0,0 +1,16 @@
// FIR_IDENTICAL
// SKIP_TXT
class A {
lateinit var m: Map<String, Int>
@ExperimentalStdlibApi
fun foo(xs: Collection<List<String>>) {
m = buildMap {
// flatMap calls might be completed on early phase
for (x in xs.flatMap { it.toList() }) {
put(x, x.length)
}
}
}
}