[AA] Regenerate AA after moving diagnostics from js to web.common

This commit is contained in:
Svyatoslav Kuzmich
2023-11-21 15:57:40 +01:00
committed by Space Team
parent cf3b293072
commit 3e88fc80d2
3 changed files with 102 additions and 102 deletions
@@ -1188,12 +1188,6 @@ internal val KT_DIAGNOSTIC_CONVERTER = KtDiagnosticConverterBuilder.buildConvert
token,
)
}
add(FirJsErrors.WRONG_JS_QUALIFIER) { firDiagnostic ->
WrongJsQualifierImpl(
firDiagnostic as KtPsiDiagnostic,
token,
)
}
add(FirJsErrors.JS_MODULE_PROHIBITED_ON_VAR) { firDiagnostic ->
JsModuleProhibitedOnVarImpl(
firDiagnostic as KtPsiDiagnostic,
@@ -1355,6 +1349,12 @@ internal val KT_DIAGNOSTIC_CONVERTER = KtDiagnosticConverterBuilder.buildConvert
token,
)
}
add(FirWebCommonErrors.WRONG_JS_QUALIFIER) { firDiagnostic ->
WrongJsQualifierImpl(
firDiagnostic as KtPsiDiagnostic,
token,
)
}
add(FirErrors.OPT_IN_USAGE) { firDiagnostic ->
OptInUsageImpl(
firDiagnostic.a,
@@ -5545,27 +5545,6 @@ internal val KT_DIAGNOSTIC_CONVERTER = KtDiagnosticConverterBuilder.buildConvert
token,
)
}
add(FirJsErrors.CANNOT_CHECK_FOR_EXTERNAL_INTERFACE) { firDiagnostic ->
CannotCheckForExternalInterfaceImpl(
firSymbolBuilder.typeBuilder.buildKtType(firDiagnostic.a),
firDiagnostic as KtPsiDiagnostic,
token,
)
}
add(FirJsErrors.UNCHECKED_CAST_TO_EXTERNAL_INTERFACE) { firDiagnostic ->
UncheckedCastToExternalInterfaceImpl(
firSymbolBuilder.typeBuilder.buildKtType(firDiagnostic.a),
firSymbolBuilder.typeBuilder.buildKtType(firDiagnostic.b),
firDiagnostic as KtPsiDiagnostic,
token,
)
}
add(FirJsErrors.EXTERNAL_INTERFACE_AS_CLASS_LITERAL) { firDiagnostic ->
ExternalInterfaceAsClassLiteralImpl(
firDiagnostic as KtPsiDiagnostic,
token,
)
}
add(FirJsErrors.JS_EXTERNAL_INHERITORS_ONLY) { firDiagnostic ->
JsExternalInheritorsOnlyImpl(
firSymbolBuilder.classifierBuilder.buildClassLikeSymbol(firDiagnostic.a),
@@ -5581,19 +5560,6 @@ internal val KT_DIAGNOSTIC_CONVERTER = KtDiagnosticConverterBuilder.buildConvert
token,
)
}
add(FirJsErrors.EXTERNAL_INTERFACE_AS_REIFIED_TYPE_ARGUMENT) { firDiagnostic ->
ExternalInterfaceAsReifiedTypeArgumentImpl(
firSymbolBuilder.typeBuilder.buildKtType(firDiagnostic.a),
firDiagnostic as KtPsiDiagnostic,
token,
)
}
add(FirJsErrors.NESTED_JS_EXPORT) { firDiagnostic ->
NestedJsExportImpl(
firDiagnostic as KtPsiDiagnostic,
token,
)
}
add(FirJsErrors.WRONG_EXPORTED_DECLARATION) { firDiagnostic ->
WrongExportedDeclarationImpl(
firDiagnostic.a,
@@ -5616,6 +5582,12 @@ internal val KT_DIAGNOSTIC_CONVERTER = KtDiagnosticConverterBuilder.buildConvert
token,
)
}
add(FirWebCommonErrors.NESTED_JS_EXPORT) { firDiagnostic ->
NestedJsExportImpl(
firDiagnostic as KtPsiDiagnostic,
token,
)
}
add(FirJsErrors.DELEGATION_BY_DYNAMIC) { firDiagnostic ->
DelegationByDynamicImpl(
firDiagnostic as KtPsiDiagnostic,
@@ -5721,6 +5693,34 @@ internal val KT_DIAGNOSTIC_CONVERTER = KtDiagnosticConverterBuilder.buildConvert
token,
)
}
add(FirWebCommonErrors.CANNOT_CHECK_FOR_EXTERNAL_INTERFACE) { firDiagnostic ->
CannotCheckForExternalInterfaceImpl(
firSymbolBuilder.typeBuilder.buildKtType(firDiagnostic.a),
firDiagnostic as KtPsiDiagnostic,
token,
)
}
add(FirWebCommonErrors.UNCHECKED_CAST_TO_EXTERNAL_INTERFACE) { firDiagnostic ->
UncheckedCastToExternalInterfaceImpl(
firSymbolBuilder.typeBuilder.buildKtType(firDiagnostic.a),
firSymbolBuilder.typeBuilder.buildKtType(firDiagnostic.b),
firDiagnostic as KtPsiDiagnostic,
token,
)
}
add(FirWebCommonErrors.EXTERNAL_INTERFACE_AS_CLASS_LITERAL) { firDiagnostic ->
ExternalInterfaceAsClassLiteralImpl(
firDiagnostic as KtPsiDiagnostic,
token,
)
}
add(FirWebCommonErrors.EXTERNAL_INTERFACE_AS_REIFIED_TYPE_ARGUMENT) { firDiagnostic ->
ExternalInterfaceAsReifiedTypeArgumentImpl(
firSymbolBuilder.typeBuilder.buildKtType(firDiagnostic.a),
firDiagnostic as KtPsiDiagnostic,
token,
)
}
add(FirWebCommonErrors.JSCODE_ARGUMENT_NON_CONST_EXPRESSION) { firDiagnostic ->
JscodeArgumentNonConstExpressionImpl(
firDiagnostic as KtPsiDiagnostic,
@@ -861,10 +861,6 @@ sealed interface KtFirDiagnostic<PSI : PsiElement> : KtDiagnosticWithPsi<PSI> {
override val diagnosticClass get() = PotentiallyNonReportedAnnotation::class
}
interface WrongJsQualifier : KtFirDiagnostic<KtElement> {
override val diagnosticClass get() = WrongJsQualifier::class
}
interface JsModuleProhibitedOnVar : KtFirDiagnostic<KtElement> {
override val diagnosticClass get() = JsModuleProhibitedOnVar::class
}
@@ -974,6 +970,10 @@ sealed interface KtFirDiagnostic<PSI : PsiElement> : KtDiagnosticWithPsi<PSI> {
val existing: List<KtSymbol>
}
interface WrongJsQualifier : KtFirDiagnostic<KtElement> {
override val diagnosticClass get() = WrongJsQualifier::class
}
interface OptInUsage : KtFirDiagnostic<PsiElement> {
override val diagnosticClass get() = OptInUsage::class
val optInMarkerFqName: FqName
@@ -3856,21 +3856,6 @@ sealed interface KtFirDiagnostic<PSI : PsiElement> : KtDiagnosticWithPsi<PSI> {
val type: KtType
}
interface CannotCheckForExternalInterface : KtFirDiagnostic<KtElement> {
override val diagnosticClass get() = CannotCheckForExternalInterface::class
val targetType: KtType
}
interface UncheckedCastToExternalInterface : KtFirDiagnostic<KtElement> {
override val diagnosticClass get() = UncheckedCastToExternalInterface::class
val sourceType: KtType
val targetType: KtType
}
interface ExternalInterfaceAsClassLiteral : KtFirDiagnostic<KtElement> {
override val diagnosticClass get() = ExternalInterfaceAsClassLiteral::class
}
interface JsExternalInheritorsOnly : KtFirDiagnostic<KtDeclaration> {
override val diagnosticClass get() = JsExternalInheritorsOnly::class
val parent: KtClassLikeSymbol
@@ -3882,15 +3867,6 @@ sealed interface KtFirDiagnostic<PSI : PsiElement> : KtDiagnosticWithPsi<PSI> {
val argType: KtType
}
interface ExternalInterfaceAsReifiedTypeArgument : KtFirDiagnostic<KtElement> {
override val diagnosticClass get() = ExternalInterfaceAsReifiedTypeArgument::class
val typeArgument: KtType
}
interface NestedJsExport : KtFirDiagnostic<KtElement> {
override val diagnosticClass get() = NestedJsExport::class
}
interface WrongExportedDeclaration : KtFirDiagnostic<KtElement> {
override val diagnosticClass get() = WrongExportedDeclaration::class
val kind: String
@@ -3907,6 +3883,10 @@ sealed interface KtFirDiagnostic<PSI : PsiElement> : KtDiagnosticWithPsi<PSI> {
val name: String
}
interface NestedJsExport : KtFirDiagnostic<KtElement> {
override val diagnosticClass get() = NestedJsExport::class
}
interface DelegationByDynamic : KtFirDiagnostic<KtElement> {
override val diagnosticClass get() = DelegationByDynamic::class
}
@@ -3978,6 +3958,26 @@ sealed interface KtFirDiagnostic<PSI : PsiElement> : KtDiagnosticWithPsi<PSI> {
override val diagnosticClass get() = WrongDefaultValueForExternalFunParameter::class
}
interface CannotCheckForExternalInterface : KtFirDiagnostic<KtElement> {
override val diagnosticClass get() = CannotCheckForExternalInterface::class
val targetType: KtType
}
interface UncheckedCastToExternalInterface : KtFirDiagnostic<KtElement> {
override val diagnosticClass get() = UncheckedCastToExternalInterface::class
val sourceType: KtType
val targetType: KtType
}
interface ExternalInterfaceAsClassLiteral : KtFirDiagnostic<KtElement> {
override val diagnosticClass get() = ExternalInterfaceAsClassLiteral::class
}
interface ExternalInterfaceAsReifiedTypeArgument : KtFirDiagnostic<KtElement> {
override val diagnosticClass get() = ExternalInterfaceAsReifiedTypeArgument::class
val typeArgument: KtType
}
interface JscodeArgumentNonConstExpression : KtFirDiagnostic<KtElement> {
override val diagnosticClass get() = JscodeArgumentNonConstExpression::class
}
@@ -1031,11 +1031,6 @@ internal class PotentiallyNonReportedAnnotationImpl(
token: KtLifetimeToken,
) : KtAbstractFirDiagnostic<KtAnnotationEntry>(firDiagnostic, token), KtFirDiagnostic.PotentiallyNonReportedAnnotation
internal class WrongJsQualifierImpl(
firDiagnostic: KtPsiDiagnostic,
token: KtLifetimeToken,
) : KtAbstractFirDiagnostic<KtElement>(firDiagnostic, token), KtFirDiagnostic.WrongJsQualifier
internal class JsModuleProhibitedOnVarImpl(
firDiagnostic: KtPsiDiagnostic,
token: KtLifetimeToken,
@@ -1169,6 +1164,11 @@ internal class JsFakeNameClashImpl(
token: KtLifetimeToken,
) : KtAbstractFirDiagnostic<KtElement>(firDiagnostic, token), KtFirDiagnostic.JsFakeNameClash
internal class WrongJsQualifierImpl(
firDiagnostic: KtPsiDiagnostic,
token: KtLifetimeToken,
) : KtAbstractFirDiagnostic<KtElement>(firDiagnostic, token), KtFirDiagnostic.WrongJsQualifier
internal class OptInUsageImpl(
override val optInMarkerFqName: FqName,
override val message: String,
@@ -4657,24 +4657,6 @@ internal class NonExternalDeclarationInInappropriateFileImpl(
token: KtLifetimeToken,
) : KtAbstractFirDiagnostic<KtElement>(firDiagnostic, token), KtFirDiagnostic.NonExternalDeclarationInInappropriateFile
internal class CannotCheckForExternalInterfaceImpl(
override val targetType: KtType,
firDiagnostic: KtPsiDiagnostic,
token: KtLifetimeToken,
) : KtAbstractFirDiagnostic<KtElement>(firDiagnostic, token), KtFirDiagnostic.CannotCheckForExternalInterface
internal class UncheckedCastToExternalInterfaceImpl(
override val sourceType: KtType,
override val targetType: KtType,
firDiagnostic: KtPsiDiagnostic,
token: KtLifetimeToken,
) : KtAbstractFirDiagnostic<KtElement>(firDiagnostic, token), KtFirDiagnostic.UncheckedCastToExternalInterface
internal class ExternalInterfaceAsClassLiteralImpl(
firDiagnostic: KtPsiDiagnostic,
token: KtLifetimeToken,
) : KtAbstractFirDiagnostic<KtElement>(firDiagnostic, token), KtFirDiagnostic.ExternalInterfaceAsClassLiteral
internal class JsExternalInheritorsOnlyImpl(
override val parent: KtClassLikeSymbol,
override val kid: KtClassLikeSymbol,
@@ -4688,17 +4670,6 @@ internal class JsExternalArgumentImpl(
token: KtLifetimeToken,
) : KtAbstractFirDiagnostic<KtExpression>(firDiagnostic, token), KtFirDiagnostic.JsExternalArgument
internal class ExternalInterfaceAsReifiedTypeArgumentImpl(
override val typeArgument: KtType,
firDiagnostic: KtPsiDiagnostic,
token: KtLifetimeToken,
) : KtAbstractFirDiagnostic<KtElement>(firDiagnostic, token), KtFirDiagnostic.ExternalInterfaceAsReifiedTypeArgument
internal class NestedJsExportImpl(
firDiagnostic: KtPsiDiagnostic,
token: KtLifetimeToken,
) : KtAbstractFirDiagnostic<KtElement>(firDiagnostic, token), KtFirDiagnostic.NestedJsExport
internal class WrongExportedDeclarationImpl(
override val kind: String,
firDiagnostic: KtPsiDiagnostic,
@@ -4718,6 +4689,11 @@ internal class NonConsumableExportedIdentifierImpl(
token: KtLifetimeToken,
) : KtAbstractFirDiagnostic<KtElement>(firDiagnostic, token), KtFirDiagnostic.NonConsumableExportedIdentifier
internal class NestedJsExportImpl(
firDiagnostic: KtPsiDiagnostic,
token: KtLifetimeToken,
) : KtAbstractFirDiagnostic<KtElement>(firDiagnostic, token), KtFirDiagnostic.NestedJsExport
internal class DelegationByDynamicImpl(
firDiagnostic: KtPsiDiagnostic,
token: KtLifetimeToken,
@@ -4806,6 +4782,30 @@ internal class WrongDefaultValueForExternalFunParameterImpl(
token: KtLifetimeToken,
) : KtAbstractFirDiagnostic<KtElement>(firDiagnostic, token), KtFirDiagnostic.WrongDefaultValueForExternalFunParameter
internal class CannotCheckForExternalInterfaceImpl(
override val targetType: KtType,
firDiagnostic: KtPsiDiagnostic,
token: KtLifetimeToken,
) : KtAbstractFirDiagnostic<KtElement>(firDiagnostic, token), KtFirDiagnostic.CannotCheckForExternalInterface
internal class UncheckedCastToExternalInterfaceImpl(
override val sourceType: KtType,
override val targetType: KtType,
firDiagnostic: KtPsiDiagnostic,
token: KtLifetimeToken,
) : KtAbstractFirDiagnostic<KtElement>(firDiagnostic, token), KtFirDiagnostic.UncheckedCastToExternalInterface
internal class ExternalInterfaceAsClassLiteralImpl(
firDiagnostic: KtPsiDiagnostic,
token: KtLifetimeToken,
) : KtAbstractFirDiagnostic<KtElement>(firDiagnostic, token), KtFirDiagnostic.ExternalInterfaceAsClassLiteral
internal class ExternalInterfaceAsReifiedTypeArgumentImpl(
override val typeArgument: KtType,
firDiagnostic: KtPsiDiagnostic,
token: KtLifetimeToken,
) : KtAbstractFirDiagnostic<KtElement>(firDiagnostic, token), KtFirDiagnostic.ExternalInterfaceAsReifiedTypeArgument
internal class JscodeArgumentNonConstExpressionImpl(
firDiagnostic: KtPsiDiagnostic,
token: KtLifetimeToken,