FirCallResolve: disable property resolve optimization in builder inference

#KT-57889 Fixed
This commit is contained in:
Mikhail Glukhikh
2023-04-17 19:38:02 +02:00
committed by Space Team
parent f9a7a7fda2
commit 9374202ebc
7 changed files with 58 additions and 23 deletions
@@ -1,4 +1,5 @@
// !LANGUAGE: +NoBuilderInferenceWithoutAnnotationRestriction
// FIR_DUMP
class Foo<T : Any> {
fun doSmthng(arg: T) {}
@@ -11,11 +12,11 @@ fun main(arg: Any) {
val x = 57
val value = myBuilder {
doSmthng("one ")
a = <!ASSIGNMENT_TYPE_MISMATCH!>57<!>
a = <!ASSIGNMENT_TYPE_MISMATCH!>x<!>
a = 57
a = x
if (arg is String) {
a = arg
}
}
println(value.a?.count { it in 'l' .. 'q' })
<!OVERLOAD_RESOLUTION_AMBIGUITY!>println<!>(value.a?.<!UNRESOLVED_REFERENCE!>count<!> { <!UNRESOLVED_REFERENCE!>it<!> in 'l' .. 'q' })
}