[FE] Stop ignoring ABSTRACT_MEMBER_NOT_IMPLEMENTED for expect classes

^KT-59739 Fixed
Review: https://jetbrains.team/p/kt/reviews/11038/timeline
This commit is contained in:
Nikita Bobko
2023-07-10 11:23:25 +02:00
committed by Space Team
parent bfcb90c716
commit 4f3ecedbca
25 changed files with 161 additions and 42 deletions
@@ -26,8 +26,7 @@ enum class ImplementationStatus {
ALREADY_IMPLEMENTED,
/**
* The symbol is not implemented in the class and it cannot be implemented. For example, it's final in super classes or the current
* class is `expect`.
* The symbol is not implemented in the class, and it cannot be implemented. For example, it's final in super classes.
*/
CANNOT_BE_IMPLEMENTED;
@@ -505,10 +505,6 @@ public class DescriptorUtils {
UnsignedTypes.INSTANCE.isUnsignedType(type);
}
public static boolean classCanHaveAbstractFakeOverride(@NotNull ClassDescriptor classDescriptor) {
return classCanHaveAbstractDeclaration(classDescriptor) || classDescriptor.isExpect();
}
public static boolean classCanHaveAbstractDeclaration(@NotNull ClassDescriptor classDescriptor) {
return classDescriptor.getModality() == Modality.ABSTRACT
|| isSealedClass(classDescriptor)