Resolve calls using the builder inference despite the presence of the annotation if there are uninferred type variables

^KT-48194 Fixed
This commit is contained in:
Victor Petukhov
2021-08-19 09:08:39 +03:00
committed by TeamCityServer
parent 55811c8851
commit bf1e68a53f
17 changed files with 104 additions and 9 deletions
@@ -0,0 +1,12 @@
// WITH_RUNTIME
// DONT_TARGET_EXACT_BACKEND: WASM
// !LANGUAGE: -UseBuilderInferenceWithoutAnnotation
fun <K, V> buildMap(builderAction: MutableMap<K, V>.() -> Unit): Map<K, V> = mapOf()
fun box(): String {
val x = <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER, NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>buildMap<!> {
put("", "")
}
return "OK"
}
@@ -0,0 +1,12 @@
// WITH_RUNTIME
// DONT_TARGET_EXACT_BACKEND: WASM
// !LANGUAGE: -UseBuilderInferenceWithoutAnnotation
fun <K, V> buildMap(builderAction: MutableMap<K, V>.() -> Unit): Map<K, V> = mapOf()
fun box(): String {
val x = <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>buildMap<!> {
put("", "")
}
return "OK"
}
@@ -0,0 +1,5 @@
package
public fun box(): kotlin.String
public fun </*0*/ K, /*1*/ V> buildMap(/*0*/ builderAction: kotlin.collections.MutableMap<K, V>.() -> kotlin.Unit): kotlin.collections.Map<K, V>