[JS FIR] Support NAME_CONTAINS_ILLEGAL_CHARS diagnostic
^KT-59392 Fixed
This commit is contained in:
committed by
Space Team
parent
37c8ec1e51
commit
89c3781c8e
+6
@@ -1234,6 +1234,12 @@ internal val KT_DIAGNOSTIC_CONVERTER = KtDiagnosticConverterBuilder.buildConvert
|
||||
token,
|
||||
)
|
||||
}
|
||||
add(FirJsErrors.NAME_CONTAINS_ILLEGAL_CHARS) { firDiagnostic ->
|
||||
NameContainsIllegalCharsImpl(
|
||||
firDiagnostic as KtPsiDiagnostic,
|
||||
token,
|
||||
)
|
||||
}
|
||||
add(FirErrors.OPT_IN_USAGE) { firDiagnostic ->
|
||||
OptInUsageImpl(
|
||||
firDiagnostic.a,
|
||||
|
||||
+4
@@ -886,6 +886,10 @@ sealed interface KtFirDiagnostic<PSI : PsiElement> : KtDiagnosticWithPsi<PSI> {
|
||||
val name: String
|
||||
}
|
||||
|
||||
interface NameContainsIllegalChars : KtFirDiagnostic<KtElement> {
|
||||
override val diagnosticClass get() = NameContainsIllegalChars::class
|
||||
}
|
||||
|
||||
interface OptInUsage : KtFirDiagnostic<PsiElement> {
|
||||
override val diagnosticClass get() = OptInUsage::class
|
||||
val optInMarkerFqName: FqName
|
||||
|
||||
+5
@@ -1065,6 +1065,11 @@ internal class JsBuiltinNameClashImpl(
|
||||
token: KtLifetimeToken,
|
||||
) : KtAbstractFirDiagnostic<KtElement>(firDiagnostic, token), KtFirDiagnostic.JsBuiltinNameClash
|
||||
|
||||
internal class NameContainsIllegalCharsImpl(
|
||||
firDiagnostic: KtPsiDiagnostic,
|
||||
token: KtLifetimeToken,
|
||||
) : KtAbstractFirDiagnostic<KtElement>(firDiagnostic, token), KtFirDiagnostic.NameContainsIllegalChars
|
||||
|
||||
internal class OptInUsageImpl(
|
||||
override val optInMarkerFqName: FqName,
|
||||
override val message: String,
|
||||
|
||||
Reference in New Issue
Block a user