[FE 1.0] Imitate having builder inference annotation while trying resolve with a builder inference
^KT-52892 Fixed
This commit is contained in:
+5
@@ -226,6 +226,11 @@ class KotlinConstraintSystemCompleter(
|
||||
if (!argument.atom.hasBuilderInferenceAnnotation && !useBuilderInferenceWithoutAnnotation)
|
||||
continue
|
||||
|
||||
// Imitate having builder inference annotation. TODO: Remove after getting rid of @BuilderInference
|
||||
if (!argument.atom.hasBuilderInferenceAnnotation && useBuilderInferenceWithoutAnnotation) {
|
||||
argument.atom.hasBuilderInferenceAnnotation = true
|
||||
}
|
||||
|
||||
val notFixedInputTypeVariables = argument.inputTypes
|
||||
.flatMap { it.extractTypeVariables() }.filter { it !in fixedTypeVariables }
|
||||
|
||||
|
||||
@@ -209,13 +209,13 @@ fun test() {
|
||||
add("")
|
||||
with (get()) {
|
||||
with (listOf(1)) {
|
||||
<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE, OVERLOAD_RESOLUTION_AMBIGUITY!>bar<!>()
|
||||
<!STUB_TYPE_IN_RECEIVER_CAUSES_AMBIGUITY!><!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE, OVERLOAD_RESOLUTION_AMBIGUITY, OVERLOAD_RESOLUTION_AMBIGUITY_BECAUSE_OF_STUB_TYPES!>bar<!>()<!>
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
put(1, "one")
|
||||
<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE, OVERLOAD_RESOLUTION_AMBIGUITY!>foo11<!>(entries())
|
||||
<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE, OVERLOAD_RESOLUTION_AMBIGUITY, OVERLOAD_RESOLUTION_AMBIGUITY_BECAUSE_OF_STUB_TYPES!>foo11<!>(<!STUB_TYPE_IN_ARGUMENT_CAUSES_AMBIGUITY!>entries()<!>)
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user