[FIR] Implement ADAPTED_CALLABLE_REFERENCE_AGAINST_REFLECTION_TYPE diagnostic
#KT-59401 Fixed
This commit is contained in:
committed by
Space Team
parent
d91000e39c
commit
789f886d3c
+6
@@ -2597,6 +2597,12 @@ internal val KT_DIAGNOSTIC_CONVERTER = KtDiagnosticConverterBuilder.buildConvert
|
||||
token,
|
||||
)
|
||||
}
|
||||
add(FirErrors.ADAPTED_CALLABLE_REFERENCE_AGAINST_REFLECTION_TYPE) { firDiagnostic ->
|
||||
AdaptedCallableReferenceAgainstReflectionTypeImpl(
|
||||
firDiagnostic as KtPsiDiagnostic,
|
||||
token,
|
||||
)
|
||||
}
|
||||
add(FirErrors.CLASS_LITERAL_LHS_NOT_A_CLASS) { firDiagnostic ->
|
||||
ClassLiteralLhsNotAClassImpl(
|
||||
firDiagnostic as KtPsiDiagnostic,
|
||||
|
||||
+4
@@ -1841,6 +1841,10 @@ sealed interface KtFirDiagnostic<PSI : PsiElement> : KtDiagnosticWithPsi<PSI> {
|
||||
override val diagnosticClass get() = CallableReferenceToAnnotationConstructor::class
|
||||
}
|
||||
|
||||
interface AdaptedCallableReferenceAgainstReflectionType : KtFirDiagnostic<KtExpression> {
|
||||
override val diagnosticClass get() = AdaptedCallableReferenceAgainstReflectionType::class
|
||||
}
|
||||
|
||||
interface ClassLiteralLhsNotAClass : KtFirDiagnostic<KtExpression> {
|
||||
override val diagnosticClass get() = ClassLiteralLhsNotAClass::class
|
||||
}
|
||||
|
||||
+5
@@ -2212,6 +2212,11 @@ internal class CallableReferenceToAnnotationConstructorImpl(
|
||||
token: KtLifetimeToken,
|
||||
) : KtAbstractFirDiagnostic<KtExpression>(firDiagnostic, token), KtFirDiagnostic.CallableReferenceToAnnotationConstructor
|
||||
|
||||
internal class AdaptedCallableReferenceAgainstReflectionTypeImpl(
|
||||
firDiagnostic: KtPsiDiagnostic,
|
||||
token: KtLifetimeToken,
|
||||
) : KtAbstractFirDiagnostic<KtExpression>(firDiagnostic, token), KtFirDiagnostic.AdaptedCallableReferenceAgainstReflectionType
|
||||
|
||||
internal class ClassLiteralLhsNotAClassImpl(
|
||||
firDiagnostic: KtPsiDiagnostic,
|
||||
token: KtLifetimeToken,
|
||||
|
||||
Reference in New Issue
Block a user