Rename Deprecation to DeprecationInfo

This commit is contained in:
Dmitriy Novozhilov
2021-08-30 12:00:15 +03:00
parent 5d31f0f032
commit 69c3831865
24 changed files with 91 additions and 92 deletions
@@ -14,7 +14,7 @@ import org.jetbrains.kotlin.descriptors.*
import org.jetbrains.kotlin.name.ClassId
import org.jetbrains.kotlin.resolve.constants.ArrayValue
import org.jetbrains.kotlin.resolve.constants.KClassValue
import org.jetbrains.kotlin.resolve.deprecation.Deprecation
import org.jetbrains.kotlin.resolve.deprecation.DeprecationInfo
import org.jetbrains.kotlin.resolve.deprecation.DeprecationLevelValue
import org.jetbrains.kotlin.resolve.descriptorUtil.*
import org.jetbrains.kotlin.resolve.scopes.MemberScope
@@ -1339,7 +1339,7 @@ internal fun ClassDescriptor.needCompanionObjectProperty(namer: ObjCExportNamer,
}
private fun Deprecation.toDeprecationAttribute(): String {
private fun DeprecationInfo.toDeprecationAttribute(): String {
val attribute = when (deprecationLevel) {
DeprecationLevelValue.WARNING -> "deprecated"
DeprecationLevelValue.ERROR, DeprecationLevelValue.HIDDEN -> "unavailable"
@@ -15,7 +15,7 @@ import org.jetbrains.kotlin.builtins.*
import org.jetbrains.kotlin.descriptors.*
import org.jetbrains.kotlin.incremental.components.NoLookupLocation
import org.jetbrains.kotlin.name.ClassId
import org.jetbrains.kotlin.resolve.deprecation.Deprecation
import org.jetbrains.kotlin.resolve.deprecation.DeprecationInfo
import org.jetbrains.kotlin.resolve.deprecation.DeprecationLevelValue
import org.jetbrains.kotlin.resolve.deprecation.DeprecationResolver
import org.jetbrains.kotlin.resolve.descriptorUtil.*
@@ -97,7 +97,7 @@ private fun ObjCExportMapper.isHiddenByDeprecation(descriptor: CallableMemberDes
return false
}
internal fun ObjCExportMapper.getDeprecation(descriptor: DeclarationDescriptor): Deprecation? {
internal fun ObjCExportMapper.getDeprecation(descriptor: DeclarationDescriptor): DeprecationInfo? {
deprecationResolver?.getDeprecations(descriptor).orEmpty().maxByOrNull {
when (it.deprecationLevel) {
DeprecationLevelValue.WARNING -> 1