JS: add test to prove that KT-19483 is no more reproducible

This commit is contained in:
Alexey Andreev
2017-09-08 14:44:18 +03:00
parent c65a79bca4
commit 24c6f5f0f0
2 changed files with 39 additions and 0 deletions
@@ -0,0 +1,33 @@
// EXPECTED_REACHABLE_NODES: 1001
var l = ""
fun log(message: String) {
l += message + ";"
}
fun baz(x: String){
log("baz($x)")
}
fun baz(x: String, i: Int) {
log("baz($x, $i)")
}
inline fun bar() {
boo {
baz("AAA")
foo()
}
}
fun boo(x: () -> Unit) = x()
inline fun foo() {
log("foo()")
baz("BBB", 333)
}
fun box(): String {
bar()
if (l != "baz(AAA);foo();baz(BBB, 333);") return "fail: $l"
return "OK"
}