FIR: Fix builder inference case with independent calls inside lambda
This commit is contained in:
+16
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
-9
@@ -1,9 +0,0 @@
|
||||
// ISSUE: KT-41308
|
||||
|
||||
fun main() {
|
||||
sequence {
|
||||
val list: List<String>? = null
|
||||
val outputList = <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.List<kotlin.String>")!>list ?: listOf()<!>
|
||||
<!NONE_APPLICABLE!>yieldAll<!>(outputList)
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// ISSUE: KT-41308
|
||||
|
||||
fun main() {
|
||||
|
||||
Reference in New Issue
Block a user