[FIR] Add NOT_A_CLASS diagnostics
This commit is contained in:
committed by
TeamCityServer
parent
aff885bcd1
commit
4caf3c5e83
+6
@@ -914,6 +914,12 @@ internal val KT_DIAGNOSTIC_CONVERTER = KtDiagnosticConverterBuilder.buildConvert
|
||||
token,
|
||||
)
|
||||
}
|
||||
add(FirErrors.NOT_A_CLASS) { firDiagnostic ->
|
||||
NotAClassImpl(
|
||||
firDiagnostic as KtPsiDiagnostic,
|
||||
token,
|
||||
)
|
||||
}
|
||||
add(FirErrors.OPT_IN_USAGE) { firDiagnostic ->
|
||||
OptInUsageImpl(
|
||||
firDiagnostic.a,
|
||||
|
||||
+4
@@ -659,6 +659,10 @@ sealed class KtFirDiagnostic<PSI : PsiElement> : KtDiagnosticWithPsi<PSI> {
|
||||
override val diagnosticClass get() = RepeatedAnnotationWarning::class
|
||||
}
|
||||
|
||||
abstract class NotAClass : KtFirDiagnostic<PsiElement>() {
|
||||
override val diagnosticClass get() = NotAClass::class
|
||||
}
|
||||
|
||||
abstract class OptInUsage : KtFirDiagnostic<PsiElement>() {
|
||||
override val diagnosticClass get() = OptInUsage::class
|
||||
abstract val optInMarkerFqName: FqName
|
||||
|
||||
+5
@@ -790,6 +790,11 @@ internal class RepeatedAnnotationWarningImpl(
|
||||
override val token: ValidityToken,
|
||||
) : KtFirDiagnostic.RepeatedAnnotationWarning(), KtAbstractFirDiagnostic<KtAnnotationEntry>
|
||||
|
||||
internal class NotAClassImpl(
|
||||
override val firDiagnostic: KtPsiDiagnostic,
|
||||
override val token: ValidityToken,
|
||||
) : KtFirDiagnostic.NotAClass(), KtAbstractFirDiagnostic<PsiElement>
|
||||
|
||||
internal class OptInUsageImpl(
|
||||
override val optInMarkerFqName: FqName,
|
||||
override val message: String,
|
||||
|
||||
Reference in New Issue
Block a user