[K/N] KT-56464: implementation of HiddenFromObjC for classes in backend

This commit is contained in:
Sergey Bogolepov
2023-04-25 18:05:40 +03:00
committed by Space Team
parent 6651e6ed8c
commit fce878d63a
10 changed files with 54 additions and 17 deletions
@@ -61,7 +61,7 @@ object FirNativeErrorsDefaultMessages : BaseDiagnosticRendererFactory() {
)
map.put(
INVALID_OBJC_REFINEMENT_TARGETS,
"Refines annotations are only applicable to annotations with targets FUNCTION and/or PROPERTY"
"Refines annotations are only applicable to annotations with targets CLASS, FUNCTION and/or PROPERTY"
)
map.put(INAPPLICABLE_OBJC_NAME, "@ObjCName is not applicable on overrides")
map.put(INVALID_OBJC_NAME, "@ObjCName should have a name and/or swiftName")
@@ -21,7 +21,7 @@ import org.jetbrains.kotlin.fir.expressions.FirAnnotation
object FirNativeObjCRefinementAnnotationChecker : FirRegularClassChecker() {
private val supportedTargets = arrayOf(KotlinTarget.FUNCTION, KotlinTarget.PROPERTY)
private val supportedTargets = arrayOf(KotlinTarget.FUNCTION, KotlinTarget.PROPERTY, KotlinTarget.CLASS)
override fun check(declaration: FirRegularClass, context: CheckerContext, reporter: DiagnosticReporter) {
if (declaration.classKind != ClassKind.ANNOTATION_CLASS) return