FIC: Introduce isFun property for descriptors and proto
This commit is contained in:
+1
@@ -97,6 +97,7 @@ class LazyJavaClassDescriptor(
|
||||
override fun isCompanionObject() = false
|
||||
override fun isExpect() = false
|
||||
override fun isActual() = false
|
||||
override fun isFun() = false
|
||||
|
||||
private val typeConstructor = LazyJavaClassTypeConstructor()
|
||||
override fun getTypeConstructor(): TypeConstructor = typeConstructor
|
||||
|
||||
+1
@@ -95,6 +95,7 @@ class FunctionClassDescriptor(
|
||||
override fun isInner() = false
|
||||
override fun isData() = false
|
||||
override fun isInline() = false
|
||||
override fun isFun() = false
|
||||
override fun isExpect() = false
|
||||
override fun isActual() = false
|
||||
override fun isExternal() = false
|
||||
|
||||
@@ -70,6 +70,8 @@ public interface ClassDescriptor extends ClassifierDescriptorWithTypeParameters,
|
||||
|
||||
boolean isInline();
|
||||
|
||||
boolean isFun();
|
||||
|
||||
@NotNull
|
||||
ReceiverParameterDescriptor getThisAsReceiverParameter();
|
||||
|
||||
|
||||
@@ -69,6 +69,7 @@ class NotFoundClasses(private val storageManager: StorageManager, private val mo
|
||||
override fun isCompanionObject() = false
|
||||
override fun isData() = false
|
||||
override fun isInline() = false
|
||||
override fun isFun() = false
|
||||
override fun isExpect() = false
|
||||
override fun isActual() = false
|
||||
override fun isExternal() = false
|
||||
|
||||
@@ -144,6 +144,11 @@ public class ClassDescriptorImpl extends ClassDescriptorBase {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFun() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isInner() {
|
||||
return false;
|
||||
|
||||
+5
@@ -138,6 +138,11 @@ public class EnumEntrySyntheticClassDescriptor extends ClassDescriptorBase {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFun() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isCompanionObject() {
|
||||
return false;
|
||||
|
||||
+5
@@ -243,6 +243,11 @@ public class LazySubstitutingClassDescriptor extends ModuleAwareClassDescriptor
|
||||
return original.isInline();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFun() {
|
||||
return original.isFun();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isExternal() {
|
||||
return original.isExternal();
|
||||
|
||||
@@ -99,6 +99,11 @@ public class MutableClassDescriptor extends ClassDescriptorBase {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFun() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isCompanionObject() {
|
||||
return false;
|
||||
|
||||
+2
@@ -104,6 +104,8 @@ class DeserializedClassDescriptor(
|
||||
|
||||
override fun isExternal() = Flags.IS_EXTERNAL_CLASS.get(classProto.flags)
|
||||
|
||||
override fun isFun() = Flags.IS_FUN_INTERFACE.get(classProto.flags)
|
||||
|
||||
override fun getUnsubstitutedMemberScope(kotlinTypeRefiner: KotlinTypeRefiner): MemberScope =
|
||||
memberScopeHolder.getScope(kotlinTypeRefiner)
|
||||
|
||||
|
||||
@@ -209,6 +209,7 @@ message Class {
|
||||
isExternal
|
||||
isExpect
|
||||
isInline
|
||||
isFun
|
||||
*/
|
||||
optional int32 flags = 1 [default = 6 /* public final class, no annotations */];
|
||||
|
||||
|
||||
@@ -8273,6 +8273,7 @@ public final class ProtoBuf {
|
||||
*isExternal
|
||||
*isExpect
|
||||
*isInline
|
||||
*isFun
|
||||
* </pre>
|
||||
*/
|
||||
boolean hasFlags();
|
||||
@@ -8289,6 +8290,7 @@ public final class ProtoBuf {
|
||||
*isExternal
|
||||
*isExpect
|
||||
*isInline
|
||||
*isFun
|
||||
* </pre>
|
||||
*/
|
||||
int getFlags();
|
||||
@@ -8914,6 +8916,7 @@ public final class ProtoBuf {
|
||||
*isExternal
|
||||
*isExpect
|
||||
*isInline
|
||||
*isFun
|
||||
* </pre>
|
||||
*/
|
||||
public boolean hasFlags() {
|
||||
@@ -8932,6 +8935,7 @@ public final class ProtoBuf {
|
||||
*isExternal
|
||||
*isExpect
|
||||
*isInline
|
||||
*isFun
|
||||
* </pre>
|
||||
*/
|
||||
public int getFlags() {
|
||||
@@ -10059,6 +10063,7 @@ public final class ProtoBuf {
|
||||
*isExternal
|
||||
*isExpect
|
||||
*isInline
|
||||
*isFun
|
||||
* </pre>
|
||||
*/
|
||||
public boolean hasFlags() {
|
||||
@@ -10077,6 +10082,7 @@ public final class ProtoBuf {
|
||||
*isExternal
|
||||
*isExpect
|
||||
*isInline
|
||||
*isFun
|
||||
* </pre>
|
||||
*/
|
||||
public int getFlags() {
|
||||
@@ -10095,6 +10101,7 @@ public final class ProtoBuf {
|
||||
*isExternal
|
||||
*isExpect
|
||||
*isInline
|
||||
*isFun
|
||||
* </pre>
|
||||
*/
|
||||
public Builder setFlags(int value) {
|
||||
@@ -10116,6 +10123,7 @@ public final class ProtoBuf {
|
||||
*isExternal
|
||||
*isExpect
|
||||
*isInline
|
||||
*isFun
|
||||
* </pre>
|
||||
*/
|
||||
public Builder clearFlags() {
|
||||
|
||||
@@ -30,6 +30,7 @@ public class Flags {
|
||||
public static final BooleanFlagField IS_EXTERNAL_CLASS = FlagField.booleanAfter(IS_DATA);
|
||||
public static final BooleanFlagField IS_EXPECT_CLASS = FlagField.booleanAfter(IS_EXTERNAL_CLASS);
|
||||
public static final BooleanFlagField IS_INLINE_CLASS = FlagField.booleanAfter(IS_EXPECT_CLASS);
|
||||
public static final BooleanFlagField IS_FUN_INTERFACE = FlagField.booleanAfter(IS_INLINE_CLASS);
|
||||
|
||||
// Constructors
|
||||
|
||||
@@ -95,7 +96,8 @@ public class Flags {
|
||||
boolean isData,
|
||||
boolean isExternal,
|
||||
boolean isExpect,
|
||||
boolean isInline
|
||||
boolean isInline,
|
||||
boolean isFun
|
||||
) {
|
||||
return HAS_ANNOTATIONS.toFlags(hasAnnotations)
|
||||
| MODALITY.toFlags(modality)
|
||||
@@ -106,6 +108,7 @@ public class Flags {
|
||||
| IS_EXTERNAL_CLASS.toFlags(isExternal)
|
||||
| IS_EXPECT_CLASS.toFlags(isExpect)
|
||||
| IS_INLINE_CLASS.toFlags(isInline)
|
||||
| IS_FUN_INTERFACE.toFlags(isFun)
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user