Minor, extract isDeprecatedHidden for usage in codegen
Also remove a hundred year old TODO
This commit is contained in:
@@ -183,11 +183,15 @@ enum class DeprecationLevelValue {
|
||||
WARNING, ERROR, HIDDEN
|
||||
}
|
||||
|
||||
fun DeclarationDescriptor.isDeprecatedHidden(): Boolean {
|
||||
return getDeprecation()?.deprecationLevel == DeprecationLevelValue.HIDDEN
|
||||
}
|
||||
|
||||
@JvmOverloads
|
||||
fun DeclarationDescriptor.isHiddenInResolution(isSuperCall: Boolean = false): Boolean {
|
||||
if (this is FunctionDescriptor) {
|
||||
if (isHiddenToOvercomeSignatureClash) return true
|
||||
if (isHiddenForResolutionEverywhereBesideSupercalls && !isSuperCall) return true
|
||||
}
|
||||
return getDeprecation()?.deprecationLevel == DeprecationLevelValue.HIDDEN
|
||||
return isDeprecatedHidden()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user