[NI] Keep track of fresh type variables created for particular call candidate

Otherwise we can't obtain inferred type arguments for the call,
which is required for reification.
This commit is contained in:
Dmitry Petrov
2017-04-14 15:33:04 +03:00
committed by Stanislav Erokhin
parent eb7e9196b5
commit 13e8720ddc
5 changed files with 10 additions and 10 deletions
@@ -350,12 +350,7 @@ class NewResolvedCallImpl<D : CallableDescriptor>(
override fun getTypeArguments(): Map<TypeParameterDescriptor, KotlinType> {
val typeParameters = candidateDescriptor.typeParameters.takeIf { it.isNotEmpty() } ?: return emptyMap()
val result = HashMap<TypeParameterDescriptor, UnwrappedType>()
for ((parameter, argument) in typeParameters.zip(completedCall.typeArguments)) {
result[parameter] = argument
}
return result
return typeParameters.zip(completedCall.typeArguments).toMap()
}
override fun getSmartCastDispatchReceiverType(): KotlinType? = null // todo