JS: prove that KT-8315 is no more reproducible

This commit is contained in:
Alexey Andreev
2017-09-14 14:15:50 +03:00
parent 6ba0ac1238
commit aa35d4ed36
2 changed files with 26 additions and 0 deletions
@@ -0,0 +1,20 @@
// 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())