JS: generate temporary names for function parameters. Remove tests for js() function that references parameters. Remove such usages of js() function from stdlib

This commit is contained in:
Alexey Andreev
2016-12-09 13:35:25 +03:00
parent b634c2cbe3
commit 39de1a7659
13 changed files with 51 additions and 55 deletions
@@ -0,0 +1,9 @@
fun f(x: Int) = x * 2
fun test(f: (Long) -> Long) = Pair(f(23 as Int), f(42L))
fun box(): String {
val result = test { it * 3 }
if (result != Pair(46, 126L)) return "fail: $result"
return "OK"
}