[FIR] Add FirDelegateUsesExtensionPropertyTypeParameterChecker
This commit is contained in:
committed by
TeamCityServer
parent
f97e666608
commit
dbfe3524ce
+12
@@ -2471,6 +2471,18 @@ internal val KT_DIAGNOSTIC_CONVERTER = KtDiagnosticConverterBuilder.buildConvert
|
||||
token,
|
||||
)
|
||||
}
|
||||
add(FirErrors.DELEGATE_USES_EXTENSION_PROPERTY_TYPE_PARAMETER) { firDiagnostic ->
|
||||
DelegateUsesExtensionPropertyTypeParameterImpl(
|
||||
firDiagnostic as FirPsiDiagnostic,
|
||||
token,
|
||||
)
|
||||
}
|
||||
add(FirErrors.DELEGATE_USES_EXTENSION_PROPERTY_TYPE_PARAMETER_WARNING) { firDiagnostic ->
|
||||
DelegateUsesExtensionPropertyTypeParameterWarningImpl(
|
||||
firDiagnostic as FirPsiDiagnostic,
|
||||
token,
|
||||
)
|
||||
}
|
||||
add(FirErrors.INITIALIZER_TYPE_MISMATCH) { firDiagnostic ->
|
||||
InitializerTypeMismatchImpl(
|
||||
firSymbolBuilder.typeBuilder.buildKtType(firDiagnostic.a),
|
||||
|
||||
+8
@@ -1749,6 +1749,14 @@ sealed class KtFirDiagnostic<PSI : PsiElement> : KtDiagnosticWithPsi<PSI> {
|
||||
abstract val actualType: KtType
|
||||
}
|
||||
|
||||
abstract class DelegateUsesExtensionPropertyTypeParameter : KtFirDiagnostic<KtProperty>() {
|
||||
override val diagnosticClass get() = DelegateUsesExtensionPropertyTypeParameter::class
|
||||
}
|
||||
|
||||
abstract class DelegateUsesExtensionPropertyTypeParameterWarning : KtFirDiagnostic<KtProperty>() {
|
||||
override val diagnosticClass get() = DelegateUsesExtensionPropertyTypeParameterWarning::class
|
||||
}
|
||||
|
||||
abstract class InitializerTypeMismatch : KtFirDiagnostic<KtProperty>() {
|
||||
override val diagnosticClass get() = InitializerTypeMismatch::class
|
||||
abstract val expectedType: KtType
|
||||
|
||||
+10
@@ -2103,6 +2103,16 @@ internal class WrongSetterParameterTypeImpl(
|
||||
override val token: ValidityToken,
|
||||
) : KtFirDiagnostic.WrongSetterParameterType(), KtAbstractFirDiagnostic<KtTypeReference>
|
||||
|
||||
internal class DelegateUsesExtensionPropertyTypeParameterImpl(
|
||||
override val firDiagnostic: FirPsiDiagnostic,
|
||||
override val token: ValidityToken,
|
||||
) : KtFirDiagnostic.DelegateUsesExtensionPropertyTypeParameter(), KtAbstractFirDiagnostic<KtProperty>
|
||||
|
||||
internal class DelegateUsesExtensionPropertyTypeParameterWarningImpl(
|
||||
override val firDiagnostic: FirPsiDiagnostic,
|
||||
override val token: ValidityToken,
|
||||
) : KtFirDiagnostic.DelegateUsesExtensionPropertyTypeParameterWarning(), KtAbstractFirDiagnostic<KtProperty>
|
||||
|
||||
internal class InitializerTypeMismatchImpl(
|
||||
override val expectedType: KtType,
|
||||
override val actualType: KtType,
|
||||
|
||||
Reference in New Issue
Block a user