[FIR] Report UNSUPPORTED_SEALED_FUN_INTERFACE
^KT-59957 Fixed
This commit is contained in:
committed by
Space Team
parent
8be98da1d3
commit
b7d1298f20
+6
@@ -650,6 +650,12 @@ internal val KT_DIAGNOSTIC_CONVERTER = KtDiagnosticConverterBuilder.buildConvert
|
||||
token,
|
||||
)
|
||||
}
|
||||
add(FirErrors.UNSUPPORTED_SEALED_FUN_INTERFACE) { firDiagnostic ->
|
||||
UnsupportedSealedFunInterfaceImpl(
|
||||
firDiagnostic as KtPsiDiagnostic,
|
||||
token,
|
||||
)
|
||||
}
|
||||
add(FirErrors.SUPERTYPE_NOT_A_CLASS_OR_INTERFACE) { firDiagnostic ->
|
||||
SupertypeNotAClassOrInterfaceImpl(
|
||||
firDiagnostic.a,
|
||||
|
||||
+4
@@ -497,6 +497,10 @@ sealed interface KtFirDiagnostic<PSI : PsiElement> : KtDiagnosticWithPsi<PSI> {
|
||||
override val diagnosticClass get() = ClassInheritsJavaSealedClass::class
|
||||
}
|
||||
|
||||
interface UnsupportedSealedFunInterface : KtFirDiagnostic<PsiElement> {
|
||||
override val diagnosticClass get() = UnsupportedSealedFunInterface::class
|
||||
}
|
||||
|
||||
interface SupertypeNotAClassOrInterface : KtFirDiagnostic<KtElement> {
|
||||
override val diagnosticClass get() = SupertypeNotAClassOrInterface::class
|
||||
val reason: String
|
||||
|
||||
+5
@@ -584,6 +584,11 @@ internal class ClassInheritsJavaSealedClassImpl(
|
||||
token: KtLifetimeToken,
|
||||
) : KtAbstractFirDiagnostic<KtTypeReference>(firDiagnostic, token), KtFirDiagnostic.ClassInheritsJavaSealedClass
|
||||
|
||||
internal class UnsupportedSealedFunInterfaceImpl(
|
||||
firDiagnostic: KtPsiDiagnostic,
|
||||
token: KtLifetimeToken,
|
||||
) : KtAbstractFirDiagnostic<PsiElement>(firDiagnostic, token), KtFirDiagnostic.UnsupportedSealedFunInterface
|
||||
|
||||
internal class SupertypeNotAClassOrInterfaceImpl(
|
||||
override val reason: String,
|
||||
firDiagnostic: KtPsiDiagnostic,
|
||||
|
||||
Reference in New Issue
Block a user