FIR checker: improve diagnostics message for SEALED_INHERITOR_IN_DIFFERENT_PACKAGE

This commit is contained in:
Tianyu Geng
2021-08-24 17:13:58 +00:00
committed by TeamCityServer
parent 10d4dfef04
commit 1e8e38e5ac
7 changed files with 5 additions and 25 deletions
@@ -452,8 +452,6 @@ internal val KT_DIAGNOSTIC_CONVERTER = KtDiagnosticConverterBuilder.buildConvert
}
add(FirErrors.SEALED_INHERITOR_IN_DIFFERENT_PACKAGE) { firDiagnostic ->
SealedInheritorInDifferentPackageImpl(
firDiagnostic.a,
firDiagnostic.b,
firDiagnostic as FirPsiDiagnostic,
token,
)
@@ -343,8 +343,6 @@ sealed class KtFirDiagnostic<PSI : PsiElement> : KtDiagnosticWithPsi<PSI> {
abstract class SealedInheritorInDifferentPackage : KtFirDiagnostic<KtTypeReference>() {
override val diagnosticClass get() = SealedInheritorInDifferentPackage::class
abstract val subclassPackage: FqName
abstract val basePackage: FqName
}
abstract class SealedInheritorInDifferentModule : KtFirDiagnostic<KtTypeReference>() {
@@ -523,8 +523,6 @@ internal class SealedSupertypeInLocalClassImpl(
}
internal class SealedInheritorInDifferentPackageImpl(
override val subclassPackage: FqName,
override val basePackage: FqName,
firDiagnostic: FirPsiDiagnostic,
override val token: ValidityToken,
) : KtFirDiagnostic.SealedInheritorInDifferentPackage(), KtAbstractFirDiagnostic<KtTypeReference> {