KT-14722 completion list isn't filled up for typealias to object

#KT-14722 fixed
This commit is contained in:
Simon Ogorodnik
2017-01-27 21:19:20 +03:00
committed by Simon Ogorodnik
parent e38ca44595
commit b422b0e24d
6 changed files with 90 additions and 3 deletions
@@ -36,6 +36,7 @@ import org.jetbrains.kotlin.resolve.scopes.DescriptorKindFilter
import org.jetbrains.kotlin.resolve.scopes.receivers.ClassQualifier
import org.jetbrains.kotlin.resolve.scopes.receivers.ExpressionReceiver
import org.jetbrains.kotlin.resolve.scopes.receivers.ReceiverValue
import org.jetbrains.kotlin.resolve.scopes.receivers.TypeAliasQualifier
import org.jetbrains.kotlin.types.KotlinType
import org.jetbrains.kotlin.types.expressions.DoubleColonLHS
import org.jetbrains.kotlin.util.supertypesWithAny
@@ -282,9 +283,8 @@ fun CallTypeAndReceiver<*, *>.receiverTypesWithIndex(
val receiverValues = if (receiverExpression != null) {
val receiverType =
bindingContext.getType(receiverExpression) ?:
(bindingContext.get(BindingContext.QUALIFIER, receiverExpression) as? ClassQualifier)?.let {
it.descriptor.classValueType
} ?:
(bindingContext.get(BindingContext.QUALIFIER, receiverExpression) as? ClassQualifier)?.descriptor?.classValueType ?:
(bindingContext.get(BindingContext.QUALIFIER, receiverExpression) as? TypeAliasQualifier)?.classDescriptor?.classValueType ?:
return emptyList()
listOf(ExpressionReceiver.create(receiverExpression, receiverType, bindingContext))
}