Revert "KT-14252 Completion could suggest constructors available via typealiases"
Reverted due problems with tests
This reverts commit 55eeb74c08.
This commit is contained in:
@@ -19,7 +19,6 @@ package org.jetbrains.kotlin.util
|
||||
import org.jetbrains.kotlin.descriptors.*
|
||||
import org.jetbrains.kotlin.resolve.OverridingUtil
|
||||
import org.jetbrains.kotlin.resolve.OverridingUtil.OverrideCompatibilityInfo.Result.OVERRIDABLE
|
||||
import org.jetbrains.kotlin.resolve.calls.tower.getTypeAliasConstructors
|
||||
import org.jetbrains.kotlin.resolve.scopes.DescriptorKindFilter
|
||||
import org.jetbrains.kotlin.types.KotlinType
|
||||
import org.jetbrains.kotlin.types.TypeConstructor
|
||||
@@ -77,18 +76,4 @@ fun TypeConstructor.supertypesWithAny(): Collection<KotlinType> {
|
||||
.map { it.constructor.declarationDescriptor as? ClassDescriptor }
|
||||
.all { it == null || it.kind == ClassKind.INTERFACE }
|
||||
return if (noSuperClass) supertypes + builtIns.anyType else supertypes
|
||||
}
|
||||
|
||||
val ClassifierDescriptorWithTypeParameters.constructors: Collection<ConstructorDescriptor>
|
||||
get() = when (this) {
|
||||
is TypeAliasDescriptor -> getTypeAliasConstructors()
|
||||
is ClassDescriptor -> this.constructors
|
||||
else -> emptyList()
|
||||
}
|
||||
|
||||
val ClassifierDescriptorWithTypeParameters.kind: ClassKind?
|
||||
get() = when (this) {
|
||||
is TypeAliasDescriptor -> classDescriptor?.kind
|
||||
is ClassDescriptor -> kind
|
||||
else -> null
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user