[NI] Avoid type capturing for types that can contain type variables

This commit is contained in:
Mikhail Zarechenskiy
2017-08-17 14:36:56 +03:00
committed by Stanislav Erokhin
parent e040a317cc
commit 08964006de
7 changed files with 75 additions and 1 deletions
@@ -224,7 +224,9 @@ internal fun createSimplePSICallArgument(
ownerDescriptor, bindingContext,
typeInfoForArgument.dataFlowInfo, // dataFlowInfoBeforeThisArgument cannot be used here, because of if() { if (x != null) return; x }
ExpressionReceiver.create(ktExpression, baseType, bindingContext)
).prepareReceiverRegardingCaptureTypes()
).let {
if (onlyResolvedCall == null) it.prepareReceiverRegardingCaptureTypes() else it
}
return if (onlyResolvedCall == null) {
ExpressionKotlinCallArgumentImpl(valueArgument, dataFlowInfoBeforeThisArgument, typeInfoForArgument.dataFlowInfo, receiverToCast)