[NI] Fix expicit super receiver check

^KT-37497 Fixed
This commit is contained in:
Pavel Kirpichenkov
2020-04-17 12:28:42 +03:00
parent af147017b4
commit b91cf13259
9 changed files with 46 additions and 5 deletions
@@ -65,7 +65,7 @@ class KotlinResolutionStatelessCallbacksImpl(
descriptor,
(kotlinCall as? PSIKotlinCall)?.psiCall,
(resolutionCallbacks as? KotlinResolutionCallbacksImpl)?.trace?.bindingContext,
isSuperOrDelegatingConstructorCall(kotlinCall),
kotlinCall is PSIKotlinCallImpl && kotlinCall.psiCall.isCallWithSuperReceiver(),
)
override fun isSuperExpression(receiver: SimpleKotlinCallArgument?): Boolean =
@@ -601,7 +601,8 @@ internal fun createPreviousResolveError(status: ResolutionStatus): PreviousResol
return PreviousResolutionError(level)
}
private val BasicCallResolutionContext.isSuperCall: Boolean get() = call.explicitReceiver is SuperCallReceiverValue
internal fun Call.isCallWithSuperReceiver(): Boolean = explicitReceiver is SuperCallReceiverValue
private val BasicCallResolutionContext.isSuperCall: Boolean get() = call.isCallWithSuperReceiver()
internal fun reportResolvedUsingDeprecatedVisibility(
call: Call,