Replaced ReceiverValue.NO_RECEIVER to null.
This commit is contained in:
@@ -42,7 +42,7 @@ public class ShadowedDeclarationsFilter(
|
||||
private val bindingContext: BindingContext,
|
||||
private val resolutionFacade: ResolutionFacade,
|
||||
private val context: PsiElement,
|
||||
private val explicitReceiverValue: ReceiverValue
|
||||
private val explicitReceiverValue: ReceiverValue?
|
||||
) {
|
||||
companion object {
|
||||
fun create(
|
||||
@@ -64,7 +64,7 @@ public class ShadowedDeclarationsFilter(
|
||||
val explicitReceiverValue = receiverExpression?.let {
|
||||
val type = bindingContext.getType(it) ?: return null
|
||||
ExpressionReceiver.create(it, type, bindingContext)
|
||||
} ?: ReceiverValue.NO_RECEIVER
|
||||
}
|
||||
return ShadowedDeclarationsFilter(bindingContext, resolutionFacade, context, explicitReceiverValue)
|
||||
}
|
||||
}
|
||||
@@ -183,7 +183,7 @@ public class ShadowedDeclarationsFilter(
|
||||
|
||||
override fun getTypeArgumentList() = null
|
||||
|
||||
override fun getDispatchReceiver() = ReceiverValue.NO_RECEIVER
|
||||
override fun getDispatchReceiver() = null
|
||||
|
||||
override fun getCallOperationNode() = null
|
||||
|
||||
|
||||
@@ -66,8 +66,6 @@ public fun <TCallable : CallableDescriptor> TCallable.substituteExtensionIfCalla
|
||||
dataFlowInfo: DataFlowInfo,
|
||||
containingDeclarationOrModule: DeclarationDescriptor
|
||||
): Collection<TCallable> {
|
||||
if (!receiver.exists()) return listOf()
|
||||
|
||||
var types = SmartCastManager().getSmartCastVariants(receiver, bindingContext, containingDeclarationOrModule, dataFlowInfo)
|
||||
return substituteExtensionIfCallable(types, callType)
|
||||
}
|
||||
@@ -101,7 +99,7 @@ public fun <TCallable : CallableDescriptor> TCallable.substituteExtensionIfCalla
|
||||
}
|
||||
}
|
||||
|
||||
public fun ReceiverValue.getThisReceiverOwner(bindingContext: BindingContext): DeclarationDescriptor? {
|
||||
public fun ReceiverValue?.getThisReceiverOwner(bindingContext: BindingContext): DeclarationDescriptor? {
|
||||
return when (this) {
|
||||
is ExpressionReceiver -> {
|
||||
val thisRef = (KtPsiUtil.deparenthesize(this.expression) as? KtThisExpression)?.getInstanceReference() ?: return null
|
||||
|
||||
Reference in New Issue
Block a user