[FIR] Implement PROTECTED_CONSTRUCTOR_NOT_IN_SUPER_CALL
^KT-59382 Fixed
This commit is contained in:
committed by
Space Team
parent
00fb927624
commit
4bba93f633
+7
@@ -724,6 +724,13 @@ internal val KT_DIAGNOSTIC_CONVERTER = KtDiagnosticConverterBuilder.buildConvert
|
||||
token,
|
||||
)
|
||||
}
|
||||
add(FirErrors.PROTECTED_CONSTRUCTOR_NOT_IN_SUPER_CALL) { firDiagnostic ->
|
||||
ProtectedConstructorNotInSuperCallImpl(
|
||||
firSymbolBuilder.buildSymbol(firDiagnostic.a),
|
||||
firDiagnostic as KtPsiDiagnostic,
|
||||
token,
|
||||
)
|
||||
}
|
||||
add(FirErrors.SUPERTYPE_NOT_INITIALIZED) { firDiagnostic ->
|
||||
SupertypeNotInitializedImpl(
|
||||
firDiagnostic as KtPsiDiagnostic,
|
||||
|
||||
+5
@@ -542,6 +542,11 @@ sealed interface KtFirDiagnostic<PSI : PsiElement> : KtDiagnosticWithPsi<PSI> {
|
||||
override val diagnosticClass get() = PrimaryConstructorDelegationCallExpected::class
|
||||
}
|
||||
|
||||
interface ProtectedConstructorNotInSuperCall : KtFirDiagnostic<KtExpression> {
|
||||
override val diagnosticClass get() = ProtectedConstructorNotInSuperCall::class
|
||||
val symbol: KtSymbol
|
||||
}
|
||||
|
||||
interface SupertypeNotInitialized : KtFirDiagnostic<KtTypeReference> {
|
||||
override val diagnosticClass get() = SupertypeNotInitialized::class
|
||||
}
|
||||
|
||||
+6
@@ -640,6 +640,12 @@ internal class PrimaryConstructorDelegationCallExpectedImpl(
|
||||
token: KtLifetimeToken,
|
||||
) : KtAbstractFirDiagnostic<PsiElement>(firDiagnostic, token), KtFirDiagnostic.PrimaryConstructorDelegationCallExpected
|
||||
|
||||
internal class ProtectedConstructorNotInSuperCallImpl(
|
||||
override val symbol: KtSymbol,
|
||||
firDiagnostic: KtPsiDiagnostic,
|
||||
token: KtLifetimeToken,
|
||||
) : KtAbstractFirDiagnostic<KtExpression>(firDiagnostic, token), KtFirDiagnostic.ProtectedConstructorNotInSuperCall
|
||||
|
||||
internal class SupertypeNotInitializedImpl(
|
||||
firDiagnostic: KtPsiDiagnostic,
|
||||
token: KtLifetimeToken,
|
||||
|
||||
Reference in New Issue
Block a user