FIR: substitute the whole lambda body after builder inference

This commit is contained in:
Tianyu Geng
2021-07-26 15:56:56 -07:00
committed by teamcityserver
parent f737d8002e
commit 0026560bd7
7 changed files with 30 additions and 27 deletions
@@ -10,7 +10,7 @@ fun main() {
buildList {
add(3)
object : A {
override fun foo(): MutableList<String> = this@buildList
override fun foo(): MutableList<String> = <!RETURN_TYPE_MISMATCH!>this@buildList<!>
}
}
buildList {
@@ -19,12 +19,12 @@ fun main() {
}
buildList {
add("3")
val x: MutableList<Int> = this@buildList
val x: MutableList<Int> = <!INITIALIZER_TYPE_MISMATCH!>this@buildList<!>
}
buildList {
val y: CharSequence = ""
add(y)
val x: MutableList<String> = this@buildList
val x: MutableList<String> = <!INITIALIZER_TYPE_MISMATCH!>this@buildList<!>
}
buildList {
add("")