[FIR] Report DUPLICATE_PARAMETER_NAME_IN_FUNCTION_TYPE
^KT-59418 Fixed
This commit is contained in:
committed by
Space Team
parent
7d48a7934f
commit
ed6a0af0a6
+6
@@ -408,6 +408,12 @@ internal val KT_DIAGNOSTIC_CONVERTER = KtDiagnosticConverterBuilder.buildConvert
|
||||
token,
|
||||
)
|
||||
}
|
||||
add(FirErrors.DUPLICATE_PARAMETER_NAME_IN_FUNCTION_TYPE) { firDiagnostic ->
|
||||
DuplicateParameterNameInFunctionTypeImpl(
|
||||
firDiagnostic as KtPsiDiagnostic,
|
||||
token,
|
||||
)
|
||||
}
|
||||
add(FirErrors.CREATING_AN_INSTANCE_OF_ABSTRACT_CLASS) { firDiagnostic ->
|
||||
CreatingAnInstanceOfAbstractClassImpl(
|
||||
firDiagnostic as KtPsiDiagnostic,
|
||||
|
||||
+4
@@ -331,6 +331,10 @@ sealed interface KtFirDiagnostic<PSI : PsiElement> : KtDiagnosticWithPsi<PSI> {
|
||||
val reference: String
|
||||
}
|
||||
|
||||
interface DuplicateParameterNameInFunctionType : KtFirDiagnostic<KtTypeReference> {
|
||||
override val diagnosticClass get() = DuplicateParameterNameInFunctionType::class
|
||||
}
|
||||
|
||||
interface CreatingAnInstanceOfAbstractClass : KtFirDiagnostic<KtExpression> {
|
||||
override val diagnosticClass get() = CreatingAnInstanceOfAbstractClass::class
|
||||
}
|
||||
|
||||
+5
@@ -381,6 +381,11 @@ internal class UnresolvedImportImpl(
|
||||
token: KtLifetimeToken,
|
||||
) : KtAbstractFirDiagnostic<PsiElement>(firDiagnostic, token), KtFirDiagnostic.UnresolvedImport
|
||||
|
||||
internal class DuplicateParameterNameInFunctionTypeImpl(
|
||||
firDiagnostic: KtPsiDiagnostic,
|
||||
token: KtLifetimeToken,
|
||||
) : KtAbstractFirDiagnostic<KtTypeReference>(firDiagnostic, token), KtFirDiagnostic.DuplicateParameterNameInFunctionType
|
||||
|
||||
internal class CreatingAnInstanceOfAbstractClassImpl(
|
||||
firDiagnostic: KtPsiDiagnostic,
|
||||
token: KtLifetimeToken,
|
||||
|
||||
Reference in New Issue
Block a user