From ade8b0a7d3c842d55cd9cd33bdf6081918e8bddb Mon Sep 17 00:00:00 2001 From: pyos Date: Mon, 7 Jun 2021 13:17:42 +0200 Subject: [PATCH] JVM_IR: box bound receiver before calling the reference constructor This is needed for the inliner: since the information about Kotlin type of the bound receiver is nowhere in the output binary, the inliner will have no clue how to box inline class values. Moving the boxing outside the object means the inliner doesn't need to know about it; from its point of view, the captured value has type `Any`. --- ...FirBlackBoxInlineCodegenTestGenerated.java | 18 ++++++++++++++++++ .../jvm/lower/FunctionReferenceLowering.kt | 7 ++----- .../boundInlineClassMethod.kt | 16 ++++++++++++++++ .../boundInlineClassMethodWithAny.kt | 16 ++++++++++++++++ .../boundInlineClassMethodWithInt.kt | 19 +++++++++++++++++++ .../callableReference/adaptedReference_ir.txt | 4 ++-- .../coroutines/suspendConversion_ir.txt | 2 +- ...oReceiverInCallableReferenceClasses_ir.txt | 2 +- .../BlackBoxInlineCodegenTestGenerated.java | 18 ++++++++++++++++++ ...otlinAgainstInlineKotlinTestGenerated.java | 18 ++++++++++++++++++ .../IrBlackBoxInlineCodegenTestGenerated.java | 18 ++++++++++++++++++ ...otlinAgainstInlineKotlinTestGenerated.java | 18 ++++++++++++++++++ ...JvmIrAgainstOldBoxInlineTestGenerated.java | 18 ++++++++++++++++++ ...JvmOldAgainstIrBoxInlineTestGenerated.java | 18 ++++++++++++++++++ .../IrJsCodegenInlineES6TestGenerated.java | 15 +++++++++++++++ .../IrJsCodegenInlineTestGenerated.java | 15 +++++++++++++++ .../JsCodegenInlineTestGenerated.java | 15 +++++++++++++++ 17 files changed, 228 insertions(+), 9 deletions(-) create mode 100644 compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundInlineClassMethod.kt create mode 100644 compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundInlineClassMethodWithAny.kt create mode 100644 compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundInlineClassMethodWithInt.kt diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxInlineCodegenTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxInlineCodegenTestGenerated.java index 9d7320fa67c..1b2ea737e32 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxInlineCodegenTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxInlineCodegenTestGenerated.java @@ -1876,6 +1876,24 @@ public class FirBlackBoxInlineCodegenTestGenerated extends AbstractFirBlackBoxIn runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundFunctionReferenceOnLong.kt"); } + @Test + @TestMetadata("boundInlineClassMethod.kt") + public void testBoundInlineClassMethod() throws Exception { + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundInlineClassMethod.kt"); + } + + @Test + @TestMetadata("boundInlineClassMethodWithAny.kt") + public void testBoundInlineClassMethodWithAny() throws Exception { + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundInlineClassMethodWithAny.kt"); + } + + @Test + @TestMetadata("boundInlineClassMethodWithInt.kt") + public void testBoundInlineClassMethodWithInt() throws Exception { + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundInlineClassMethodWithInt.kt"); + } + @Test @TestMetadata("boundPropertyReference.kt") public void testBoundPropertyReference() throws Exception { diff --git a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/lower/FunctionReferenceLowering.kt b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/lower/FunctionReferenceLowering.kt index 4c955f9e53a..234b9b7247f 100644 --- a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/lower/FunctionReferenceLowering.kt +++ b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/lower/FunctionReferenceLowering.kt @@ -582,11 +582,8 @@ internal class FunctionReferenceLowering(private val context: JvmBackendContext) returnType = functionReferenceClass.defaultType isPrimary = true }.apply { - // Add receiver parameter for bound function references - if (samSuperType == null) { - boundReceiver?.let { (param, arg) -> - valueParameters += param.copyTo(irFunction = this, index = 0, type = arg.type) - } + if (samSuperType == null && boundReceiver != null) { + addValueParameter("receiver", context.irBuiltIns.anyNType) } // Super constructor: diff --git a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundInlineClassMethod.kt b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundInlineClassMethod.kt new file mode 100644 index 00000000000..58b7a6e6f81 --- /dev/null +++ b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundInlineClassMethod.kt @@ -0,0 +1,16 @@ +// SKIP_INLINE_CHECK_IN: inlineFun$default +// IGNORE_BACKEND: JVM +// IGNORE_BACKEND_MULTI_MODULE: JVM, JVM_MULTI_MODULE_IR_AGAINST_OLD +// FILE: 1.kt +package test + +inline class C(val x: String) { + fun f() = x.toString() +} + +inline fun inlineFun(lambda: () -> String = C("OK")::f): String = lambda() + +// FILE: 2.kt +import test.* + +fun box(): String = inlineFun() diff --git a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundInlineClassMethodWithAny.kt b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundInlineClassMethodWithAny.kt new file mode 100644 index 00000000000..9e7d2fd0915 --- /dev/null +++ b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundInlineClassMethodWithAny.kt @@ -0,0 +1,16 @@ +// SKIP_INLINE_CHECK_IN: inlineFun$default +// IGNORE_BACKEND: JVM +// IGNORE_BACKEND_MULTI_MODULE: JVM, JVM_MULTI_MODULE_IR_AGAINST_OLD +// FILE: 1.kt +package test + +inline class C(val x: Any?) { + fun f() = x.toString() +} + +inline fun inlineFun(lambda: () -> String = C("OK")::f): String = lambda() + +// FILE: 2.kt +import test.* + +fun box(): String = inlineFun() diff --git a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundInlineClassMethodWithInt.kt b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundInlineClassMethodWithInt.kt new file mode 100644 index 00000000000..ae93458aade --- /dev/null +++ b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundInlineClassMethodWithInt.kt @@ -0,0 +1,19 @@ +// SKIP_INLINE_CHECK_IN: inlineFun$default +// IGNORE_BACKEND: JVM +// IGNORE_BACKEND_MULTI_MODULE: JVM, JVM_MULTI_MODULE_IR_AGAINST_OLD +// FILE: 1.kt +package test + +inline class C(val x: Int) { + fun f() = x.toString() +} + +inline fun inlineFun(lambda: () -> String = C(1)::f): String = lambda() + +// FILE: 2.kt +import test.* + +fun box(): String { + val result = inlineFun() + return if (result == "1") "OK" else result +} diff --git a/compiler/testData/codegen/bytecodeListing/callableReference/adaptedReference_ir.txt b/compiler/testData/codegen/bytecodeListing/callableReference/adaptedReference_ir.txt index b69c25f5183..4c025cfaf48 100644 --- a/compiler/testData/codegen/bytecodeListing/callableReference/adaptedReference_ir.txt +++ b/compiler/testData/codegen/bytecodeListing/callableReference/adaptedReference_ir.txt @@ -3,7 +3,7 @@ synthetic final class A$testDefaultArguments$1 { // source: 'adaptedReference.kt' enclosing method A.testDefaultArguments()V inner (anonymous) class A$testDefaultArguments$1 - method (p0: A): void + method (p0: java.lang.Object): void public synthetic final static method access$getReceiver$p(p0: A$testDefaultArguments$1): java.lang.Object public synthetic bridge method invoke(): java.lang.Object public final @org.jetbrains.annotations.NotNull method invoke(): java.lang.String @@ -14,7 +14,7 @@ synthetic final class A$testDefaultArguments$2 { // source: 'adaptedReference.kt' enclosing method A.testDefaultArguments()V inner (anonymous) class A$testDefaultArguments$2 - method (p0: A): void + method (p0: java.lang.Object): void public synthetic final static method access$getReceiver$p(p0: A$testDefaultArguments$2): java.lang.Object public final @org.jetbrains.annotations.Nullable method invoke(@org.jetbrains.annotations.NotNull p0: kotlin.coroutines.Continuation): java.lang.Object public synthetic bridge method invoke(p0: java.lang.Object): java.lang.Object diff --git a/compiler/testData/codegen/bytecodeListing/coroutines/suspendConversion_ir.txt b/compiler/testData/codegen/bytecodeListing/coroutines/suspendConversion_ir.txt index 45ddb1bb313..1dd0e5ef62e 100644 --- a/compiler/testData/codegen/bytecodeListing/coroutines/suspendConversion_ir.txt +++ b/compiler/testData/codegen/bytecodeListing/coroutines/suspendConversion_ir.txt @@ -3,7 +3,7 @@ synthetic final class SuspendConversionKt$test$1 { // source: 'suspendConversion.kt' enclosing method SuspendConversionKt.test(Lkotlin/jvm/functions/Function0;)V inner (anonymous) class SuspendConversionKt$test$1 - method (p0: kotlin.jvm.functions.Function0): void + method (p0: java.lang.Object): void public final @org.jetbrains.annotations.Nullable method invoke(@org.jetbrains.annotations.NotNull p0: kotlin.coroutines.Continuation): java.lang.Object public synthetic bridge method invoke(p0: java.lang.Object): java.lang.Object } diff --git a/compiler/testData/codegen/bytecodeListing/noReceiverInCallableReferenceClasses_ir.txt b/compiler/testData/codegen/bytecodeListing/noReceiverInCallableReferenceClasses_ir.txt index 5db50865986..e864fee3345 100644 --- a/compiler/testData/codegen/bytecodeListing/noReceiverInCallableReferenceClasses_ir.txt +++ b/compiler/testData/codegen/bytecodeListing/noReceiverInCallableReferenceClasses_ir.txt @@ -44,7 +44,7 @@ synthetic final class NoReceiverInCallableReferenceClassesKt$aFoo$1 { // source: 'noReceiverInCallableReferenceClasses.kt' enclosing method NoReceiverInCallableReferenceClassesKt.()V inner (anonymous) class NoReceiverInCallableReferenceClassesKt$aFoo$1 - method (p0: A): void + method (p0: java.lang.Object): void public synthetic bridge method invoke(): java.lang.Object public final method invoke(): void } diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxInlineCodegenTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxInlineCodegenTestGenerated.java index 321fc2c65e4..6d885d1bf24 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxInlineCodegenTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxInlineCodegenTestGenerated.java @@ -1876,6 +1876,24 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundFunctionReferenceOnLong.kt"); } + @Test + @TestMetadata("boundInlineClassMethod.kt") + public void testBoundInlineClassMethod() throws Exception { + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundInlineClassMethod.kt"); + } + + @Test + @TestMetadata("boundInlineClassMethodWithAny.kt") + public void testBoundInlineClassMethodWithAny() throws Exception { + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundInlineClassMethodWithAny.kt"); + } + + @Test + @TestMetadata("boundInlineClassMethodWithInt.kt") + public void testBoundInlineClassMethodWithInt() throws Exception { + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundInlineClassMethodWithInt.kt"); + } + @Test @TestMetadata("boundPropertyReference.kt") public void testBoundPropertyReference() throws Exception { diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/CompileKotlinAgainstInlineKotlinTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/CompileKotlinAgainstInlineKotlinTestGenerated.java index 6aa08ae21bc..bb116b695db 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/CompileKotlinAgainstInlineKotlinTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/CompileKotlinAgainstInlineKotlinTestGenerated.java @@ -1876,6 +1876,24 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundFunctionReferenceOnLong.kt"); } + @Test + @TestMetadata("boundInlineClassMethod.kt") + public void testBoundInlineClassMethod() throws Exception { + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundInlineClassMethod.kt"); + } + + @Test + @TestMetadata("boundInlineClassMethodWithAny.kt") + public void testBoundInlineClassMethodWithAny() throws Exception { + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundInlineClassMethodWithAny.kt"); + } + + @Test + @TestMetadata("boundInlineClassMethodWithInt.kt") + public void testBoundInlineClassMethodWithInt() throws Exception { + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundInlineClassMethodWithInt.kt"); + } + @Test @TestMetadata("boundPropertyReference.kt") public void testBoundPropertyReference() throws Exception { diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxInlineCodegenTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxInlineCodegenTestGenerated.java index 4c1178685b3..f2362849534 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxInlineCodegenTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxInlineCodegenTestGenerated.java @@ -1876,6 +1876,24 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundFunctionReferenceOnLong.kt"); } + @Test + @TestMetadata("boundInlineClassMethod.kt") + public void testBoundInlineClassMethod() throws Exception { + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundInlineClassMethod.kt"); + } + + @Test + @TestMetadata("boundInlineClassMethodWithAny.kt") + public void testBoundInlineClassMethodWithAny() throws Exception { + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundInlineClassMethodWithAny.kt"); + } + + @Test + @TestMetadata("boundInlineClassMethodWithInt.kt") + public void testBoundInlineClassMethodWithInt() throws Exception { + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundInlineClassMethodWithInt.kt"); + } + @Test @TestMetadata("boundPropertyReference.kt") public void testBoundPropertyReference() throws Exception { diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrCompileKotlinAgainstInlineKotlinTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrCompileKotlinAgainstInlineKotlinTestGenerated.java index 77bf5d03051..ae885a76b02 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrCompileKotlinAgainstInlineKotlinTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrCompileKotlinAgainstInlineKotlinTestGenerated.java @@ -1876,6 +1876,24 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundFunctionReferenceOnLong.kt"); } + @Test + @TestMetadata("boundInlineClassMethod.kt") + public void testBoundInlineClassMethod() throws Exception { + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundInlineClassMethod.kt"); + } + + @Test + @TestMetadata("boundInlineClassMethodWithAny.kt") + public void testBoundInlineClassMethodWithAny() throws Exception { + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundInlineClassMethodWithAny.kt"); + } + + @Test + @TestMetadata("boundInlineClassMethodWithInt.kt") + public void testBoundInlineClassMethodWithInt() throws Exception { + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundInlineClassMethodWithInt.kt"); + } + @Test @TestMetadata("boundPropertyReference.kt") public void testBoundPropertyReference() throws Exception { diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/JvmIrAgainstOldBoxInlineTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/JvmIrAgainstOldBoxInlineTestGenerated.java index 831f5c3847b..a6e093e071c 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/JvmIrAgainstOldBoxInlineTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/JvmIrAgainstOldBoxInlineTestGenerated.java @@ -1876,6 +1876,24 @@ public class JvmIrAgainstOldBoxInlineTestGenerated extends AbstractJvmIrAgainstO runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundFunctionReferenceOnLong.kt"); } + @Test + @TestMetadata("boundInlineClassMethod.kt") + public void testBoundInlineClassMethod() throws Exception { + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundInlineClassMethod.kt"); + } + + @Test + @TestMetadata("boundInlineClassMethodWithAny.kt") + public void testBoundInlineClassMethodWithAny() throws Exception { + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundInlineClassMethodWithAny.kt"); + } + + @Test + @TestMetadata("boundInlineClassMethodWithInt.kt") + public void testBoundInlineClassMethodWithInt() throws Exception { + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundInlineClassMethodWithInt.kt"); + } + @Test @TestMetadata("boundPropertyReference.kt") public void testBoundPropertyReference() throws Exception { diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/JvmOldAgainstIrBoxInlineTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/JvmOldAgainstIrBoxInlineTestGenerated.java index 4e57f4dc68d..e69a3f643b6 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/JvmOldAgainstIrBoxInlineTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/JvmOldAgainstIrBoxInlineTestGenerated.java @@ -1876,6 +1876,24 @@ public class JvmOldAgainstIrBoxInlineTestGenerated extends AbstractJvmOldAgainst runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundFunctionReferenceOnLong.kt"); } + @Test + @TestMetadata("boundInlineClassMethod.kt") + public void testBoundInlineClassMethod() throws Exception { + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundInlineClassMethod.kt"); + } + + @Test + @TestMetadata("boundInlineClassMethodWithAny.kt") + public void testBoundInlineClassMethodWithAny() throws Exception { + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundInlineClassMethodWithAny.kt"); + } + + @Test + @TestMetadata("boundInlineClassMethodWithInt.kt") + public void testBoundInlineClassMethodWithInt() throws Exception { + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundInlineClassMethodWithInt.kt"); + } + @Test @TestMetadata("boundPropertyReference.kt") public void testBoundPropertyReference() throws Exception { diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenInlineES6TestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenInlineES6TestGenerated.java index a7b586fc00e..6d4eb6f4839 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenInlineES6TestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenInlineES6TestGenerated.java @@ -1490,6 +1490,21 @@ public class IrJsCodegenInlineES6TestGenerated extends AbstractIrJsCodegenInline runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundFunctionReferenceOnLong.kt"); } + @TestMetadata("boundInlineClassMethod.kt") + public void testBoundInlineClassMethod() throws Exception { + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundInlineClassMethod.kt"); + } + + @TestMetadata("boundInlineClassMethodWithAny.kt") + public void testBoundInlineClassMethodWithAny() throws Exception { + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundInlineClassMethodWithAny.kt"); + } + + @TestMetadata("boundInlineClassMethodWithInt.kt") + public void testBoundInlineClassMethodWithInt() throws Exception { + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundInlineClassMethodWithInt.kt"); + } + @TestMetadata("boundPropertyReference.kt") public void testBoundPropertyReference() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundPropertyReference.kt"); diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenInlineTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenInlineTestGenerated.java index e7de839e212..1808da1d685 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenInlineTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenInlineTestGenerated.java @@ -1490,6 +1490,21 @@ public class IrJsCodegenInlineTestGenerated extends AbstractIrJsCodegenInlineTes runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundFunctionReferenceOnLong.kt"); } + @TestMetadata("boundInlineClassMethod.kt") + public void testBoundInlineClassMethod() throws Exception { + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundInlineClassMethod.kt"); + } + + @TestMetadata("boundInlineClassMethodWithAny.kt") + public void testBoundInlineClassMethodWithAny() throws Exception { + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundInlineClassMethodWithAny.kt"); + } + + @TestMetadata("boundInlineClassMethodWithInt.kt") + public void testBoundInlineClassMethodWithInt() throws Exception { + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundInlineClassMethodWithInt.kt"); + } + @TestMetadata("boundPropertyReference.kt") public void testBoundPropertyReference() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundPropertyReference.kt"); diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/semantics/JsCodegenInlineTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/semantics/JsCodegenInlineTestGenerated.java index 671102f9125..e6a0d325f06 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/semantics/JsCodegenInlineTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/semantics/JsCodegenInlineTestGenerated.java @@ -1490,6 +1490,21 @@ public class JsCodegenInlineTestGenerated extends AbstractJsCodegenInlineTest { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundFunctionReferenceOnLong.kt"); } + @TestMetadata("boundInlineClassMethod.kt") + public void testBoundInlineClassMethod() throws Exception { + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundInlineClassMethod.kt"); + } + + @TestMetadata("boundInlineClassMethodWithAny.kt") + public void testBoundInlineClassMethodWithAny() throws Exception { + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundInlineClassMethodWithAny.kt"); + } + + @TestMetadata("boundInlineClassMethodWithInt.kt") + public void testBoundInlineClassMethodWithInt() throws Exception { + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundInlineClassMethodWithInt.kt"); + } + @TestMetadata("boundPropertyReference.kt") public void testBoundPropertyReference() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundPropertyReference.kt");