[FIR] Add REPEATED_ANNOTATION, REPEATED_ANNOTATION_WARNING
This commit is contained in:
committed by
TeamCityServer
parent
fa12e72551
commit
55f33999f1
+12
@@ -859,6 +859,18 @@ internal val KT_DIAGNOSTIC_CONVERTER = KtDiagnosticConverterBuilder.buildConvert
|
||||
token,
|
||||
)
|
||||
}
|
||||
add(FirErrors.REPEATED_ANNOTATION) { firDiagnostic ->
|
||||
RepeatedAnnotationImpl(
|
||||
firDiagnostic as FirPsiDiagnostic,
|
||||
token,
|
||||
)
|
||||
}
|
||||
add(FirErrors.REPEATED_ANNOTATION_WARNING) { firDiagnostic ->
|
||||
RepeatedAnnotationWarningImpl(
|
||||
firDiagnostic as FirPsiDiagnostic,
|
||||
token,
|
||||
)
|
||||
}
|
||||
add(FirErrors.EXPERIMENTAL_API_USAGE) { firDiagnostic ->
|
||||
ExperimentalApiUsageImpl(
|
||||
firDiagnostic.a,
|
||||
|
||||
+8
@@ -618,6 +618,14 @@ sealed class KtFirDiagnostic<PSI : PsiElement> : KtDiagnosticWithPsi<PSI> {
|
||||
override val diagnosticClass get() = InapplicableFileTarget::class
|
||||
}
|
||||
|
||||
abstract class RepeatedAnnotation : KtFirDiagnostic<KtAnnotationEntry>() {
|
||||
override val diagnosticClass get() = RepeatedAnnotation::class
|
||||
}
|
||||
|
||||
abstract class RepeatedAnnotationWarning : KtFirDiagnostic<KtAnnotationEntry>() {
|
||||
override val diagnosticClass get() = RepeatedAnnotationWarning::class
|
||||
}
|
||||
|
||||
abstract class ExperimentalApiUsage : KtFirDiagnostic<PsiElement>() {
|
||||
override val diagnosticClass get() = ExperimentalApiUsage::class
|
||||
abstract val optInMarkerFqName: FqName
|
||||
|
||||
+14
@@ -991,6 +991,20 @@ internal class InapplicableFileTargetImpl(
|
||||
override val firDiagnostic: FirPsiDiagnostic by weakRef(firDiagnostic)
|
||||
}
|
||||
|
||||
internal class RepeatedAnnotationImpl(
|
||||
firDiagnostic: FirPsiDiagnostic,
|
||||
override val token: ValidityToken,
|
||||
) : KtFirDiagnostic.RepeatedAnnotation(), KtAbstractFirDiagnostic<KtAnnotationEntry> {
|
||||
override val firDiagnostic: FirPsiDiagnostic by weakRef(firDiagnostic)
|
||||
}
|
||||
|
||||
internal class RepeatedAnnotationWarningImpl(
|
||||
firDiagnostic: FirPsiDiagnostic,
|
||||
override val token: ValidityToken,
|
||||
) : KtFirDiagnostic.RepeatedAnnotationWarning(), KtAbstractFirDiagnostic<KtAnnotationEntry> {
|
||||
override val firDiagnostic: FirPsiDiagnostic by weakRef(firDiagnostic)
|
||||
}
|
||||
|
||||
internal class ExperimentalApiUsageImpl(
|
||||
override val optInMarkerFqName: FqName,
|
||||
override val message: String,
|
||||
|
||||
Reference in New Issue
Block a user