KT-52875 Fix extension function literal creation with -Xlambdas=indy
This commit is contained in:
committed by
teamcity
parent
97c542dd76
commit
8a402bcacd
+6
@@ -26240,6 +26240,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/lambdas/genericLambdaSignature.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt52875.kt")
|
||||
public void testKt52875() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/lambdas/kt52875.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("lambdaSerializable.kt")
|
||||
public void testLambdaSerializable() throws Exception {
|
||||
|
||||
+1
-1
@@ -335,7 +335,7 @@ internal class LambdaMetafactoryArgumentsBuilder(
|
||||
}
|
||||
|
||||
val newReference =
|
||||
if (implFun.origin == IrDeclarationOrigin.LOCAL_FUNCTION_FOR_LAMBDA)
|
||||
if (implFun.origin == IrDeclarationOrigin.LOCAL_FUNCTION_FOR_LAMBDA || implFun.isAnonymousFunction)
|
||||
remapExtensionLambda(implFun as IrSimpleFunction, reference)
|
||||
else
|
||||
reference
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
// LAMBDAS: INDY
|
||||
|
||||
fun appendTo(s: String) =
|
||||
fun Any?.() = s + this
|
||||
|
||||
fun box() = appendTo("O")("K")
|
||||
+6
@@ -25730,6 +25730,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/lambdas/genericLambdaSignature.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt52875.kt")
|
||||
public void testKt52875() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/lambdas/kt52875.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("lambdaSerializable.kt")
|
||||
public void testLambdaSerializable() throws Exception {
|
||||
|
||||
+6
@@ -26240,6 +26240,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/lambdas/genericLambdaSignature.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt52875.kt")
|
||||
public void testKt52875() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/lambdas/kt52875.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("lambdaSerializable.kt")
|
||||
public void testLambdaSerializable() throws Exception {
|
||||
|
||||
+5
@@ -21673,6 +21673,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/lambdas/extensionLambda.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt52875.kt")
|
||||
public void testKt52875() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/lambdas/kt52875.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("nestedIndyLambdas.kt")
|
||||
public void testNestedIndyLambdas() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/lambdas/nestedIndyLambdas.kt");
|
||||
|
||||
Reference in New Issue
Block a user