FIC: Introduce isFun property for descriptors and proto
This commit is contained in:
+1
@@ -82,6 +82,7 @@ class SyntheticClassOrObjectDescriptor(
|
||||
override fun isInline() = false
|
||||
override fun isExpect() = false
|
||||
override fun isActual() = false
|
||||
override fun isFun() = false
|
||||
|
||||
override fun getCompanionObjectDescriptor(): ClassDescriptorWithResolutionScopes? = null
|
||||
override fun getTypeConstructor(): TypeConstructor = typeConstructor
|
||||
|
||||
+8
@@ -86,6 +86,7 @@ public class LazyClassDescriptor extends ClassDescriptorBase implements ClassDes
|
||||
private final boolean isInline;
|
||||
private final boolean isExpect;
|
||||
private final boolean isActual;
|
||||
private final boolean isFun;
|
||||
|
||||
private final Annotations annotations;
|
||||
private final Annotations danglingAnnotations;
|
||||
@@ -158,6 +159,8 @@ public class LazyClassDescriptor extends ClassDescriptorBase implements ClassDes
|
||||
this.isExpect = modifierList != null && PsiUtilsKt.hasExpectModifier(modifierList) ||
|
||||
containingDeclaration instanceof ClassDescriptor && ((ClassDescriptor) containingDeclaration).isExpect();
|
||||
|
||||
this.isFun = modifierList != null && PsiUtilsKt.hasFunModifier(modifierList);
|
||||
|
||||
// Annotation entries are taken from both own annotations (if any) and object literal annotations (if any)
|
||||
List<KtAnnotationEntry> annotationEntries = new ArrayList<>();
|
||||
if (classOrObject != null && classOrObject.getParent() instanceof KtObjectLiteralExpression) {
|
||||
@@ -533,6 +536,11 @@ public class LazyClassDescriptor extends ClassDescriptorBase implements ClassDes
|
||||
return isActual;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFun() {
|
||||
return isFun;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public Annotations getAnnotations() {
|
||||
|
||||
Reference in New Issue
Block a user