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");
|
||||
|
||||
+6
@@ -20656,6 +20656,12 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/invokedynamic/lambdas"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt52875.kt")
|
||||
public void testKt52875() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/lambdas/kt52875.kt");
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/invokedynamic/lambdas/inlineClassInSignature")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
|
||||
+6
@@ -20620,6 +20620,12 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/invokedynamic/lambdas"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt52875.kt")
|
||||
public void testKt52875() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/lambdas/kt52875.kt");
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/invokedynamic/lambdas/inlineClassInSignature")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
|
||||
+5
@@ -18276,6 +18276,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/invokedynamic/lambdas"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true);
|
||||
}
|
||||
|
||||
@TestMetadata("kt52875.kt")
|
||||
public void testKt52875() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/lambdas/kt52875.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/invokedynamic/lambdas/inlineClassInSignature")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
+6
@@ -23305,6 +23305,12 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/invokedynamic/lambdas"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt52875.kt")
|
||||
public void testKt52875() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/invokedynamic/lambdas/kt52875.kt");
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/invokedynamic/lambdas/inlineClassInSignature")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
|
||||
Reference in New Issue
Block a user