diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/FirArgumentsToParametersMapper.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/FirArgumentsToParametersMapper.kt index 1191fee52c4..df0cc066c9d 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/FirArgumentsToParametersMapper.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/FirArgumentsToParametersMapper.kt @@ -383,8 +383,7 @@ private class FirCallArgumentsProcessor( addDiagnostic(NameNotFound(argument, function)) } } else { - // TODO: should we check also substitution overrides? Performance! - if (symbol != null && function.isIntersectionOverride) { + if (symbol != null && function.isSubstitutionOrIntersectionOverride) { matchedIndex = parameters.indexOfFirst { originalParameter -> originalParameter.name == argument.name } diff --git a/compiler/testData/diagnostics/tests/namedArguments/ambiguousNamedArgumentsWithGenerics3.fir.kt b/compiler/testData/diagnostics/tests/namedArguments/ambiguousNamedArgumentsWithGenerics3.fir.kt index 6741520e6b2..3aa1bcfcb20 100644 --- a/compiler/testData/diagnostics/tests/namedArguments/ambiguousNamedArgumentsWithGenerics3.fir.kt +++ b/compiler/testData/diagnostics/tests/namedArguments/ambiguousNamedArgumentsWithGenerics3.fir.kt @@ -10,6 +10,6 @@ interface C : A, B { // Warning here, this is correct } fun test(c: C) { - c.foo(a = 1) + c.foo(a = 1) c.foo(b = 1) }