提交 aa35d4ed 编写于 作者: A Alexey Andreev

JS: prove that KT-8315 is no more reproducible

上级 6ba0ac12
...@@ -6644,6 +6644,12 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { ...@@ -6644,6 +6644,12 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
doTest(fileName); doTest(fileName);
} }
@TestMetadata("incDecOptimization.kt")
public void testIncDecOptimization() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/number/incDecOptimization.kt");
doTest(fileName);
}
@TestMetadata("intConversions.kt") @TestMetadata("intConversions.kt")
public void testIntConversions() throws Exception { public void testIntConversions() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/number/intConversions.kt"); String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/number/intConversions.kt");
......
// EXPECTED_REACHABLE_NODES: 1029
// CHECK_VARS_COUNT: function=test count=1
class A {
var i = 23
}
fun test(a: A): String {
var x = ++a.i
if (x != 24) return "fail1: $x"
a.i++
if (a.i != 25) return "fail2: $a.i"
// a.i++, used as expression, requires temporary variable
return "OK"
}
fun box(): String = test(A())
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册