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:
committed by
Alexey Andreev
parent
5ee61702ee
commit
22ff7c6c45
@@ -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"
|
||||
}
|
||||
Reference in New Issue
Block a user