[FE] Allow using sealed modifier on interface and compute sealed modality for them
#KT-20423
This commit is contained in:
committed by
TeamCityServer
parent
d605c7e491
commit
9609954560
@@ -270,7 +270,7 @@ public class DescriptorUtils {
|
||||
}
|
||||
|
||||
public static boolean isSealedClass(@Nullable DeclarationDescriptor descriptor) {
|
||||
return isKindOf(descriptor, ClassKind.CLASS) && ((ClassDescriptor) descriptor).getModality() == Modality.SEALED;
|
||||
return (isKindOf(descriptor, ClassKind.CLASS) || isKindOf(descriptor, ClassKind.INTERFACE)) && ((ClassDescriptor) descriptor).getModality() == Modality.SEALED;
|
||||
}
|
||||
|
||||
public static boolean isAnonymousObject(@NotNull DeclarationDescriptor descriptor) {
|
||||
|
||||
Reference in New Issue
Block a user