From 9f63818bd36d0a2c4ae05ee75587380ba5b4bace Mon Sep 17 00:00:00 2001 From: Dmitry Savvinov Date: Tue, 28 Nov 2017 15:00:59 +0300 Subject: [PATCH] [NI] Introduce INAPPLICABLE_ARGUMENTS_MAPPING_ERROR for some NI diagnostics --- .../kotlin/resolve/calls/model/KotlinCallDiagnistics.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/model/KotlinCallDiagnistics.kt b/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/model/KotlinCallDiagnistics.kt index 53315745b73..ef7bbb2fdab 100644 --- a/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/model/KotlinCallDiagnistics.kt +++ b/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/model/KotlinCallDiagnistics.kt @@ -31,7 +31,9 @@ abstract class InapplicableArgumentDiagnostic : KotlinCallDiagnostic(INAPPLICABL } // ArgumentsToParameterMapper -class TooManyArguments(override val argument: KotlinCallArgument, val descriptor: CallableDescriptor) : InapplicableArgumentDiagnostic() +class TooManyArguments(val argument: KotlinCallArgument, val descriptor: CallableDescriptor) : KotlinCallDiagnostic(INAPPLICABLE_ARGUMENTS_MAPPING_ERROR) { + override fun report(reporter: DiagnosticReporter) = reporter.onCallArgument(argument, this) +} class NonVarargSpread(val argument: KotlinCallArgument) : KotlinCallDiagnostic(INAPPLICABLE) { override fun report(reporter: DiagnosticReporter) = reporter.onCallArgumentSpread(argument, this) @@ -50,7 +52,7 @@ class NameNotFound(val argument: KotlinCallArgument, val descriptor: CallableDes class NoValueForParameter( val parameterDescriptor: ValueParameterDescriptor, val descriptor: CallableDescriptor -) : KotlinCallDiagnostic(INAPPLICABLE) { +) : KotlinCallDiagnostic(INAPPLICABLE_ARGUMENTS_MAPPING_ERROR) { override fun report(reporter: DiagnosticReporter) = reporter.onCall(this) }