[K/JS] Support companion objects in external and exported declarations
This commit is contained in:
+12
@@ -5742,6 +5742,12 @@ internal val KT_DIAGNOSTIC_CONVERTER = KtDiagnosticConverterBuilder.buildConvert
|
||||
token,
|
||||
)
|
||||
}
|
||||
add(FirJsErrors.NAMED_COMPANION_IN_EXPORTED_INTERFACE) { firDiagnostic ->
|
||||
NamedCompanionInExportedInterfaceImpl(
|
||||
firDiagnostic as KtPsiDiagnostic,
|
||||
token,
|
||||
)
|
||||
}
|
||||
add(FirWebCommonErrors.NESTED_JS_EXPORT) { firDiagnostic ->
|
||||
NestedJsExportImpl(
|
||||
firDiagnostic as KtPsiDiagnostic,
|
||||
@@ -5881,6 +5887,12 @@ internal val KT_DIAGNOSTIC_CONVERTER = KtDiagnosticConverterBuilder.buildConvert
|
||||
token,
|
||||
)
|
||||
}
|
||||
add(FirWebCommonErrors.NAMED_COMPANION_IN_EXTERNAL_INTERFACE) { firDiagnostic ->
|
||||
NamedCompanionInExternalInterfaceImpl(
|
||||
firDiagnostic as KtPsiDiagnostic,
|
||||
token,
|
||||
)
|
||||
}
|
||||
add(FirWebCommonErrors.JSCODE_ARGUMENT_NON_CONST_EXPRESSION) { firDiagnostic ->
|
||||
JscodeArgumentNonConstExpressionImpl(
|
||||
firDiagnostic as KtPsiDiagnostic,
|
||||
|
||||
+8
@@ -3999,6 +3999,10 @@ sealed interface KtFirDiagnostic<PSI : PsiElement> : KtDiagnosticWithPsi<PSI> {
|
||||
val name: String
|
||||
}
|
||||
|
||||
interface NamedCompanionInExportedInterface : KtFirDiagnostic<KtElement> {
|
||||
override val diagnosticClass get() = NamedCompanionInExportedInterface::class
|
||||
}
|
||||
|
||||
interface NestedJsExport : KtFirDiagnostic<KtElement> {
|
||||
override val diagnosticClass get() = NestedJsExport::class
|
||||
}
|
||||
@@ -4094,6 +4098,10 @@ sealed interface KtFirDiagnostic<PSI : PsiElement> : KtDiagnosticWithPsi<PSI> {
|
||||
val typeArgument: KtType
|
||||
}
|
||||
|
||||
interface NamedCompanionInExternalInterface : KtFirDiagnostic<KtElement> {
|
||||
override val diagnosticClass get() = NamedCompanionInExternalInterface::class
|
||||
}
|
||||
|
||||
interface JscodeArgumentNonConstExpression : KtFirDiagnostic<KtElement> {
|
||||
override val diagnosticClass get() = JscodeArgumentNonConstExpression::class
|
||||
}
|
||||
|
||||
+10
@@ -4828,6 +4828,11 @@ internal class NonConsumableExportedIdentifierImpl(
|
||||
token: KtLifetimeToken,
|
||||
) : KtAbstractFirDiagnostic<KtElement>(firDiagnostic, token), KtFirDiagnostic.NonConsumableExportedIdentifier
|
||||
|
||||
internal class NamedCompanionInExportedInterfaceImpl(
|
||||
firDiagnostic: KtPsiDiagnostic,
|
||||
token: KtLifetimeToken,
|
||||
) : KtAbstractFirDiagnostic<KtElement>(firDiagnostic, token), KtFirDiagnostic.NamedCompanionInExportedInterface
|
||||
|
||||
internal class NestedJsExportImpl(
|
||||
firDiagnostic: KtPsiDiagnostic,
|
||||
token: KtLifetimeToken,
|
||||
@@ -4945,6 +4950,11 @@ internal class ExternalInterfaceAsReifiedTypeArgumentImpl(
|
||||
token: KtLifetimeToken,
|
||||
) : KtAbstractFirDiagnostic<KtElement>(firDiagnostic, token), KtFirDiagnostic.ExternalInterfaceAsReifiedTypeArgument
|
||||
|
||||
internal class NamedCompanionInExternalInterfaceImpl(
|
||||
firDiagnostic: KtPsiDiagnostic,
|
||||
token: KtLifetimeToken,
|
||||
) : KtAbstractFirDiagnostic<KtElement>(firDiagnostic, token), KtFirDiagnostic.NamedCompanionInExternalInterface
|
||||
|
||||
internal class JscodeArgumentNonConstExpressionImpl(
|
||||
firDiagnostic: KtPsiDiagnostic,
|
||||
token: KtLifetimeToken,
|
||||
|
||||
Reference in New Issue
Block a user