[ObjCExport] Remove 'Enum.clone' method special case (AA)
This clone method showed up in K1 because of the test setup being not close enough to production. KT-65670
This commit is contained in:
committed by
Space Team
parent
19698bf6fa
commit
b26f9cb274
-16
@@ -6,7 +6,6 @@ import org.jetbrains.kotlin.analysis.api.symbols.markers.KtSymbolWithModality
|
||||
import org.jetbrains.kotlin.analysis.api.types.KtNonErrorClassType
|
||||
import org.jetbrains.kotlin.backend.konan.objcexport.*
|
||||
import org.jetbrains.kotlin.descriptors.Modality
|
||||
import org.jetbrains.kotlin.name.StandardClassIds
|
||||
import org.jetbrains.kotlin.objcexport.analysisApiUtils.isVisibleInObjC
|
||||
|
||||
context(KtAnalysisSession, KtObjCExportSession)
|
||||
@@ -34,11 +33,6 @@ fun KtClassOrObjectSymbol.translateToObjCClass(): ObjCClass? {
|
||||
this += buildCompanionProperty()
|
||||
}
|
||||
|
||||
/* Special case so far: Just for 'Enum' we actually want to add this clone method to match K1 */
|
||||
if (classIdIfNonLocal == StandardClassIds.Enum) {
|
||||
this += cloneMethod
|
||||
}
|
||||
|
||||
this += getCallableSymbolsForObjCMemberTranslation()
|
||||
.sortedWith(StableCallableOrder)
|
||||
.mapNotNull { it.translateToObjCExportStub() }
|
||||
@@ -118,13 +112,3 @@ internal fun KtNonErrorClassType.getSuperClassName(): ObjCExportClassOrProtocolN
|
||||
val classSymbol = expandedClassSymbol ?: return null
|
||||
return classSymbol.getObjCClassOrProtocolName()
|
||||
}
|
||||
|
||||
private val cloneMethod = ObjCMethod(
|
||||
selectors = listOf("clone"),
|
||||
comment = ObjCComment(contentLines = listOf("@note This method has protected visibility in Kotlin source and is intended only for use by subclasses.")),
|
||||
origin = null,
|
||||
returnType = ObjCIdType,
|
||||
parameters = emptyList(),
|
||||
isInstanceMethod = true,
|
||||
attributes = listOf(swiftNameAttribute("clone()"))
|
||||
)
|
||||
Reference in New Issue
Block a user