FIR: support proper argument mapping for substitution overrides
Related to KT-52762
This commit is contained in:
committed by
teamcity
parent
a3ee2d7349
commit
481607df43
+1
-2
@@ -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
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -10,6 +10,6 @@ interface C<U> : A<U>, B<U> { // Warning here, this is correct
|
||||
}
|
||||
|
||||
fun test(c: C<Int>) {
|
||||
c.foo(a = 1)
|
||||
c.foo(<!NAME_FOR_AMBIGUOUS_PARAMETER!>a<!> = 1)
|
||||
c.foo(<!NAME_FOR_AMBIGUOUS_PARAMETER!>b<!> = 1)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user