KT-36047 Support when-with-subject in optimized 'when' generators

This commit is contained in:
Dmitry Petrov
2020-03-11 14:50:06 +03:00
parent fd70b10b17
commit a9ab3ae192
8 changed files with 79 additions and 8 deletions
@@ -4387,6 +4387,11 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest {
runTest("compiler/testData/codegen/bytecodeText/when/lookupSwitch.kt");
}
@TestMetadata("lookupSwitchWithSubjectVal.kt")
public void testLookupSwitchWithSubjectVal() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/when/lookupSwitchWithSubjectVal.kt");
}
@TestMetadata("noBoxingInDefaultWhenWithSpecialCases.kt")
public void testNoBoxingInDefaultWhenWithSpecialCases() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/when/noBoxingInDefaultWhenWithSpecialCases.kt");
@@ -4407,6 +4412,11 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest {
runTest("compiler/testData/codegen/bytecodeText/when/simpleConstValsInsideWhen.kt");
}
@TestMetadata("stringSwitchWithSubjectVal.kt")
public void testStringSwitchWithSubjectVal() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/when/stringSwitchWithSubjectVal.kt");
}
@TestMetadata("subjectValHasLocalVariableSlot.kt")
public void testSubjectValHasLocalVariableSlot() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/when/subjectValHasLocalVariableSlot.kt");
@@ -4437,6 +4447,11 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest {
runTest("compiler/testData/codegen/bytecodeText/when/tableSwitch.kt");
}
@TestMetadata("tableSwitchWithSubjectVal.kt")
public void testTableSwitchWithSubjectVal() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/when/tableSwitchWithSubjectVal.kt");
}
@TestMetadata("whenNull.kt")
public void testWhenNull() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/when/whenNull.kt");