diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/ExpressionCodegen.java b/compiler/backend/src/org/jetbrains/kotlin/codegen/ExpressionCodegen.java index d46dfc729ac..9551c199603 100644 --- a/compiler/backend/src/org/jetbrains/kotlin/codegen/ExpressionCodegen.java +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/ExpressionCodegen.java @@ -100,7 +100,8 @@ import static org.jetbrains.kotlin.codegen.JvmCodegenUtil.*; import static org.jetbrains.kotlin.codegen.binding.CodegenBinding.*; import static org.jetbrains.kotlin.codegen.inline.InlineCodegenUtilsKt.*; import static org.jetbrains.kotlin.resolve.BindingContext.*; -import static org.jetbrains.kotlin.resolve.BindingContextUtils.*; +import static org.jetbrains.kotlin.resolve.BindingContextUtils.getDelegationConstructorCall; +import static org.jetbrains.kotlin.resolve.BindingContextUtils.isBoxedLocalCapturedInClosure; import static org.jetbrains.kotlin.resolve.DescriptorUtils.*; import static org.jetbrains.kotlin.resolve.jvm.AsmTypes.*; import static org.jetbrains.kotlin.types.expressions.ExpressionTypingUtils.isFunctionExpression; @@ -2900,7 +2901,9 @@ public class ExpressionCodegen extends KtVisitor impleme while (cur != null) { ClassDescriptor thisDescriptor = cur.getThisDescriptor(); - if (!isSuper && thisDescriptor == thisOrOuterClass) { + // We use equals on type constructors (instead of reference equality on classes) to support the case where default parameter + // values of actual functions loaded from the expected function refer to the expected class. + if (!isSuper && thisDescriptor.getTypeConstructor().equals(thisOrOuterClass.getTypeConstructor())) { return result; } diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/FrameMap.kt b/compiler/backend/src/org/jetbrains/kotlin/codegen/FrameMap.kt index c8ce685b611..34be1a61bbb 100644 --- a/compiler/backend/src/org/jetbrains/kotlin/codegen/FrameMap.kt +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/FrameMap.kt @@ -21,10 +21,9 @@ import com.intellij.openapi.util.Trinity import gnu.trove.TObjectIntHashMap import org.jetbrains.kotlin.descriptors.DeclarationDescriptor import org.jetbrains.org.objectweb.asm.Type +import java.util.* -import java.util.ArrayList - -class FrameMap : FrameMapBase() +open class FrameMap : FrameMapBase() open class FrameMapBase { private val myVarIndex = TObjectIntHashMap() @@ -61,7 +60,7 @@ open class FrameMapBase { currentSize -= type.size } - fun getIndex(descriptor: T): Int { + open fun getIndex(descriptor: T): Int { return if (myVarIndex.contains(descriptor)) myVarIndex.get(descriptor) else -1 } diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/FrameMapWithExpectActualSupport.kt b/compiler/backend/src/org/jetbrains/kotlin/codegen/FrameMapWithExpectActualSupport.kt new file mode 100644 index 00000000000..8a67fa08976 --- /dev/null +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/FrameMapWithExpectActualSupport.kt @@ -0,0 +1,38 @@ +/* + * Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license + * that can be found in the license/LICENSE.txt file. + */ + +package org.jetbrains.kotlin.codegen + +import org.jetbrains.kotlin.descriptors.* +import org.jetbrains.kotlin.resolve.multiplatform.ExpectedActualResolver +import org.jetbrains.kotlin.resolve.scopes.receivers.ExtensionReceiver + +/** + * This [FrameMap] subclass substitutes values declared in the expected declaration with the corresponding value in the actual declaration, + * which is needed for the case when expected function declares parameters with default values, which refer to other parameters. + */ +class FrameMapWithExpectActualSupport(private val module: ModuleDescriptor) : FrameMap() { + override fun getIndex(descriptor: DeclarationDescriptor): Int { + val tmp = if (descriptor is ParameterDescriptor) findActualParameter(descriptor) ?: descriptor else descriptor + return super.getIndex(tmp) + } + + private fun findActualParameter(parameter: ParameterDescriptor): ParameterDescriptor? { + val container = parameter.containingDeclaration + if (container !is CallableMemberDescriptor || !container.isExpect) return null + + // Generation of value parameters is supported by the fact that FunctionCodegen.generateDefaultImplBody substitutes value parameters + // of the generated actual function with the parameters of the expected declaration in the first place. + // Generation of dispatch receiver parameters (this and outer receiver values) is supported + // in ExpressionCodegen.generateThisOrOuterFromContext by comparing classes by type constructor equality. + if (parameter !is ReceiverParameterDescriptor || parameter.value !is ExtensionReceiver) return null + + val actual = with(ExpectedActualResolver) { + container.findCompatibleActualForExpected(module).firstOrNull() + } + + return (actual as? CallableDescriptor)?.extensionReceiverParameter + } +} diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/FunctionCodegen.java b/compiler/backend/src/org/jetbrains/kotlin/codegen/FunctionCodegen.java index 42a8d1d7d3e..8528e288865 100644 --- a/compiler/backend/src/org/jetbrains/kotlin/codegen/FunctionCodegen.java +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/FunctionCodegen.java @@ -1360,7 +1360,7 @@ public class FunctionCodegen { @NotNull List valueParameters, boolean isStatic ) { - FrameMap frameMap = new FrameMap(); + FrameMap frameMap = new FrameMapWithExpectActualSupport(state.getModule()); if (!isStatic) { frameMap.enterTemp(OBJECT_TYPE); } diff --git a/compiler/testData/codegen/box/multiplatform/defaultArguments/dispatchReceiverValue.kt b/compiler/testData/codegen/box/multiplatform/defaultArguments/dispatchReceiverValue.kt new file mode 100644 index 00000000000..8423a1c30cd --- /dev/null +++ b/compiler/testData/codegen/box/multiplatform/defaultArguments/dispatchReceiverValue.kt @@ -0,0 +1,18 @@ +// !LANGUAGE: +MultiPlatformProjects +// IGNORE_BACKEND: JVM_IR + +// FILE: common.kt + +expect class C { + val value: String + + fun test(result: String = value): String +} + +// FILE: platform.kt + +actual class C(actual val value: String) { + actual fun test(result: String): String = result +} + +fun box() = C("Fail").test("OK") diff --git a/compiler/testData/codegen/box/multiplatform/defaultArguments/extensionReceiverValue.kt b/compiler/testData/codegen/box/multiplatform/defaultArguments/extensionReceiverValue.kt new file mode 100644 index 00000000000..2cb06f51c6e --- /dev/null +++ b/compiler/testData/codegen/box/multiplatform/defaultArguments/extensionReceiverValue.kt @@ -0,0 +1,16 @@ +// !LANGUAGE: +MultiPlatformProjects +// IGNORE_BACKEND: JVM_IR + +// FILE: common.kt + +class Receiver(val value: String) + +expect fun Receiver.test(result: String = value): String + +// FILE: platform.kt + +actual fun Receiver.test(result: String): String { + return result +} + +fun box() = Receiver("Fail").test("OK") diff --git a/compiler/testData/codegen/box/multiplatform/defaultArguments/parametersInArgumentValues.kt b/compiler/testData/codegen/box/multiplatform/defaultArguments/parametersInArgumentValues.kt new file mode 100644 index 00000000000..a06969933c1 --- /dev/null +++ b/compiler/testData/codegen/box/multiplatform/defaultArguments/parametersInArgumentValues.kt @@ -0,0 +1,17 @@ +// !LANGUAGE: +MultiPlatformProjects +// IGNORE_BACKEND: JVM_IR + +// FILE: common.kt + +class B(val value: Int) + +expect fun test(a: Int = 2, b: Int = B(a * 2).value, c: String = "${b}$a"): String + +// FILE: platform.kt + +actual fun test(a: Int, b: Int, c: String): String = c + +fun box(): String { + val result = test() + return if (result == "42") "OK" else "Fail: $result" +} diff --git a/compiler/testData/codegen/boxInline/multiplatform/defaultArguments/receiversAndParametersInLambda.kt b/compiler/testData/codegen/boxInline/multiplatform/defaultArguments/receiversAndParametersInLambda.kt new file mode 100644 index 00000000000..d3b50737ae2 --- /dev/null +++ b/compiler/testData/codegen/boxInline/multiplatform/defaultArguments/receiversAndParametersInLambda.kt @@ -0,0 +1,31 @@ +// !LANGUAGE: +MultiPlatformProjects +// NO_CHECK_LAMBDA_INLINING +// IGNORE_BACKEND: JVM_IR + +// FILE: 1.kt + +class C(val s1: String, val s2: String) + +expect fun C.test(r1: () -> String = { s1 }, r2: () -> String = this::s2): String + +actual inline fun C.test(r1: () -> String, r2: () -> String): String = r1() + r2() + + +expect class D { + val s1: String + val s2: String + + fun test(r1: () -> String = { s1 }, r2: () -> String = this::s2): String +} + +actual class D(actual val s1: String, actual val s2: String) { + actual inline fun test(r1: () -> String, r2: () -> String): String = r1() + r2() +} + +// FILE: 2.kt + +fun box(): String { + if (C("O", "K").test() != "OK") return "Fail extension receiver" + if (D("O", "K").test() != "OK") return "Fail dispatch receiver" + return "OK" +} diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java index e18e6cd3a04..84797c2ba06 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java @@ -15875,6 +15875,16 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/delegatedExpectedInterface.kt"); } + @TestMetadata("dispatchReceiverValue.kt") + public void testDispatchReceiverValue() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/dispatchReceiverValue.kt"); + } + + @TestMetadata("extensionReceiverValue.kt") + public void testExtensionReceiverValue() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/extensionReceiverValue.kt"); + } + @TestMetadata("function.kt") public void testFunction() throws Exception { runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/function.kt"); @@ -15930,6 +15940,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/kt23739.kt"); } + @TestMetadata("parametersInArgumentValues.kt") + public void testParametersInArgumentValues() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/parametersInArgumentValues.kt"); + } + @TestMetadata("superCall.kt") public void testSuperCall() throws Exception { runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/superCall.kt"); diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxInlineCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxInlineCodegenTestGenerated.java index beb337b3900..6afd49fe595 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxInlineCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxInlineCodegenTestGenerated.java @@ -1890,6 +1890,37 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo } } + @TestMetadata("compiler/testData/codegen/boxInline/multiplatform") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Multiplatform extends AbstractBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInMultiplatform() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/multiplatform"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + + @TestMetadata("compiler/testData/codegen/boxInline/multiplatform/defaultArguments") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class DefaultArguments extends AbstractBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInDefaultArguments() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/multiplatform/defaultArguments"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + + @TestMetadata("receiversAndParametersInLambda.kt") + public void testReceiversAndParametersInLambda() throws Exception { + runTest("compiler/testData/codegen/boxInline/multiplatform/defaultArguments/receiversAndParametersInLambda.kt"); + } + } + } + @TestMetadata("compiler/testData/codegen/boxInline/noInline") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/CompileKotlinAgainstInlineKotlinTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/CompileKotlinAgainstInlineKotlinTestGenerated.java index 57055182b32..61c37959612 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/CompileKotlinAgainstInlineKotlinTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/CompileKotlinAgainstInlineKotlinTestGenerated.java @@ -1890,6 +1890,37 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi } } + @TestMetadata("compiler/testData/codegen/boxInline/multiplatform") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Multiplatform extends AbstractCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInMultiplatform() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/multiplatform"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + + @TestMetadata("compiler/testData/codegen/boxInline/multiplatform/defaultArguments") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class DefaultArguments extends AbstractCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInDefaultArguments() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/multiplatform/defaultArguments"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + + @TestMetadata("receiversAndParametersInLambda.kt") + public void testReceiversAndParametersInLambda() throws Exception { + runTest("compiler/testData/codegen/boxInline/multiplatform/defaultArguments/receiversAndParametersInLambda.kt"); + } + } + } + @TestMetadata("compiler/testData/codegen/boxInline/noInline") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java index b235e1baafd..7cafa7d3cb5 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java @@ -15880,6 +15880,16 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/constructor.kt"); } + @TestMetadata("dispatchReceiverValue.kt") + public void testDispatchReceiverValue() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/dispatchReceiverValue.kt"); + } + + @TestMetadata("extensionReceiverValue.kt") + public void testExtensionReceiverValue() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/extensionReceiverValue.kt"); + } + @TestMetadata("function.kt") public void testFunction() throws Exception { runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/function.kt"); @@ -15934,6 +15944,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes public void testKt23739() throws Exception { runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/kt23739.kt"); } + + @TestMetadata("parametersInArgumentValues.kt") + public void testParametersInArgumentValues() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/parametersInArgumentValues.kt"); + } } } diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java index 0eb2c2b4c62..b9a04ad04f1 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java @@ -15880,6 +15880,16 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/delegatedExpectedInterface.kt"); } + @TestMetadata("dispatchReceiverValue.kt") + public void testDispatchReceiverValue() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/dispatchReceiverValue.kt"); + } + + @TestMetadata("extensionReceiverValue.kt") + public void testExtensionReceiverValue() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/extensionReceiverValue.kt"); + } + @TestMetadata("function.kt") public void testFunction() throws Exception { runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/function.kt"); @@ -15935,6 +15945,11 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/kt23739.kt"); } + @TestMetadata("parametersInArgumentValues.kt") + public void testParametersInArgumentValues() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/parametersInArgumentValues.kt"); + } + @TestMetadata("superCall.kt") public void testSuperCall() throws Exception { runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/superCall.kt"); diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxInlineCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxInlineCodegenTestGenerated.java index 5885b32b84c..52fe86bd543 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxInlineCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxInlineCodegenTestGenerated.java @@ -1890,6 +1890,37 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli } } + @TestMetadata("compiler/testData/codegen/boxInline/multiplatform") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Multiplatform extends AbstractIrBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInMultiplatform() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/multiplatform"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true); + } + + @TestMetadata("compiler/testData/codegen/boxInline/multiplatform/defaultArguments") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class DefaultArguments extends AbstractIrBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInDefaultArguments() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/multiplatform/defaultArguments"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true); + } + + @TestMetadata("receiversAndParametersInLambda.kt") + public void testReceiversAndParametersInLambda() throws Exception { + runTest("compiler/testData/codegen/boxInline/multiplatform/defaultArguments/receiversAndParametersInLambda.kt"); + } + } + } + @TestMetadata("compiler/testData/codegen/boxInline/noInline") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/IrJsCodegenBoxTestGenerated.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/IrJsCodegenBoxTestGenerated.java index 0294d935a35..b694819c35c 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/IrJsCodegenBoxTestGenerated.java +++ b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/IrJsCodegenBoxTestGenerated.java @@ -12265,6 +12265,16 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/delegatedExpectedInterface.kt"); } + @TestMetadata("dispatchReceiverValue.kt") + public void testDispatchReceiverValue() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/dispatchReceiverValue.kt"); + } + + @TestMetadata("extensionReceiverValue.kt") + public void testExtensionReceiverValue() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/extensionReceiverValue.kt"); + } + @TestMetadata("function.kt") public void testFunction() throws Exception { runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/function.kt"); @@ -12315,6 +12325,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/kt23739.kt"); } + @TestMetadata("parametersInArgumentValues.kt") + public void testParametersInArgumentValues() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/parametersInArgumentValues.kt"); + } + @TestMetadata("superCall.kt") public void testSuperCall() throws Exception { runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/superCall.kt"); diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java index ff399600595..991152ff63c 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java +++ b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java @@ -13360,6 +13360,16 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/delegatedExpectedInterface.kt"); } + @TestMetadata("dispatchReceiverValue.kt") + public void testDispatchReceiverValue() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/dispatchReceiverValue.kt"); + } + + @TestMetadata("extensionReceiverValue.kt") + public void testExtensionReceiverValue() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/extensionReceiverValue.kt"); + } + @TestMetadata("function.kt") public void testFunction() throws Exception { runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/function.kt"); @@ -13410,6 +13420,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/kt23739.kt"); } + @TestMetadata("parametersInArgumentValues.kt") + public void testParametersInArgumentValues() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/parametersInArgumentValues.kt"); + } + @TestMetadata("superCall.kt") public void testSuperCall() throws Exception { runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/superCall.kt");