[FIR JS] Support NON_EXTERNAL_DECLARATION_IN_INAPPROPRIATE_FILE
This commit is contained in:
committed by
Space Team
parent
5b3a73f7cd
commit
85bcef537c
+7
@@ -4829,6 +4829,13 @@ internal val KT_DIAGNOSTIC_CONVERTER = KtDiagnosticConverterBuilder.buildConvert
|
||||
token,
|
||||
)
|
||||
}
|
||||
add(FirJsErrors.NON_EXTERNAL_DECLARATION_IN_INAPPROPRIATE_FILE) { firDiagnostic ->
|
||||
NonExternalDeclarationInInappropriateFileImpl(
|
||||
firSymbolBuilder.typeBuilder.buildKtType(firDiagnostic.a),
|
||||
firDiagnostic as KtPsiDiagnostic,
|
||||
token,
|
||||
)
|
||||
}
|
||||
add(FirJsErrors.DELEGATION_BY_DYNAMIC) { firDiagnostic ->
|
||||
DelegationByDynamicImpl(
|
||||
firDiagnostic as KtPsiDiagnostic,
|
||||
|
||||
+5
@@ -3356,6 +3356,11 @@ sealed class KtFirDiagnostic<PSI : PsiElement> : KtDiagnosticWithPsi<PSI> {
|
||||
override val diagnosticClass get() = NonAbstractMemberOfExternalInterface::class
|
||||
}
|
||||
|
||||
abstract class NonExternalDeclarationInInappropriateFile : KtFirDiagnostic<KtElement>() {
|
||||
override val diagnosticClass get() = NonExternalDeclarationInInappropriateFile::class
|
||||
abstract val type: KtType
|
||||
}
|
||||
|
||||
abstract class DelegationByDynamic : KtFirDiagnostic<KtElement>() {
|
||||
override val diagnosticClass get() = DelegationByDynamic::class
|
||||
}
|
||||
|
||||
+6
@@ -4063,6 +4063,12 @@ internal class NonAbstractMemberOfExternalInterfaceImpl(
|
||||
override val token: KtLifetimeToken,
|
||||
) : KtFirDiagnostic.NonAbstractMemberOfExternalInterface(), KtAbstractFirDiagnostic<KtExpression>
|
||||
|
||||
internal class NonExternalDeclarationInInappropriateFileImpl(
|
||||
override val type: KtType,
|
||||
override val firDiagnostic: KtPsiDiagnostic,
|
||||
override val token: KtLifetimeToken,
|
||||
) : KtFirDiagnostic.NonExternalDeclarationInInappropriateFile(), KtAbstractFirDiagnostic<KtElement>
|
||||
|
||||
internal class DelegationByDynamicImpl(
|
||||
override val firDiagnostic: KtPsiDiagnostic,
|
||||
override val token: KtLifetimeToken,
|
||||
|
||||
Reference in New Issue
Block a user