[Wasm] Support restricted version of js("code") (KT-56955)
This commit is contained in:
committed by
Space Team
parent
eb8c47343a
commit
71e6b19760
@@ -0,0 +1,11 @@
|
||||
fun foo(x: Int, y: Int, z: String): Int = js("x + y + Number(z)")
|
||||
|
||||
val x: String = js("typeof 10")
|
||||
|
||||
fun box(): String {
|
||||
val res = foo(10, 20, z = "30")
|
||||
if (res != 60) return "Wrong foo: $res"
|
||||
if (x != "number") return "Wrong x: $x"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user