[NI] Propagate information about safe call to receiver argument

This commit is contained in:
Mikhail Zarechenskiy
2017-06-06 18:02:21 +03:00
parent 72d14bfe0d
commit 8670d2abba
@@ -66,11 +66,13 @@ class KotlinCallResolver(
): Collection<ResolvedKotlinCall> {
kotlinCall.checkCallInvariants()
val isSafeCall = (kotlinCall.explicitReceiver as? SimpleKotlinCallArgument)?.isSafeCall ?: false
val resolutionCandidates = givenCandidates.map {
SimpleKotlinResolutionCandidate(callContext,
kotlinCall,
if (it.dispatchReceiver == null) ExplicitReceiverKind.NO_EXPLICIT_RECEIVER else ExplicitReceiverKind.DISPATCH_RECEIVER,
it.dispatchReceiver?.let { ReceiverExpressionKotlinCallArgument(it) },
it.dispatchReceiver?.let { ReceiverExpressionKotlinCallArgument(it, isSafeCall) },
null,
it.descriptor,
it.knownTypeParametersResultingSubstitutor,