Check that subject expression is evaluated only once

This commit is contained in:
Dmitry Petrov
2018-06-19 14:39:40 +03:00
parent 6194cfc782
commit a7492e91c9
6 changed files with 47 additions and 0 deletions
@@ -21708,6 +21708,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
runTest("compiler/testData/codegen/box/when/whenSubjectVariable/sparseIntSwitchWithSubjectVariable.kt");
}
@TestMetadata("subjectExpressionIsEvaluatedOnce.kt")
public void testSubjectExpressionIsEvaluatedOnce() throws Exception {
runTest("compiler/testData/codegen/box/when/whenSubjectVariable/subjectExpressionIsEvaluatedOnce.kt");
}
@TestMetadata("whenByEnum.kt")
public void testWhenByEnum() throws Exception {
runTest("compiler/testData/codegen/box/when/whenSubjectVariable/whenByEnum.kt");