Minor
This commit is contained in:
@@ -316,10 +316,12 @@ abstract class CompletionSession(protected val configuration: CompletionSessionC
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected fun getRuntimeReceiverTypeReferenceVariants(): Pair<ReferenceVariants, LookupElementFactory>? {
|
protected fun getRuntimeReceiverTypeReferenceVariants(): Pair<ReferenceVariants, LookupElementFactory>? {
|
||||||
|
val evaluator = file.getCopyableUserData(KtCodeFragment.RUNTIME_TYPE_EVALUATOR) ?: return null
|
||||||
|
|
||||||
val explicitReceiver = callTypeAndReceiver.receiver as? KtExpression ?: return null
|
val explicitReceiver = callTypeAndReceiver.receiver as? KtExpression ?: return null
|
||||||
val type = bindingContext.getType(explicitReceiver) ?: return null
|
val type = bindingContext.getType(explicitReceiver) ?: return null
|
||||||
if (!TypeUtils.canHaveSubtypes(KotlinTypeChecker.DEFAULT, type)) return null
|
if (!TypeUtils.canHaveSubtypes(KotlinTypeChecker.DEFAULT, type)) return null
|
||||||
val evaluator = file.getCopyableUserData(KtCodeFragment.RUNTIME_TYPE_EVALUATOR) ?: return null
|
|
||||||
val runtimeType = evaluator(explicitReceiver)
|
val runtimeType = evaluator(explicitReceiver)
|
||||||
if (runtimeType == null || runtimeType == type) return null
|
if (runtimeType == null || runtimeType == type) return null
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user