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 TYPE_PARAMETER_OF_PROPERTY_NOT_USED_IN_RECEIVER by error<KtTypeParameter>()
val RETURN_TYPE_MISMATCH by error<KtExpression>(PositioningStrategy.WHOLE_ELEMENT) { val RETURN_TYPE_MISMATCH by error<KtExpression>(PositioningStrategy.WHOLE_ELEMENT) {
parameter<ConeKotlinType>("expected") parameter<ConeKotlinType>("expectedType")
parameter<ConeKotlinType>("actual") parameter<ConeKotlinType>("actualType")
} }
val CYCLIC_GENERIC_UPPER_BOUND by error<PsiElement>() val CYCLIC_GENERIC_UPPER_BOUND by error<PsiElement>()
@@ -591,8 +591,8 @@ object DIAGNOSTICS_LIST : DiagnosticList() {
parameter<ConeKotlinType>("actualType") parameter<ConeKotlinType>("actualType")
} }
val INITIALIZER_TYPE_MISMATCH by error<KtProperty>(PositioningStrategy.ASSIGNMENT_VALUE) { val INITIALIZER_TYPE_MISMATCH by error<KtProperty>(PositioningStrategy.ASSIGNMENT_VALUE) {
parameter<ConeKotlinType>("expected") parameter<ConeKotlinType>("expectedType")
parameter<ConeKotlinType>("actual") parameter<ConeKotlinType>("actualType")
} }
val GETTER_VISIBILITY_DIFFERS_FROM_PROPERTY_VISIBILITY by error<KtModifierListOwner>(PositioningStrategy.VISIBILITY_MODIFIER) 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) 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> { val DELEGATE_SPECIAL_FUNCTION_RETURN_TYPE_MISMATCH by error<KtExpression> {
parameter<String>("delegateFunction") parameter<String>("delegateFunction")
parameter<ConeKotlinType>("expected") parameter<ConeKotlinType>("expectedType")
parameter<ConeKotlinType>("actual") parameter<ConeKotlinType>("actualType")
} }
val UNDERSCORE_IS_RESERVED by error<KtExpression>(PositioningStrategy.RESERVED_UNDERSCORE) 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>() { abstract class ReturnTypeMismatch : KtFirDiagnostic<KtExpression>() {
override val diagnosticClass get() = ReturnTypeMismatch::class override val diagnosticClass get() = ReturnTypeMismatch::class
abstract val expected: KtType abstract val expectedType: KtType
abstract val actual: KtType abstract val actualType: KtType
} }
abstract class CyclicGenericUpperBound : KtFirDiagnostic<PsiElement>() { abstract class CyclicGenericUpperBound : KtFirDiagnostic<PsiElement>() {
@@ -1219,8 +1219,8 @@ sealed class KtFirDiagnostic<PSI: PsiElement> : KtDiagnosticWithPsi<PSI> {
abstract class InitializerTypeMismatch : KtFirDiagnostic<KtProperty>() { abstract class InitializerTypeMismatch : KtFirDiagnostic<KtProperty>() {
override val diagnosticClass get() = InitializerTypeMismatch::class override val diagnosticClass get() = InitializerTypeMismatch::class
abstract val expected: KtType abstract val expectedType: KtType
abstract val actual: KtType abstract val actualType: KtType
} }
abstract class GetterVisibilityDiffersFromPropertyVisibility : KtFirDiagnostic<KtModifierListOwner>() { abstract class GetterVisibilityDiffersFromPropertyVisibility : KtFirDiagnostic<KtModifierListOwner>() {
@@ -1497,8 +1497,8 @@ sealed class KtFirDiagnostic<PSI: PsiElement> : KtDiagnosticWithPsi<PSI> {
abstract class DelegateSpecialFunctionReturnTypeMismatch : KtFirDiagnostic<KtExpression>() { abstract class DelegateSpecialFunctionReturnTypeMismatch : KtFirDiagnostic<KtExpression>() {
override val diagnosticClass get() = DelegateSpecialFunctionReturnTypeMismatch::class override val diagnosticClass get() = DelegateSpecialFunctionReturnTypeMismatch::class
abstract val delegateFunction: String abstract val delegateFunction: String
abstract val expected: KtType abstract val expectedType: KtType
abstract val actual: KtType abstract val actualType: KtType
} }
abstract class UnderscoreIsReserved : KtFirDiagnostic<KtExpression>() { abstract class UnderscoreIsReserved : KtFirDiagnostic<KtExpression>() {
@@ -1343,8 +1343,8 @@ internal class TypeParameterOfPropertyNotUsedInReceiverImpl(
} }
internal class ReturnTypeMismatchImpl( internal class ReturnTypeMismatchImpl(
override val expected: KtType, override val expectedType: KtType,
override val actual: KtType, override val actualType: KtType,
firDiagnostic: FirPsiDiagnostic<*>, firDiagnostic: FirPsiDiagnostic<*>,
override val token: ValidityToken, override val token: ValidityToken,
) : KtFirDiagnostic.ReturnTypeMismatch(), KtAbstractFirDiagnostic<KtExpression> { ) : KtFirDiagnostic.ReturnTypeMismatch(), KtAbstractFirDiagnostic<KtExpression> {
@@ -1981,8 +1981,8 @@ internal class WrongSetterParameterTypeImpl(
} }
internal class InitializerTypeMismatchImpl( internal class InitializerTypeMismatchImpl(
override val expected: KtType, override val expectedType: KtType,
override val actual: KtType, override val actualType: KtType,
firDiagnostic: FirPsiDiagnostic<*>, firDiagnostic: FirPsiDiagnostic<*>,
override val token: ValidityToken, override val token: ValidityToken,
) : KtFirDiagnostic.InitializerTypeMismatch(), KtAbstractFirDiagnostic<KtProperty> { ) : KtFirDiagnostic.InitializerTypeMismatch(), KtAbstractFirDiagnostic<KtProperty> {
@@ -2430,8 +2430,8 @@ internal class DelegateSpecialFunctionNoneApplicableImpl(
internal class DelegateSpecialFunctionReturnTypeMismatchImpl( internal class DelegateSpecialFunctionReturnTypeMismatchImpl(
override val delegateFunction: String, override val delegateFunction: String,
override val expected: KtType, override val expectedType: KtType,
override val actual: KtType, override val actualType: KtType,
firDiagnostic: FirPsiDiagnostic<*>, firDiagnostic: FirPsiDiagnostic<*>,
override val token: ValidityToken, override val token: ValidityToken,
) : KtFirDiagnostic.DelegateSpecialFunctionReturnTypeMismatch(), KtAbstractFirDiagnostic<KtExpression> { ) : KtFirDiagnostic.DelegateSpecialFunctionReturnTypeMismatch(), KtAbstractFirDiagnostic<KtExpression> {