Completion for sealed class inheritors and a pair of tests
This commit is contained in:
+3
-1
@@ -292,7 +292,7 @@ public open class KotlinLightClassForExplicitDeclaration(
|
||||
|
||||
|
||||
// FINAL
|
||||
if (isAbstract()) {
|
||||
if (isAbstract() || isSealed()) {
|
||||
psiModifiers.add(PsiModifier.ABSTRACT)
|
||||
}
|
||||
else if (!(classOrObject.hasModifier(OPEN_KEYWORD) || (classOrObject is JetClass && classOrObject.isEnum()))) {
|
||||
@@ -308,6 +308,8 @@ public open class KotlinLightClassForExplicitDeclaration(
|
||||
|
||||
private fun isAbstract(): Boolean = classOrObject.hasModifier(ABSTRACT_KEYWORD) || isInterface
|
||||
|
||||
private fun isSealed(): Boolean = classOrObject.hasModifier(SEALED_KEYWORD)
|
||||
|
||||
override fun hasModifierProperty(@NonNls name: String): Boolean = getModifierList().hasModifierProperty(name)
|
||||
|
||||
override fun isDeprecated(): Boolean {
|
||||
|
||||
Reference in New Issue
Block a user