[JS_IR] Enum constructor copy parameters with mapping by index

Previously mapping was by name, and there was clash in case of user
parameters named 'name' or 'ordinal'

^KT-39186 fixed
This commit is contained in:
Ilya Goncharov
2020-10-22 14:45:45 +03:00
parent 2790bc1105
commit 4479bf0933
9 changed files with 67 additions and 7 deletions
@@ -12495,6 +12495,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
runTest("compiler/testData/codegen/box/enum/enumCompanionInit.kt");
}
@TestMetadata("enumConstructorParameterClashWithDefaults.kt")
public void testEnumConstructorParameterClashWithDefaults() throws Exception {
runTest("compiler/testData/codegen/box/enum/enumConstructorParameterClashWithDefaults.kt");
}
@TestMetadata("enumEntryMembers.kt")
public void testEnumEntryMembers() throws Exception {
runTest("compiler/testData/codegen/box/enum/enumEntryMembers.kt");