[JS FIR] Support DYNAMIC_NOT_ALLOWED diagnostic
^KT-59384 Fixed
This commit is contained in:
committed by
Space Team
parent
39fba56de9
commit
6034d32d7c
+6
@@ -3779,6 +3779,12 @@ internal val KT_DIAGNOSTIC_CONVERTER = KtDiagnosticConverterBuilder.buildConvert
|
||||
token,
|
||||
)
|
||||
}
|
||||
add(FirErrors.DYNAMIC_NOT_ALLOWED) { firDiagnostic ->
|
||||
DynamicNotAllowedImpl(
|
||||
firDiagnostic as KtPsiDiagnostic,
|
||||
token,
|
||||
)
|
||||
}
|
||||
add(FirErrors.ENUM_ENTRY_AS_TYPE) { firDiagnostic ->
|
||||
EnumEntryAsTypeImpl(
|
||||
firDiagnostic as KtPsiDiagnostic,
|
||||
|
||||
+4
@@ -2641,6 +2641,10 @@ sealed interface KtFirDiagnostic<PSI : PsiElement> : KtDiagnosticWithPsi<PSI> {
|
||||
override val diagnosticClass get() = IsEnumEntry::class
|
||||
}
|
||||
|
||||
interface DynamicNotAllowed : KtFirDiagnostic<KtTypeReference> {
|
||||
override val diagnosticClass get() = DynamicNotAllowed::class
|
||||
}
|
||||
|
||||
interface EnumEntryAsType : KtFirDiagnostic<KtTypeReference> {
|
||||
override val diagnosticClass get() = EnumEntryAsType::class
|
||||
}
|
||||
|
||||
+5
@@ -3183,6 +3183,11 @@ internal class IsEnumEntryImpl(
|
||||
token: KtLifetimeToken,
|
||||
) : KtAbstractFirDiagnostic<KtTypeReference>(firDiagnostic, token), KtFirDiagnostic.IsEnumEntry
|
||||
|
||||
internal class DynamicNotAllowedImpl(
|
||||
firDiagnostic: KtPsiDiagnostic,
|
||||
token: KtLifetimeToken,
|
||||
) : KtAbstractFirDiagnostic<KtTypeReference>(firDiagnostic, token), KtFirDiagnostic.DynamicNotAllowed
|
||||
|
||||
internal class EnumEntryAsTypeImpl(
|
||||
firDiagnostic: KtPsiDiagnostic,
|
||||
token: KtLifetimeToken,
|
||||
|
||||
Reference in New Issue
Block a user