KT-50862 Add name property to KtSignature

See the KDoc of the property for the reasons why
it was created
This commit is contained in:
Roman Golyshev
2022-01-26 16:09:19 +03:00
committed by Space
parent e2c7290214
commit 564e408434
123 changed files with 585 additions and 128 deletions
@@ -389,7 +389,11 @@ internal class KtFe10CallResolver(
this is PropertyDescriptor && kind == CallableMemberDescriptor.Kind.SYNTHESIZED
private fun ResolvedCall<*>.createArgumentMapping(signature: KtFunctionLikeSignature<*>): LinkedHashMap<KtExpression, KtVariableLikeSignature<KtValueParameterSymbol>> {
val parameterSignatureByName = signature.valueParameters.associateBy { it.symbol.name }
val parameterSignatureByName = signature.valueParameters.associateBy {
// ResolvedCall.valueArguments have their names affected by the `@ParameterName` annotations,
// so we use `name` instead of `symbol.name`
it.name
}
val result = LinkedHashMap<KtExpression, KtVariableLikeSignature<KtValueParameterSymbol>>()
for ((parameter, arguments) in valueArguments) {
val parameterSymbol = KtFe10DescValueParameterSymbol(parameter, analysisContext)
@@ -736,6 +736,12 @@ public class Fe10ResolveCallTestGenerated extends AbstractResolveCallTest {
runTest("analysis/analysis-api/testData/components/callResolver/resolveCall/variableAsFunctionWithParameterNameAnnotationConflict.kt");
}
@Test
@TestMetadata("variableAsFunctionWithParameterNameAnnotationConflict2.kt")
public void testVariableAsFunctionWithParameterNameAnnotationConflict2() throws Exception {
runTest("analysis/analysis-api/testData/components/callResolver/resolveCall/variableAsFunctionWithParameterNameAnnotationConflict2.kt");
}
@Test
@TestMetadata("variableAsFunctionWithParameterNameGeneric.kt")
public void testVariableAsFunctionWithParameterNameGeneric() throws Exception {