[Interop][StubIR] Add "abstract" member stub modality
This commit is contained in:
committed by
Sergey Bogolepov
parent
af5f07de17
commit
f10965cbec
+1
-1
@@ -132,7 +132,7 @@ private class ObjCMethodStubBuilder(
|
||||
MemberStubModality.OVERRIDE
|
||||
} else when (container) {
|
||||
is ObjCClass -> MemberStubModality.OPEN
|
||||
is ObjCProtocol -> MemberStubModality.OPEN
|
||||
is ObjCProtocol -> MemberStubModality.ABSTRACT
|
||||
}
|
||||
}
|
||||
is ObjCCategory -> MemberStubModality.FINAL
|
||||
|
||||
+2
-1
@@ -322,7 +322,8 @@ class FunctionParameterStub(
|
||||
enum class MemberStubModality {
|
||||
OVERRIDE,
|
||||
OPEN,
|
||||
FINAL
|
||||
FINAL,
|
||||
ABSTRACT
|
||||
}
|
||||
|
||||
interface FunctionalStub : AnnotationHolder, StubIrElement, NativeBacked {
|
||||
|
||||
+1
-1
@@ -55,7 +55,7 @@ val StubContainer.defaultMemberModality: MemberStubModality
|
||||
get() = when (this) {
|
||||
is SimpleStubContainer -> MemberStubModality.FINAL
|
||||
is ClassStub.Simple -> if (this.modality == ClassStubModality.INTERFACE) {
|
||||
MemberStubModality.OPEN
|
||||
MemberStubModality.ABSTRACT
|
||||
} else {
|
||||
MemberStubModality.FINAL
|
||||
}
|
||||
|
||||
+2
-1
@@ -116,7 +116,8 @@ private val FunctionStub.flags: Flags
|
||||
Flag.Function.IS_EXTERNAL,
|
||||
Flag.HAS_ANNOTATIONS.takeIf { annotations.isNotEmpty() },
|
||||
Flag.IS_FINAL.takeIf { modality == MemberStubModality.FINAL },
|
||||
Flag.IS_OPEN.takeIf { modality == MemberStubModality.OPEN }
|
||||
Flag.IS_OPEN.takeIf { modality == MemberStubModality.OPEN },
|
||||
Flag.IS_ABSTRACT.takeIf { modality == MemberStubModality.ABSTRACT }
|
||||
).let { flagsOf(*it.toTypedArray()) }
|
||||
|
||||
private val Classifier.fqNameSerialized: String
|
||||
|
||||
+1
@@ -361,6 +361,7 @@ class StubIrTextEmitter(
|
||||
MemberStubModality.OVERRIDE -> "override "
|
||||
MemberStubModality.OPEN -> "open "
|
||||
MemberStubModality.FINAL -> "final "
|
||||
MemberStubModality.ABSTRACT -> "abstract "
|
||||
}
|
||||
|
||||
private fun renderVisibilityModifier(visibilityModifier: VisibilityModifier) = when (visibilityModifier) {
|
||||
|
||||
Reference in New Issue
Block a user