[NI] Do not use return type from 'onlyResolvedCall'

This commit is contained in:
Dmitry Petrov
2017-06-08 18:40:31 +03:00
committed by Mikhail Zarechenskiy
parent 5b2e66f0ca
commit 397e04f382
2 changed files with 2 additions and 6 deletions
@@ -181,7 +181,7 @@ internal fun createSimplePSICallArgument(
val onlyResolvedCall = ktExpression.getCall(bindingContext)?.let {
bindingContext.get(BindingContext.ONLY_RESOLVED_CALL, it)
}
val baseType = onlyResolvedCall?.currentReturnType ?: typeInfoForArgument.type?.unwrap() ?: return null
val baseType = typeInfoForArgument.type?.unwrap() ?: return null
// we should use DFI after this argument, because there can be some useful smartcast. Popular case: if branches.
val receiverToCast = transformToReceiverWithSmartCastInfo(