[FIR] Support ENUM_CLASS_CONSTRUCTOR_CALL
^KT-59411 Fixed
This commit is contained in:
committed by
Space Team
parent
f4ffd479cc
commit
e4246e8f51
+6
@@ -863,6 +863,12 @@ internal val KT_DIAGNOSTIC_CONVERTER = KtDiagnosticConverterBuilder.buildConvert
|
||||
token,
|
||||
)
|
||||
}
|
||||
add(FirErrors.ENUM_CLASS_CONSTRUCTOR_CALL) { firDiagnostic ->
|
||||
EnumClassConstructorCallImpl(
|
||||
firDiagnostic as KtPsiDiagnostic,
|
||||
token,
|
||||
)
|
||||
}
|
||||
add(FirErrors.NOT_AN_ANNOTATION_CLASS) { firDiagnostic ->
|
||||
NotAnAnnotationClassImpl(
|
||||
firDiagnostic.a,
|
||||
|
||||
+4
@@ -635,6 +635,10 @@ sealed interface KtFirDiagnostic<PSI : PsiElement> : KtDiagnosticWithPsi<PSI> {
|
||||
override val diagnosticClass get() = AnnotationClassConstructorCall::class
|
||||
}
|
||||
|
||||
interface EnumClassConstructorCall : KtFirDiagnostic<KtCallExpression> {
|
||||
override val diagnosticClass get() = EnumClassConstructorCall::class
|
||||
}
|
||||
|
||||
interface NotAnAnnotationClass : KtFirDiagnostic<PsiElement> {
|
||||
override val diagnosticClass get() = NotAnAnnotationClass::class
|
||||
val annotationName: String
|
||||
|
||||
+5
@@ -756,6 +756,11 @@ internal class AnnotationClassConstructorCallImpl(
|
||||
token: KtLifetimeToken,
|
||||
) : KtAbstractFirDiagnostic<KtCallExpression>(firDiagnostic, token), KtFirDiagnostic.AnnotationClassConstructorCall
|
||||
|
||||
internal class EnumClassConstructorCallImpl(
|
||||
firDiagnostic: KtPsiDiagnostic,
|
||||
token: KtLifetimeToken,
|
||||
) : KtAbstractFirDiagnostic<KtCallExpression>(firDiagnostic, token), KtFirDiagnostic.EnumClassConstructorCall
|
||||
|
||||
internal class NotAnAnnotationClassImpl(
|
||||
override val annotationName: String,
|
||||
firDiagnostic: KtPsiDiagnostic,
|
||||
|
||||
Reference in New Issue
Block a user