[FIR] Report MIXING_SUSPEND_AND_NON_SUSPEND_SUPERTYPES
^KT-59367 Fixed
This commit is contained in:
committed by
Space Team
parent
b3e4099703
commit
f674529558
+6
@@ -4665,6 +4665,12 @@ internal val KT_DIAGNOSTIC_CONVERTER = KtDiagnosticConverterBuilder.buildConvert
|
||||
token,
|
||||
)
|
||||
}
|
||||
add(FirErrors.MIXING_SUSPEND_AND_NON_SUSPEND_SUPERTYPES) { firDiagnostic ->
|
||||
MixingSuspendAndNonSuspendSupertypesImpl(
|
||||
firDiagnostic as KtPsiDiagnostic,
|
||||
token,
|
||||
)
|
||||
}
|
||||
add(FirErrors.REDUNDANT_LABEL_WARNING) { firDiagnostic ->
|
||||
RedundantLabelWarningImpl(
|
||||
firDiagnostic as KtPsiDiagnostic,
|
||||
|
||||
+4
@@ -3256,6 +3256,10 @@ sealed interface KtFirDiagnostic<PSI : PsiElement> : KtDiagnosticWithPsi<PSI> {
|
||||
override val diagnosticClass get() = ReturnForBuiltInSuspend::class
|
||||
}
|
||||
|
||||
interface MixingSuspendAndNonSuspendSupertypes : KtFirDiagnostic<PsiElement> {
|
||||
override val diagnosticClass get() = MixingSuspendAndNonSuspendSupertypes::class
|
||||
}
|
||||
|
||||
interface RedundantLabelWarning : KtFirDiagnostic<KtLabelReferenceExpression> {
|
||||
override val diagnosticClass get() = RedundantLabelWarning::class
|
||||
}
|
||||
|
||||
+5
@@ -3928,6 +3928,11 @@ internal class ReturnForBuiltInSuspendImpl(
|
||||
token: KtLifetimeToken,
|
||||
) : KtAbstractFirDiagnostic<KtReturnExpression>(firDiagnostic, token), KtFirDiagnostic.ReturnForBuiltInSuspend
|
||||
|
||||
internal class MixingSuspendAndNonSuspendSupertypesImpl(
|
||||
firDiagnostic: KtPsiDiagnostic,
|
||||
token: KtLifetimeToken,
|
||||
) : KtAbstractFirDiagnostic<PsiElement>(firDiagnostic, token), KtFirDiagnostic.MixingSuspendAndNonSuspendSupertypes
|
||||
|
||||
internal class RedundantLabelWarningImpl(
|
||||
firDiagnostic: KtPsiDiagnostic,
|
||||
token: KtLifetimeToken,
|
||||
|
||||
Reference in New Issue
Block a user