Refactored ReferenceVariantsHelper to allow specifying receiver
This commit is contained in:
@@ -45,8 +45,7 @@ import org.jetbrains.kotlin.resolve.scopes.receivers.ReceiverValue
|
||||
import org.jetbrains.kotlin.types.JetType
|
||||
import org.jetbrains.kotlin.utils.addIfNotNull
|
||||
import org.jetbrains.kotlin.utils.addToStdlib.singletonOrEmptyList
|
||||
import java.util.HashSet
|
||||
import java.util.LinkedHashSet
|
||||
import java.util.*
|
||||
|
||||
public class KotlinIndicesHelper(
|
||||
private val resolutionFacade: ResolutionFacade,
|
||||
@@ -133,9 +132,9 @@ public class KotlinIndicesHelper(
|
||||
}
|
||||
|
||||
private fun receiverValues(expression: JetSimpleNameExpression, bindingContext: BindingContext): Collection<Pair<ReceiverValue, CallType>> {
|
||||
val receiverPair = ReferenceVariantsHelper.getExplicitReceiverData(expression)
|
||||
if (receiverPair != null) {
|
||||
val (receiverExpression, callType) = receiverPair
|
||||
val receiverData = ReferenceVariantsHelper.getExplicitReceiverData(expression)
|
||||
if (receiverData != null) {
|
||||
val (receiverExpression, callType) = receiverData
|
||||
|
||||
val expressionType = bindingContext.getType(receiverExpression)
|
||||
if (expressionType == null || expressionType.isError()) return emptyList()
|
||||
|
||||
Reference in New Issue
Block a user