AA FIR: build argument mapping for SAM conversion node
^KT-64910 fixed
This commit is contained in:
+4
-1
@@ -1343,7 +1343,10 @@ internal class KtFirCallResolver(
|
||||
// For spread, named, and lambda arguments, the source is the KtValueArgument.
|
||||
// For other arguments (including array indices), the source is the KtExpression.
|
||||
return when (this) {
|
||||
is FirSmartCastExpression -> originalExpression.realPsi as? KtExpression
|
||||
is FirSamConversionExpression ->
|
||||
expression.realPsi as? KtExpression
|
||||
is FirSmartCastExpression ->
|
||||
originalExpression.realPsi as? KtExpression
|
||||
is FirNamedArgumentExpression, is FirSpreadArgumentExpression, is FirLambdaArgumentExpression ->
|
||||
realPsi.safeAs<KtValueArgument>()?.getArgumentExpression()
|
||||
else -> realPsi as? KtExpression
|
||||
|
||||
+24
@@ -766,6 +766,30 @@ public class FirIdeNormalAnalysisSourceModuleResolveCallTestGenerated extends Ab
|
||||
runTest("analysis/analysis-api/testData/components/callResolver/resolveCall/samConstructorCall.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("samFromJava_lambda.kt")
|
||||
public void testSamFromJava_lambda() throws Exception {
|
||||
runTest("analysis/analysis-api/testData/components/callResolver/resolveCall/samFromJava_lambda.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("samFromJava_methodReference.kt")
|
||||
public void testSamFromJava_methodReference() throws Exception {
|
||||
runTest("analysis/analysis-api/testData/components/callResolver/resolveCall/samFromJava_methodReference.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("samLambda.kt")
|
||||
public void testSamLambda() throws Exception {
|
||||
runTest("analysis/analysis-api/testData/components/callResolver/resolveCall/samLambda.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("samMethodReference.kt")
|
||||
public void testSamMethodReference() throws Exception {
|
||||
runTest("analysis/analysis-api/testData/components/callResolver/resolveCall/samMethodReference.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("simpleCallWithNonMatchingArgs.kt")
|
||||
public void testSimpleCallWithNonMatchingArgs() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user