JS: translate when to JsSwitch when possible

See KT-21160
This commit is contained in:
Alexey Andreev
2017-11-09 19:14:01 +03:00
parent 7b403211dd
commit 678b4c67c1
21 changed files with 250 additions and 24 deletions
@@ -20747,6 +20747,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
doTest(fileName);
}
@TestMetadata("switchOptimizationWithGap.kt")
public void testSwitchOptimizationWithGap() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/switchOptimizationWithGap.kt");
doTest(fileName);
}
@TestMetadata("typeDisjunction.kt")
public void testTypeDisjunction() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/typeDisjunction.kt");