[FIR] Add description to NO_ELSE_IN_WHEN and fill it for expect enum or sealed declarations
This commit is contained in:
committed by
Space Team
parent
8c39b2f71d
commit
529d5a1df2
+1
@@ -3822,6 +3822,7 @@ internal val KT_DIAGNOSTIC_CONVERTER = KtDiagnosticConverterBuilder.buildConvert
|
||||
firDiagnostic.a.map { whenMissingCase ->
|
||||
whenMissingCase
|
||||
},
|
||||
firDiagnostic.b,
|
||||
firDiagnostic as KtPsiDiagnostic,
|
||||
token,
|
||||
)
|
||||
|
||||
+1
@@ -2670,6 +2670,7 @@ sealed interface KtFirDiagnostic<PSI : PsiElement> : KtDiagnosticWithPsi<PSI> {
|
||||
interface NoElseInWhen : KtFirDiagnostic<KtWhenExpression> {
|
||||
override val diagnosticClass get() = NoElseInWhen::class
|
||||
val missingWhenCases: List<WhenMissingCase>
|
||||
val description: String
|
||||
}
|
||||
|
||||
interface NonExhaustiveWhenStatement : KtFirDiagnostic<KtWhenExpression> {
|
||||
|
||||
+1
@@ -3217,6 +3217,7 @@ internal class ExpectedConditionImpl(
|
||||
|
||||
internal class NoElseInWhenImpl(
|
||||
override val missingWhenCases: List<WhenMissingCase>,
|
||||
override val description: String,
|
||||
firDiagnostic: KtPsiDiagnostic,
|
||||
token: KtLifetimeToken,
|
||||
) : KtAbstractFirDiagnostic<KtWhenExpression>(firDiagnostic, token), KtFirDiagnostic.NoElseInWhen
|
||||
|
||||
Reference in New Issue
Block a user