diff --git a/compiler/psi/src/org/jetbrains/kotlin/psi/KtClass.kt b/compiler/psi/src/org/jetbrains/kotlin/psi/KtClass.kt index 958f66636c1..7769c36d28d 100644 --- a/compiler/psi/src/org/jetbrains/kotlin/psi/KtClass.kt +++ b/compiler/psi/src/org/jetbrains/kotlin/psi/KtClass.kt @@ -23,8 +23,6 @@ open class KtClass : KtClassOrObject { private val _stub: KotlinClassStub? get() = stub as? KotlinClassStub - fun getColon(): PsiElement? = findChildByType(KtTokens.COLON) - fun getProperties(): List = body?.properties.orEmpty() fun isInterface(): Boolean = diff --git a/compiler/psi/src/org/jetbrains/kotlin/psi/KtClassOrObject.kt b/compiler/psi/src/org/jetbrains/kotlin/psi/KtClassOrObject.kt index 77b50efb9e5..f10262abbec 100644 --- a/compiler/psi/src/org/jetbrains/kotlin/psi/KtClassOrObject.kt +++ b/compiler/psi/src/org/jetbrains/kotlin/psi/KtClassOrObject.kt @@ -35,6 +35,8 @@ abstract class KtClassOrObject : constructor(node: ASTNode) : super(node) constructor(stub: KotlinClassOrObjectStub, nodeType: IStubElementType<*, *>) : super(stub, nodeType) + fun getColon(): PsiElement? = findChildByType(KtTokens.COLON) + fun getSuperTypeList(): KtSuperTypeList? = getStubOrPsiChild(KtStubElementTypes.SUPER_TYPE_LIST) override fun getSuperTypeListEntries(): List = getSuperTypeList()?.entries.orEmpty() @@ -61,7 +63,7 @@ abstract class KtClassOrObject : if (specifierList.entries.size > 1) { EditCommaSeparatedListHelper.removeItem(superTypeListEntry) } else { - deleteChildRange(findChildByType(KtTokens.COLON) ?: specifierList, specifierList) + deleteChildRange(getColon() ?: specifierList, specifierList) } }