[FIR] Add REDUNDANT_INLINE_SUSPEND_FUNCTION_TYPE diagnostic
This commit is contained in:
committed by
teamcityserver
parent
e56deb4525
commit
c46a393a19
+6
@@ -3217,6 +3217,12 @@ internal val KT_DIAGNOSTIC_CONVERTER = KtDiagnosticConverterBuilder.buildConvert
|
||||
token,
|
||||
)
|
||||
}
|
||||
add(FirErrors.REDUNDANT_INLINE_SUSPEND_FUNCTION_TYPE) { firDiagnostic ->
|
||||
RedundantInlineSuspendFunctionTypeImpl(
|
||||
firDiagnostic as FirPsiDiagnostic,
|
||||
token,
|
||||
)
|
||||
}
|
||||
add(FirErrors.CANNOT_ALL_UNDER_IMPORT_FROM_SINGLETON) { firDiagnostic ->
|
||||
CannotAllUnderImportFromSingletonImpl(
|
||||
firDiagnostic.a,
|
||||
|
||||
+4
@@ -2244,6 +2244,10 @@ sealed class KtFirDiagnostic<PSI : PsiElement> : KtDiagnosticWithPsi<PSI> {
|
||||
override val diagnosticClass get() = InlineSuspendFunctionTypeUnsupported::class
|
||||
}
|
||||
|
||||
abstract class RedundantInlineSuspendFunctionType : KtFirDiagnostic<KtElement>() {
|
||||
override val diagnosticClass get() = RedundantInlineSuspendFunctionType::class
|
||||
}
|
||||
|
||||
abstract class CannotAllUnderImportFromSingleton : KtFirDiagnostic<KtImportDirective>() {
|
||||
override val diagnosticClass get() = CannotAllUnderImportFromSingleton::class
|
||||
abstract val objectName: Name
|
||||
|
||||
+7
@@ -3625,6 +3625,13 @@ internal class InlineSuspendFunctionTypeUnsupportedImpl(
|
||||
override val firDiagnostic: FirPsiDiagnostic by weakRef(firDiagnostic)
|
||||
}
|
||||
|
||||
internal class RedundantInlineSuspendFunctionTypeImpl(
|
||||
firDiagnostic: FirPsiDiagnostic,
|
||||
override val token: ValidityToken,
|
||||
) : KtFirDiagnostic.RedundantInlineSuspendFunctionType(), KtAbstractFirDiagnostic<KtElement> {
|
||||
override val firDiagnostic: FirPsiDiagnostic by weakRef(firDiagnostic)
|
||||
}
|
||||
|
||||
internal class CannotAllUnderImportFromSingletonImpl(
|
||||
override val objectName: Name,
|
||||
firDiagnostic: FirPsiDiagnostic,
|
||||
|
||||
Reference in New Issue
Block a user