FIR checker: clearer parameter names in diagnostics

This commit is contained in:
Jinseong Jeon
2021-05-10 14:33:49 -07:00
committed by teamcityserver
parent e08df2c530
commit 864ab2cadd
3 changed files with 18 additions and 18 deletions
@@ -375,8 +375,8 @@ object DIAGNOSTICS_LIST : DiagnosticList() {
val TYPE_PARAMETER_OF_PROPERTY_NOT_USED_IN_RECEIVER by error<KtTypeParameter>()
val RETURN_TYPE_MISMATCH by error<KtExpression>(PositioningStrategy.WHOLE_ELEMENT) {
parameter<ConeKotlinType>("expected")
parameter<ConeKotlinType>("actual")
parameter<ConeKotlinType>("expectedType")
parameter<ConeKotlinType>("actualType")
}
val CYCLIC_GENERIC_UPPER_BOUND by error<PsiElement>()
@@ -591,8 +591,8 @@ object DIAGNOSTICS_LIST : DiagnosticList() {
parameter<ConeKotlinType>("actualType")
}
val INITIALIZER_TYPE_MISMATCH by error<KtProperty>(PositioningStrategy.ASSIGNMENT_VALUE) {
parameter<ConeKotlinType>("expected")
parameter<ConeKotlinType>("actual")
parameter<ConeKotlinType>("expectedType")
parameter<ConeKotlinType>("actualType")
}
val GETTER_VISIBILITY_DIFFERS_FROM_PROPERTY_VISIBILITY by error<KtModifierListOwner>(PositioningStrategy.VISIBILITY_MODIFIER)
val SETTER_VISIBILITY_INCONSISTENT_WITH_PROPERTY_VISIBILITY by error<KtModifierListOwner>(PositioningStrategy.VISIBILITY_MODIFIER)
@@ -760,8 +760,8 @@ object DIAGNOSTICS_LIST : DiagnosticList() {
}
val DELEGATE_SPECIAL_FUNCTION_RETURN_TYPE_MISMATCH by error<KtExpression> {
parameter<String>("delegateFunction")
parameter<ConeKotlinType>("expected")
parameter<ConeKotlinType>("actual")
parameter<ConeKotlinType>("expectedType")
parameter<ConeKotlinType>("actualType")
}
val UNDERSCORE_IS_RESERVED by error<KtExpression>(PositioningStrategy.RESERVED_UNDERSCORE)
@@ -830,8 +830,8 @@ sealed class KtFirDiagnostic<PSI: PsiElement> : KtDiagnosticWithPsi<PSI> {
abstract class ReturnTypeMismatch : KtFirDiagnostic<KtExpression>() {
override val diagnosticClass get() = ReturnTypeMismatch::class
abstract val expected: KtType
abstract val actual: KtType
abstract val expectedType: KtType
abstract val actualType: KtType
}
abstract class CyclicGenericUpperBound : KtFirDiagnostic<PsiElement>() {
@@ -1219,8 +1219,8 @@ sealed class KtFirDiagnostic<PSI: PsiElement> : KtDiagnosticWithPsi<PSI> {
abstract class InitializerTypeMismatch : KtFirDiagnostic<KtProperty>() {
override val diagnosticClass get() = InitializerTypeMismatch::class
abstract val expected: KtType
abstract val actual: KtType
abstract val expectedType: KtType
abstract val actualType: KtType
}
abstract class GetterVisibilityDiffersFromPropertyVisibility : KtFirDiagnostic<KtModifierListOwner>() {
@@ -1497,8 +1497,8 @@ sealed class KtFirDiagnostic<PSI: PsiElement> : KtDiagnosticWithPsi<PSI> {
abstract class DelegateSpecialFunctionReturnTypeMismatch : KtFirDiagnostic<KtExpression>() {
override val diagnosticClass get() = DelegateSpecialFunctionReturnTypeMismatch::class
abstract val delegateFunction: String
abstract val expected: KtType
abstract val actual: KtType
abstract val expectedType: KtType
abstract val actualType: KtType
}
abstract class UnderscoreIsReserved : KtFirDiagnostic<KtExpression>() {
@@ -1343,8 +1343,8 @@ internal class TypeParameterOfPropertyNotUsedInReceiverImpl(
}
internal class ReturnTypeMismatchImpl(
override val expected: KtType,
override val actual: KtType,
override val expectedType: KtType,
override val actualType: KtType,
firDiagnostic: FirPsiDiagnostic<*>,
override val token: ValidityToken,
) : KtFirDiagnostic.ReturnTypeMismatch(), KtAbstractFirDiagnostic<KtExpression> {
@@ -1981,8 +1981,8 @@ internal class WrongSetterParameterTypeImpl(
}
internal class InitializerTypeMismatchImpl(
override val expected: KtType,
override val actual: KtType,
override val expectedType: KtType,
override val actualType: KtType,
firDiagnostic: FirPsiDiagnostic<*>,
override val token: ValidityToken,
) : KtFirDiagnostic.InitializerTypeMismatch(), KtAbstractFirDiagnostic<KtProperty> {
@@ -2430,8 +2430,8 @@ internal class DelegateSpecialFunctionNoneApplicableImpl(
internal class DelegateSpecialFunctionReturnTypeMismatchImpl(
override val delegateFunction: String,
override val expected: KtType,
override val actual: KtType,
override val expectedType: KtType,
override val actualType: KtType,
firDiagnostic: FirPsiDiagnostic<*>,
override val token: ValidityToken,
) : KtFirDiagnostic.DelegateSpecialFunctionReturnTypeMismatch(), KtAbstractFirDiagnostic<KtExpression> {