[FIR] Report UNSUPPORTED_SUSPEND_TEST
^KT-60002 Fixed
This commit is contained in:
committed by
Space Team
parent
223e590dcd
commit
921db9f8d4
+6
@@ -82,6 +82,12 @@ internal val KT_DIAGNOSTIC_CONVERTER = KtDiagnosticConverterBuilder.buildConvert
|
||||
token,
|
||||
)
|
||||
}
|
||||
add(FirErrors.UNSUPPORTED_SUSPEND_TEST) { firDiagnostic ->
|
||||
UnsupportedSuspendTestImpl(
|
||||
firDiagnostic as KtPsiDiagnostic,
|
||||
token,
|
||||
)
|
||||
}
|
||||
add(FirErrors.NEW_INFERENCE_ERROR) { firDiagnostic ->
|
||||
NewInferenceErrorImpl(
|
||||
firDiagnostic.a,
|
||||
|
||||
+4
@@ -103,6 +103,10 @@ sealed interface KtFirDiagnostic<PSI : PsiElement> : KtDiagnosticWithPsi<PSI> {
|
||||
val unsupportedFeature: Pair<LanguageFeature, LanguageVersionSettings>
|
||||
}
|
||||
|
||||
interface UnsupportedSuspendTest : KtFirDiagnostic<PsiElement> {
|
||||
override val diagnosticClass get() = UnsupportedSuspendTest::class
|
||||
}
|
||||
|
||||
interface NewInferenceError : KtFirDiagnostic<PsiElement> {
|
||||
override val diagnosticClass get() = NewInferenceError::class
|
||||
val error: String
|
||||
|
||||
+5
@@ -105,6 +105,11 @@ internal class UnsupportedFeatureImpl(
|
||||
token: KtLifetimeToken,
|
||||
) : KtAbstractFirDiagnostic<PsiElement>(firDiagnostic, token), KtFirDiagnostic.UnsupportedFeature
|
||||
|
||||
internal class UnsupportedSuspendTestImpl(
|
||||
firDiagnostic: KtPsiDiagnostic,
|
||||
token: KtLifetimeToken,
|
||||
) : KtAbstractFirDiagnostic<PsiElement>(firDiagnostic, token), KtFirDiagnostic.UnsupportedSuspendTest
|
||||
|
||||
internal class NewInferenceErrorImpl(
|
||||
override val error: String,
|
||||
firDiagnostic: KtPsiDiagnostic,
|
||||
|
||||
Reference in New Issue
Block a user