JS: when translating content of js() function, rename all free references if they point to Kotlin local variable with the same name. See KT-15212

This commit is contained in:
Alexey Andreev
2016-12-16 17:32:59 +03:00
committed by Alexey Andreev
parent 5ee61702ee
commit 22ff7c6c45
12 changed files with 243 additions and 40 deletions
-18
View File
@@ -1,18 +0,0 @@
fun box(): String {
var result = jsTypeOf(23)
if (result != "number") return "fail1: $result"
result = jsTypeOf("23")
if (result != "string") return "fail2: $result"
result = jsTypeOf({ x: Int -> x })
if (result != "function") return "fail3: $result"
result = jsTypeOf(object {})
if (result != "object") return "fail4: $result"
result = jsTypeOf(true)
if (result != "boolean") return "fail5: $result"
return "OK"
}