[FIR] Add NON_INTERNAL_PUBLISHED_API diagnostic
This commit is contained in:
committed by
teamcityserver
parent
46d1b63f70
commit
efce3fc2e0
+6
@@ -3179,6 +3179,12 @@ internal val KT_DIAGNOSTIC_CONVERTER = KtDiagnosticConverterBuilder.buildConvert
|
||||
token,
|
||||
)
|
||||
}
|
||||
add(FirErrors.NON_INTERNAL_PUBLISHED_API) { firDiagnostic ->
|
||||
NonInternalPublishedApiImpl(
|
||||
firDiagnostic as FirPsiDiagnostic,
|
||||
token,
|
||||
)
|
||||
}
|
||||
add(FirErrors.REIFIED_TYPE_PARAMETER_IN_OVERRIDE) { firDiagnostic ->
|
||||
ReifiedTypeParameterInOverrideImpl(
|
||||
firDiagnostic as FirPsiDiagnostic,
|
||||
|
||||
+4
@@ -2218,6 +2218,10 @@ sealed class KtFirDiagnostic<PSI : PsiElement> : KtDiagnosticWithPsi<PSI> {
|
||||
override val diagnosticClass get() = OverrideByInline::class
|
||||
}
|
||||
|
||||
abstract class NonInternalPublishedApi : KtFirDiagnostic<KtElement>() {
|
||||
override val diagnosticClass get() = NonInternalPublishedApi::class
|
||||
}
|
||||
|
||||
abstract class ReifiedTypeParameterInOverride : KtFirDiagnostic<KtElement>() {
|
||||
override val diagnosticClass get() = ReifiedTypeParameterInOverride::class
|
||||
}
|
||||
|
||||
+7
@@ -3581,6 +3581,13 @@ internal class OverrideByInlineImpl(
|
||||
override val firDiagnostic: FirPsiDiagnostic by weakRef(firDiagnostic)
|
||||
}
|
||||
|
||||
internal class NonInternalPublishedApiImpl(
|
||||
firDiagnostic: FirPsiDiagnostic,
|
||||
override val token: ValidityToken,
|
||||
) : KtFirDiagnostic.NonInternalPublishedApi(), KtAbstractFirDiagnostic<KtElement> {
|
||||
override val firDiagnostic: FirPsiDiagnostic by weakRef(firDiagnostic)
|
||||
}
|
||||
|
||||
internal class ReifiedTypeParameterInOverrideImpl(
|
||||
firDiagnostic: FirPsiDiagnostic,
|
||||
override val token: ValidityToken,
|
||||
|
||||
Reference in New Issue
Block a user