[FIR] Implement DEFAULT_VALUE_NOT_ALLOWED_IN_OVERRIDE diagnostic
#KT-59409 Fixed
This commit is contained in:
committed by
Space Team
parent
d93ffe0aec
commit
53ff4584d4
+6
@@ -2868,6 +2868,12 @@ internal val KT_DIAGNOSTIC_CONVERTER = KtDiagnosticConverterBuilder.buildConvert
|
||||
token,
|
||||
)
|
||||
}
|
||||
add(FirErrors.DEFAULT_VALUE_NOT_ALLOWED_IN_OVERRIDE) { firDiagnostic ->
|
||||
DefaultValueNotAllowedInOverrideImpl(
|
||||
firDiagnostic as KtPsiDiagnostic,
|
||||
token,
|
||||
)
|
||||
}
|
||||
add(FirErrors.FUN_INTERFACE_CONSTRUCTOR_REFERENCE) { firDiagnostic ->
|
||||
FunInterfaceConstructorReferenceImpl(
|
||||
firDiagnostic as KtPsiDiagnostic,
|
||||
|
||||
+4
@@ -2032,6 +2032,10 @@ sealed interface KtFirDiagnostic<PSI : PsiElement> : KtDiagnosticWithPsi<PSI> {
|
||||
override val diagnosticClass get() = DataObjectCustomEqualsOrHashCode::class
|
||||
}
|
||||
|
||||
interface DefaultValueNotAllowedInOverride : KtFirDiagnostic<KtElement> {
|
||||
override val diagnosticClass get() = DefaultValueNotAllowedInOverride::class
|
||||
}
|
||||
|
||||
interface FunInterfaceConstructorReference : KtFirDiagnostic<KtExpression> {
|
||||
override val diagnosticClass get() = FunInterfaceConstructorReference::class
|
||||
}
|
||||
|
||||
+5
@@ -2439,6 +2439,11 @@ internal class DataObjectCustomEqualsOrHashCodeImpl(
|
||||
token: KtLifetimeToken,
|
||||
) : KtAbstractFirDiagnostic<KtNamedFunction>(firDiagnostic, token), KtFirDiagnostic.DataObjectCustomEqualsOrHashCode
|
||||
|
||||
internal class DefaultValueNotAllowedInOverrideImpl(
|
||||
firDiagnostic: KtPsiDiagnostic,
|
||||
token: KtLifetimeToken,
|
||||
) : KtAbstractFirDiagnostic<KtElement>(firDiagnostic, token), KtFirDiagnostic.DefaultValueNotAllowedInOverride
|
||||
|
||||
internal class FunInterfaceConstructorReferenceImpl(
|
||||
firDiagnostic: KtPsiDiagnostic,
|
||||
token: KtLifetimeToken,
|
||||
|
||||
Reference in New Issue
Block a user