K2: Don't lose constraint errors in the builder inference session
Pass constraint errors from the integration system into a candidate to make sure it is reported later. Related to KT-59426, KT-59437, KT-53749 #KT-55168 Submitted
This commit is contained in:
committed by
Space Team
parent
cb3d65f669
commit
2f367b013a
Vendored
+4
-4
@@ -13,10 +13,10 @@ fun main() {
|
||||
override fun foo(): MutableList<String> = <!RETURN_TYPE_MISMATCH!>this@buildList<!>
|
||||
}
|
||||
}
|
||||
buildList {
|
||||
<!NEW_INFERENCE_ERROR!>buildList {
|
||||
add(3)
|
||||
val x: String = <!INITIALIZER_TYPE_MISMATCH!>get(0)<!>
|
||||
}
|
||||
}<!>
|
||||
buildList {
|
||||
add("3")
|
||||
val x: MutableList<Int> = <!INITIALIZER_TYPE_MISMATCH!>this@buildList<!>
|
||||
@@ -26,8 +26,8 @@ fun main() {
|
||||
add(y)
|
||||
val x: MutableList<String> = <!INITIALIZER_TYPE_MISMATCH!>this@buildList<!>
|
||||
}
|
||||
buildList {
|
||||
<!NEW_INFERENCE_ERROR!>buildList {
|
||||
add("")
|
||||
val x: StringBuilder = <!INITIALIZER_TYPE_MISMATCH!>get(0)<!>
|
||||
}
|
||||
}<!>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user