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:
Simon Ogorodnik
2023-11-29 11:58:29 +01:00
committed by Space Team
parent cb3d65f669
commit 2f367b013a
26 changed files with 99 additions and 62 deletions
@@ -7,7 +7,7 @@ fun <T : Any> myBuilder(block: Foo<T>.() -> Unit) : Foo<T> = Foo<T>().apply(bloc
fun main(arg: Any) {
val x = 57
val value = myBuilder {
val value = <!NEW_INFERENCE_ERROR!>myBuilder {
doSmthng("one ")
run { a; this }.a = 10
<!BUILDER_INFERENCE_STUB_RECEIVER!>a += 1<!>
@@ -19,6 +19,6 @@ fun main(arg: Any) {
if (arg is String) {
a = arg
}
}
}<!>
<!OVERLOAD_RESOLUTION_AMBIGUITY!>println<!>(value.a?.<!UNRESOLVED_REFERENCE!>count<!> { <!UNRESOLVED_REFERENCE!>it<!> in 'l' .. 'q' })
}