[NI] Preserve name of parameters for functional types
This commit is contained in:
+1
-1
@@ -84,7 +84,7 @@ internal object NoTypeArguments : ResolutionPart {
|
||||
|
||||
internal object MapArguments : ResolutionPart {
|
||||
override fun SimpleKotlinResolutionCandidate.process(): List<KotlinCallDiagnostic> {
|
||||
val mapping = callContext.argumentsToParametersMapper.mapArguments(kotlinCall, candidateDescriptor.original)
|
||||
val mapping = callContext.argumentsToParametersMapper.mapArguments(kotlinCall, candidateDescriptor)
|
||||
argumentMappingByOriginal = mapping.parameterToCallArgumentMap
|
||||
return mapping.diagnostics
|
||||
}
|
||||
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
fun <T> test(a: T, b: T, operation: (x: T) -> T) {
|
||||
operation(if (3 > 2) a else b)
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
test(1, 1, { it })
|
||||
return "OK"
|
||||
}
|
||||
+6
@@ -4631,6 +4631,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("parameterWithNameForFunctionType.kt")
|
||||
public void testParameterWithNameForFunctionType() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/parameterWithNameForFunctionType.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("quicksort.kt")
|
||||
public void testQuicksort() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/quicksort.kt");
|
||||
|
||||
@@ -4631,6 +4631,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("parameterWithNameForFunctionType.kt")
|
||||
public void testParameterWithNameForFunctionType() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/parameterWithNameForFunctionType.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("quicksort.kt")
|
||||
public void testQuicksort() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/quicksort.kt");
|
||||
|
||||
@@ -4631,6 +4631,12 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("parameterWithNameForFunctionType.kt")
|
||||
public void testParameterWithNameForFunctionType() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/parameterWithNameForFunctionType.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("quicksort.kt")
|
||||
public void testQuicksort() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/quicksort.kt");
|
||||
|
||||
@@ -5327,6 +5327,12 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("parameterWithNameForFunctionType.kt")
|
||||
public void testParameterWithNameForFunctionType() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/parameterWithNameForFunctionType.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("quicksort.kt")
|
||||
public void testQuicksort() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/quicksort.kt");
|
||||
|
||||
Reference in New Issue
Block a user