Descriptors for synthetic enum value stubs

This commit is contained in:
Vyacheslav Karpukhin
2020-04-17 18:54:25 +02:00
committed by SvyatoslavScherbina
parent 058fc3afd2
commit 7fca0a8216
2 changed files with 3 additions and 3 deletions
@@ -365,7 +365,7 @@ internal class ObjCExportTranslatorImpl(
descriptor.enumEntries.forEach {
val entryName = namer.getEnumEntrySelector(it)
+ObjCProperty(entryName, null, type, listOf("class", "readonly"),
+ObjCProperty(entryName, it, type, listOf("class", "readonly"),
declarationAttributes = listOf(swiftNameAttribute(entryName)))
}
}
@@ -68,12 +68,12 @@ class ObjCParameter(name: String,
val type: ObjCType) : Stub<ParameterDescriptor>(name)
class ObjCProperty(name: String,
override val descriptor: PropertyDescriptor?,
override val descriptor: DeclarationDescriptorWithSource?,
val type: ObjCType,
val propertyAttributes: List<String>,
val setterName: String? = null,
val getterName: String? = null,
val declarationAttributes: List<String> = emptyList()) : Stub<PropertyDescriptor>(name) {
val declarationAttributes: List<String> = emptyList()) : Stub<DeclarationDescriptorWithSource>(name) {
@Deprecated("", ReplaceWith("this.propertyAttributes"), DeprecationLevel.WARNING)
val attributes: List<String> get() = propertyAttributes