Don't require to override abstract methods in expect class
#KT-16099 Fixed
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2016 JetBrains s.r.o.
|
||||
* Copyright 2010-2017 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -458,7 +458,11 @@ public class DescriptorUtils {
|
||||
KotlinTypeChecker.DEFAULT.equalTypes(builtIns.getAnyType(), type);
|
||||
}
|
||||
|
||||
public static boolean classCanHaveAbstractMembers(@NotNull ClassDescriptor classDescriptor) {
|
||||
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)
|
||||
|| classDescriptor.getKind() == ClassKind.ENUM_CLASS;
|
||||
|
||||
Reference in New Issue
Block a user