[FIR] Implement EXPECT_AND_ACTUAL_IN_THE_SAME_MODULE
^KT-60367 Fixed KT review: https://jetbrains.team/p/kt/reviews/14064/timeline IJ review: https://jetbrains.team/p/ij/reviews/124657/timeline
This commit is contained in:
+7
@@ -3042,6 +3042,13 @@ internal val KT_DIAGNOSTIC_CONVERTER = KtDiagnosticConverterBuilder.buildConvert
|
||||
token,
|
||||
)
|
||||
}
|
||||
add(FirErrors.EXPECT_AND_ACTUAL_IN_THE_SAME_MODULE) { firDiagnostic ->
|
||||
ExpectAndActualInTheSameModuleImpl(
|
||||
firSymbolBuilder.buildSymbol(firDiagnostic.a),
|
||||
firDiagnostic as KtPsiDiagnostic,
|
||||
token,
|
||||
)
|
||||
}
|
||||
add(FirErrors.METHOD_OF_ANY_IMPLEMENTED_IN_INTERFACE) { firDiagnostic ->
|
||||
MethodOfAnyImplementedInInterfaceImpl(
|
||||
firDiagnostic as KtPsiDiagnostic,
|
||||
|
||||
+5
@@ -2151,6 +2151,11 @@ sealed interface KtFirDiagnostic<PSI : PsiElement> : KtDiagnosticWithPsi<PSI> {
|
||||
val conflictingDeclarations: List<KtSymbol>
|
||||
}
|
||||
|
||||
interface ExpectAndActualInTheSameModule : KtFirDiagnostic<KtNamedDeclaration> {
|
||||
override val diagnosticClass get() = ExpectAndActualInTheSameModule::class
|
||||
val declaration: KtSymbol
|
||||
}
|
||||
|
||||
interface MethodOfAnyImplementedInInterface : KtFirDiagnostic<PsiElement> {
|
||||
override val diagnosticClass get() = MethodOfAnyImplementedInInterface::class
|
||||
}
|
||||
|
||||
+6
@@ -2577,6 +2577,12 @@ internal class PackageOrClassifierRedeclarationImpl(
|
||||
token: KtLifetimeToken,
|
||||
) : KtAbstractFirDiagnostic<KtNamedDeclaration>(firDiagnostic, token), KtFirDiagnostic.PackageOrClassifierRedeclaration
|
||||
|
||||
internal class ExpectAndActualInTheSameModuleImpl(
|
||||
override val declaration: KtSymbol,
|
||||
firDiagnostic: KtPsiDiagnostic,
|
||||
token: KtLifetimeToken,
|
||||
) : KtAbstractFirDiagnostic<KtNamedDeclaration>(firDiagnostic, token), KtFirDiagnostic.ExpectAndActualInTheSameModule
|
||||
|
||||
internal class MethodOfAnyImplementedInInterfaceImpl(
|
||||
firDiagnostic: KtPsiDiagnostic,
|
||||
token: KtLifetimeToken,
|
||||
|
||||
Reference in New Issue
Block a user