Maintain evaluation order for suspend calls in constructor arguments

Insert 'Class.forName(...)' in place of NEW instruction, so that the
corresponding class will be initialized if required.
This commit is contained in:
Dmitry Petrov
2017-10-02 17:29:20 +03:00
parent 533c1d2541
commit da6841163b
7 changed files with 105 additions and 23 deletions
@@ -6146,6 +6146,12 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
doTest(fileName);
}
@TestMetadata("suspendInTheMiddleOfObjectConstructionEvaluationOrder.kt")
public void testSuspendInTheMiddleOfObjectConstructionEvaluationOrder() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendInTheMiddleOfObjectConstructionEvaluationOrder.kt");
doTest(fileName);
}
@TestMetadata("suspensionInsideSafeCall.kt")
public void testSuspensionInsideSafeCall() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspensionInsideSafeCall.kt");