[FE 1.0] Don't try to report specialized resolution ambiguity error for builder inference if the corresponding substitutor is empty
^KT-50989 Fixed
This commit is contained in:
committed by
teamcity
parent
eeadd8588d
commit
1a23cd8c45
+2
-2
@@ -76,8 +76,8 @@ class ResolutionWithStubTypesChecker(private val kotlinCallResolver: KotlinCallR
|
||||
val builderInferenceSession = lambda.builderInferenceSession as BuilderInferenceSession
|
||||
val stubVariablesSubstitutor = builderInferenceSession.getNotFixedToInferredTypesSubstitutor()
|
||||
val variablesForUsedStubTypes = builderInferenceSession.getUsedStubTypes().map { it.originalTypeVariable }
|
||||
val typeVariablesSubstitutionMap = (builderInferenceSession.getCurrentSubstitutor() as NewTypeSubstitutorByConstructorMap).map
|
||||
.filterKeys { it in variablesForUsedStubTypes }
|
||||
val substitutor = builderInferenceSession.getCurrentSubstitutor() as? NewTypeSubstitutorByConstructorMap ?: return
|
||||
val typeVariablesSubstitutionMap = substitutor.map.filterKeys { it in variablesForUsedStubTypes }
|
||||
|
||||
val newReceiverArgument = receiverValue?.buildSubstitutedReceiverArgument(stubVariablesSubstitutor, context)
|
||||
val newArguments = valueArguments.replaceTypes(context, resolutionCallbacks) { _, type ->
|
||||
|
||||
Reference in New Issue
Block a user