[JS IR] Fix default arguments in suspend functions

Don't forget to remap parameter references in default arg expressions

The issue originally discovered in kotlinx.coroutines tests.

 - add test
This commit is contained in:
Roman Artemev
2021-10-25 13:36:28 +03:00
committed by Space
parent 1d58fd159a
commit 9f52326d14
10 changed files with 105 additions and 6 deletions
@@ -6857,6 +6857,11 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes
runTest("compiler/testData/codegen/box/coroutines/simpleSuspendCallableReference.kt");
}
@TestMetadata("simpleWithDefaultValue.kt")
public void testSimpleWithDefaultValue() throws Exception {
runTest("compiler/testData/codegen/box/coroutines/simpleWithDefaultValue.kt");
}
@TestMetadata("simpleWithHandleResult.kt")
public void testSimpleWithHandleResult() throws Exception {
runTest("compiler/testData/codegen/box/coroutines/simpleWithHandleResult.kt");
@@ -6263,6 +6263,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
runTest("compiler/testData/codegen/box/coroutines/simpleSuspendCallableReference.kt");
}
@TestMetadata("simpleWithDefaultValue.kt")
public void testSimpleWithDefaultValue() throws Exception {
runTest("compiler/testData/codegen/box/coroutines/simpleWithDefaultValue.kt");
}
@TestMetadata("simpleWithHandleResult.kt")
public void testSimpleWithHandleResult() throws Exception {
runTest("compiler/testData/codegen/box/coroutines/simpleWithHandleResult.kt");
@@ -6086,6 +6086,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest
runTest("compiler/testData/codegen/box/coroutines/simpleSuspendCallableReference.kt");
}
@TestMetadata("simpleWithDefaultValue.kt")
public void testSimpleWithDefaultValue() throws Exception {
runTest("compiler/testData/codegen/box/coroutines/simpleWithDefaultValue.kt");
}
@TestMetadata("simpleWithHandleResult.kt")
public void testSimpleWithHandleResult() throws Exception {
runTest("compiler/testData/codegen/box/coroutines/simpleWithHandleResult.kt");
@@ -7082,6 +7082,12 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
runTest("compiler/testData/codegen/box/coroutines/simpleSuspendCallableReference.kt");
}
@Test
@TestMetadata("simpleWithDefaultValue.kt")
public void testSimpleWithDefaultValue() throws Exception {
runTest("compiler/testData/codegen/box/coroutines/simpleWithDefaultValue.kt");
}
@Test
@TestMetadata("simpleWithHandleResult.kt")
public void testSimpleWithHandleResult() throws Exception {