Files
kotlin-fork/compiler/testData/codegen/boxWasmJsInterop/jsCode.kt
T
2023-03-03 19:39:09 +00:00

11 lines
262 B
Kotlin
Vendored

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"
}