diff --git a/compiler/testData/codegen/asmLike/receiverMangling/deepNoinlineWithLabels_after.kt b/compiler/testData/codegen/asmLike/receiverMangling/deepNoinlineWithLabels_after.kt index be1742f3247..2081c3f44be 100644 --- a/compiler/testData/codegen/asmLike/receiverMangling/deepNoinlineWithLabels_after.kt +++ b/compiler/testData/codegen/asmLike/receiverMangling/deepNoinlineWithLabels_after.kt @@ -1,6 +1,7 @@ // !LANGUAGE: +NewCapturedReceiverFieldNamingConvention // IR_DIFFERENCE // LOCAL_VARIABLE_TABLE +// LAMBDAS: CLASS fun String.foo(count: Int) { val x = false diff --git a/compiler/testData/codegen/asmLike/receiverMangling/deepNoinlineWithLabels_before.kt b/compiler/testData/codegen/asmLike/receiverMangling/deepNoinlineWithLabels_before.kt index ebbaf1533b2..accd253f92d 100644 --- a/compiler/testData/codegen/asmLike/receiverMangling/deepNoinlineWithLabels_before.kt +++ b/compiler/testData/codegen/asmLike/receiverMangling/deepNoinlineWithLabels_before.kt @@ -1,6 +1,7 @@ // !LANGUAGE: -NewCapturedReceiverFieldNamingConvention // IR_DIFFERENCE // LOCAL_VARIABLE_TABLE +// LAMBDAS: CLASS fun String.foo(count: Int) { val x = false diff --git a/compiler/testData/codegen/asmLike/receiverMangling/deepNoinline_after.kt b/compiler/testData/codegen/asmLike/receiverMangling/deepNoinline_after.kt index 248d968e9be..c1eccd0baa9 100644 --- a/compiler/testData/codegen/asmLike/receiverMangling/deepNoinline_after.kt +++ b/compiler/testData/codegen/asmLike/receiverMangling/deepNoinline_after.kt @@ -1,6 +1,7 @@ // !LANGUAGE: +NewCapturedReceiverFieldNamingConvention // IR_DIFFERENCE // LOCAL_VARIABLE_TABLE +// LAMBDAS: CLASS fun String.foo(count: Int) { val x = false diff --git a/compiler/testData/codegen/asmLike/receiverMangling/deepNoinline_before.kt b/compiler/testData/codegen/asmLike/receiverMangling/deepNoinline_before.kt index fddc50e8300..c44871ab7ab 100644 --- a/compiler/testData/codegen/asmLike/receiverMangling/deepNoinline_before.kt +++ b/compiler/testData/codegen/asmLike/receiverMangling/deepNoinline_before.kt @@ -1,6 +1,7 @@ // !LANGUAGE: -NewCapturedReceiverFieldNamingConvention // IR_DIFFERENCE // LOCAL_VARIABLE_TABLE +// LAMBDAS: CLASS fun String.foo(count: Int) { val x = false diff --git a/compiler/testData/codegen/asmLike/receiverMangling/mangledNames.kt b/compiler/testData/codegen/asmLike/receiverMangling/mangledNames.kt index 0d82f6fd3ed..4cccd7e4d09 100644 --- a/compiler/testData/codegen/asmLike/receiverMangling/mangledNames.kt +++ b/compiler/testData/codegen/asmLike/receiverMangling/mangledNames.kt @@ -1,5 +1,6 @@ // IR_DIFFERENCE // LOCAL_VARIABLE_TABLE +// LAMBDAS: CLASS fun foo() { t { (`a b`, `b$c`, `c-d`, `b$$c--d`, `a()§&*&^@あ化`) -> } diff --git a/compiler/testData/codegen/asmLike/receiverMangling/nonInlineReceivers_after.kt b/compiler/testData/codegen/asmLike/receiverMangling/nonInlineReceivers_after.kt index 8b3118c8815..b795a33da60 100644 --- a/compiler/testData/codegen/asmLike/receiverMangling/nonInlineReceivers_after.kt +++ b/compiler/testData/codegen/asmLike/receiverMangling/nonInlineReceivers_after.kt @@ -1,5 +1,6 @@ // IR_DIFFERENCE // LOCAL_VARIABLE_TABLE +// LAMBDAS: CLASS fun String.foo(count: Int) { val x = false diff --git a/compiler/testData/codegen/asmLike/receiverMangling/nonInlineReceivers_before.kt b/compiler/testData/codegen/asmLike/receiverMangling/nonInlineReceivers_before.kt index c31cb2d9bcb..877b7caf006 100644 --- a/compiler/testData/codegen/asmLike/receiverMangling/nonInlineReceivers_before.kt +++ b/compiler/testData/codegen/asmLike/receiverMangling/nonInlineReceivers_before.kt @@ -1,6 +1,7 @@ // !LANGUAGE: -NewCapturedReceiverFieldNamingConvention // IR_DIFFERENCE // LOCAL_VARIABLE_TABLE +// LAMBDAS: CLASS fun String.foo(count: Int) { val x = false diff --git a/compiler/testData/codegen/asmLike/typeAnnotations/implicit.asm.ir.txt b/compiler/testData/codegen/asmLike/typeAnnotations/implicit.asm.ir.txt index 6fef69f9aba..0a3429bbb3e 100644 --- a/compiler/testData/codegen/asmLike/typeAnnotations/implicit.asm.ir.txt +++ b/compiler/testData/codegen/asmLike/typeAnnotations/implicit.asm.ir.txt @@ -12,6 +12,20 @@ final class foo/Kotlin$foo5$lambda$1 : kotlin/jvm/internal/Lambda, kotlin/jvm/fu public java.lang.Object invoke() } +Lkotlin/jvm/internal/Lambda;Lkotlin/jvm/functions/Function0; +final class foo/Kotlin$foo6$indyLambda$1 : kotlin/jvm/internal/Lambda, kotlin/jvm/functions/Function0 { + final foo.Kotlin this$0 + + void (foo.Kotlin $receiver) + + public final java.lang.String invoke() + @Lorg/jetbrains/annotations/NotNull;([]) // invisible + @Lfoo/TypeAnn;([name="2"]) : METHOD_RETURN, null + @Lfoo/TypeAnnBinary;([]) : METHOD_RETURN, null // invisible + + public java.lang.Object invoke() +} + public final class foo/Kotlin : java/lang/Object { public void () @@ -31,6 +45,8 @@ public final class foo/Kotlin : java/lang/Object { @Lfoo/TypeAnnBinary;([]) : METHOD_RETURN, null // invisible public final void foo5() + + public final void foo6() } public abstract interface foo/TypeAnn : java/lang/Object, java/lang/annotation/Annotation { diff --git a/compiler/testData/codegen/asmLike/typeAnnotations/implicit.asm.txt b/compiler/testData/codegen/asmLike/typeAnnotations/implicit.asm.txt index 9f2f72cdc58..82cfa636dde 100644 --- a/compiler/testData/codegen/asmLike/typeAnnotations/implicit.asm.txt +++ b/compiler/testData/codegen/asmLike/typeAnnotations/implicit.asm.txt @@ -26,6 +26,20 @@ final class foo/Kotlin$foo5$lambda$1 : kotlin/jvm/internal/Lambda, kotlin/jvm/fu @Lfoo/TypeAnnBinary;([]) : METHOD_RETURN, null // invisible } +Lkotlin/jvm/internal/Lambda;Lkotlin/jvm/functions/Function0; +final class foo/Kotlin$foo6$indyLambda$1 : kotlin/jvm/internal/Lambda, kotlin/jvm/functions/Function0 { + final foo.Kotlin this$0 + + void (foo.Kotlin p0) + + public java.lang.Object invoke() + + public final java.lang.String invoke() + @Lorg/jetbrains/annotations/NotNull;([]) // invisible + @Lfoo/TypeAnn;([name="2"]) : METHOD_RETURN, null + @Lfoo/TypeAnnBinary;([]) : METHOD_RETURN, null // invisible +} + public final class foo/Kotlin : java/lang/Object { public void () @@ -45,6 +59,8 @@ public final class foo/Kotlin : java/lang/Object { @Lfoo/TypeAnnBinary;([]) : METHOD_RETURN, null // invisible public final void foo5() + + public final void foo6() } public abstract interface foo/TypeAnn : java/lang/Object, java/lang/annotation/Annotation { diff --git a/compiler/testData/codegen/asmLike/typeAnnotations/implicit.kt b/compiler/testData/codegen/asmLike/typeAnnotations/implicit.kt index 59c695f8cd6..a73e0731bee 100644 --- a/compiler/testData/codegen/asmLike/typeAnnotations/implicit.kt +++ b/compiler/testData/codegen/asmLike/typeAnnotations/implicit.kt @@ -3,6 +3,8 @@ // RENDER_ANNOTATIONS // TARGET_BACKEND: JVM // JVM_TARGET: 1.8 +// WITH_STDLIB + package foo @Target(AnnotationTarget.TYPE) @@ -27,7 +29,12 @@ class Kotlin { fun foo4() = { foo2() }() fun foo5() { - val lambda = { foo2() } + val lambda = @JvmSerializableLambda { foo2() } lambda() } + + fun foo6() { + val indyLambda = { foo2() } + indyLambda() + } } diff --git a/compiler/testData/codegen/box/callableReference/function/getArityViaFunctionImpl.kt b/compiler/testData/codegen/box/callableReference/function/getArityViaFunctionImpl.kt index fc357d9ad97..5aa6a57170f 100644 --- a/compiler/testData/codegen/box/callableReference/function/getArityViaFunctionImpl.kt +++ b/compiler/testData/codegen/box/callableReference/function/getArityViaFunctionImpl.kt @@ -1,12 +1,7 @@ -// IGNORE_BACKEND: WASM -// WASM_MUTE_REASON: IGNORED_IN_JS -// IGNORE_BACKEND: JS_IR -// IGNORE_BACKEND: JS_IR_ES6 -// TODO: muted automatically, investigate should it be ran for JS or not -// IGNORE_BACKEND: JS, NATIVE +// TARGET_BACKEND: JVM // IGNORE_LIGHT_ANALYSIS - // WITH_STDLIB +// LAMBDAS: CLASS import kotlin.test.assertEquals import kotlin.jvm.internal.FunctionBase diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/JsCodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/JsCodegenBoxTestGenerated.java index 10cbc2b34a3..ca2c7ff2e77 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/JsCodegenBoxTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/JsCodegenBoxTestGenerated.java @@ -2814,12 +2814,6 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { runTest("compiler/testData/codegen/box/callableReference/function/genericWithDependentType.kt"); } - @Test - @TestMetadata("getArityViaFunctionImpl.kt") - public void testGetArityViaFunctionImpl() throws Exception { - runTest("compiler/testData/codegen/box/callableReference/function/getArityViaFunctionImpl.kt"); - } - @Test @TestMetadata("innerClassConstructorWithTwoReceivers.kt") public void testInnerClassConstructorWithTwoReceivers() throws Exception { diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsCodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsCodegenBoxTestGenerated.java index 78dbf126d65..aa9d9b3a54d 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsCodegenBoxTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsCodegenBoxTestGenerated.java @@ -2868,12 +2868,6 @@ public class FirJsCodegenBoxTestGenerated extends AbstractFirJsCodegenBoxTest { runTest("compiler/testData/codegen/box/callableReference/function/genericWithDependentType.kt"); } - @Test - @TestMetadata("getArityViaFunctionImpl.kt") - public void testGetArityViaFunctionImpl() throws Exception { - runTest("compiler/testData/codegen/box/callableReference/function/getArityViaFunctionImpl.kt"); - } - @Test @TestMetadata("innerClassConstructorWithTwoReceivers.kt") public void testInnerClassConstructorWithTwoReceivers() throws Exception { diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsCodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsCodegenBoxTestGenerated.java index a388c356438..a24fa3ae20e 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsCodegenBoxTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsCodegenBoxTestGenerated.java @@ -2868,12 +2868,6 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/callableReference/function/genericWithDependentType.kt"); } - @Test - @TestMetadata("getArityViaFunctionImpl.kt") - public void testGetArityViaFunctionImpl() throws Exception { - runTest("compiler/testData/codegen/box/callableReference/function/getArityViaFunctionImpl.kt"); - } - @Test @TestMetadata("innerClassConstructorWithTwoReceivers.kt") public void testInnerClassConstructorWithTwoReceivers() throws Exception { diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsES6CodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsES6CodegenBoxTestGenerated.java index 48fde28635c..71b40241d95 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsES6CodegenBoxTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsES6CodegenBoxTestGenerated.java @@ -2868,12 +2868,6 @@ public class IrJsES6CodegenBoxTestGenerated extends AbstractIrJsES6CodegenBoxTes runTest("compiler/testData/codegen/box/callableReference/function/genericWithDependentType.kt"); } - @Test - @TestMetadata("getArityViaFunctionImpl.kt") - public void testGetArityViaFunctionImpl() throws Exception { - runTest("compiler/testData/codegen/box/callableReference/function/getArityViaFunctionImpl.kt"); - } - @Test @TestMetadata("innerClassConstructorWithTwoReceivers.kt") public void testInnerClassConstructorWithTwoReceivers() throws Exception { diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/FirNativeCodegenBoxTestGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/FirNativeCodegenBoxTestGenerated.java index 99cb4ec10b6..e1228a52edb 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/FirNativeCodegenBoxTestGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/FirNativeCodegenBoxTestGenerated.java @@ -3003,12 +3003,6 @@ public class FirNativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTe runTest("compiler/testData/codegen/box/callableReference/function/genericWithDependentType.kt"); } - @Test - @TestMetadata("getArityViaFunctionImpl.kt") - public void testGetArityViaFunctionImpl() throws Exception { - runTest("compiler/testData/codegen/box/callableReference/function/getArityViaFunctionImpl.kt"); - } - @Test @TestMetadata("innerClassConstructorWithTwoReceivers.kt") public void testInnerClassConstructorWithTwoReceivers() throws Exception { diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/FirNativeCodegenBoxTestNoPLGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/FirNativeCodegenBoxTestNoPLGenerated.java index 07313647f8f..04edc22a9a5 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/FirNativeCodegenBoxTestNoPLGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/FirNativeCodegenBoxTestNoPLGenerated.java @@ -3073,12 +3073,6 @@ public class FirNativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenB runTest("compiler/testData/codegen/box/callableReference/function/genericWithDependentType.kt"); } - @Test - @TestMetadata("getArityViaFunctionImpl.kt") - public void testGetArityViaFunctionImpl() throws Exception { - runTest("compiler/testData/codegen/box/callableReference/function/getArityViaFunctionImpl.kt"); - } - @Test @TestMetadata("innerClassConstructorWithTwoReceivers.kt") public void testInnerClassConstructorWithTwoReceivers() throws Exception { diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestGenerated.java index d9c1dae7d68..f790dd63ddc 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestGenerated.java @@ -2968,12 +2968,6 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest runTest("compiler/testData/codegen/box/callableReference/function/genericWithDependentType.kt"); } - @Test - @TestMetadata("getArityViaFunctionImpl.kt") - public void testGetArityViaFunctionImpl() throws Exception { - runTest("compiler/testData/codegen/box/callableReference/function/getArityViaFunctionImpl.kt"); - } - @Test @TestMetadata("innerClassConstructorWithTwoReceivers.kt") public void testInnerClassConstructorWithTwoReceivers() throws Exception { diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestNoPLGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestNoPLGenerated.java index 1c58c709145..ddd9798f831 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestNoPLGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestNoPLGenerated.java @@ -3038,12 +3038,6 @@ public class NativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenBoxT runTest("compiler/testData/codegen/box/callableReference/function/genericWithDependentType.kt"); } - @Test - @TestMetadata("getArityViaFunctionImpl.kt") - public void testGetArityViaFunctionImpl() throws Exception { - runTest("compiler/testData/codegen/box/callableReference/function/getArityViaFunctionImpl.kt"); - } - @Test @TestMetadata("innerClassConstructorWithTwoReceivers.kt") public void testInnerClassConstructorWithTwoReceivers() throws Exception { diff --git a/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/IrCodegenBoxWasmTestGenerated.java b/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/IrCodegenBoxWasmTestGenerated.java index a72d8da0799..20eafdc1a4e 100644 --- a/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/IrCodegenBoxWasmTestGenerated.java +++ b/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/IrCodegenBoxWasmTestGenerated.java @@ -2543,11 +2543,6 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/callableReference/function/genericWithDependentType.kt"); } - @TestMetadata("getArityViaFunctionImpl.kt") - public void testGetArityViaFunctionImpl() throws Exception { - runTest("compiler/testData/codegen/box/callableReference/function/getArityViaFunctionImpl.kt"); - } - @TestMetadata("innerClassConstructorWithTwoReceivers.kt") public void testInnerClassConstructorWithTwoReceivers() throws Exception { runTest("compiler/testData/codegen/box/callableReference/function/innerClassConstructorWithTwoReceivers.kt");