[NI] Avoid builder-inference algorithm if types specified explicitly

#KT-30620 Fixed
This commit is contained in:
Mikhail Zarechenskiy
2019-03-26 14:09:56 +03:00
parent 1ac3542036
commit b033b9180b
5 changed files with 72 additions and 0 deletions
@@ -236,6 +236,9 @@ internal object PostponedVariablesInitializerResolutionPart : ResolutionPart() {
val receiverType = parameter.type.getReceiverTypeFromFunctionType() ?: continue
for (freshVariable in resolvedCall.substitutor.freshVariables) {
if (resolvedCall.typeArgumentMappingByOriginal.getTypeArgument(freshVariable.originalTypeParameter) is SimpleTypeArgument)
continue
if (csBuilder.isPostponedTypeVariable(freshVariable)) continue
if (receiverType.contains { it.constructor == freshVariable.originalTypeParameter.typeConstructor }) {
csBuilder.markPostponedVariable(freshVariable)