We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 36dbc0e commit 40b7c79Copy full SHA for 40b7c79
runtime/wasmMain/src/kotlinx/benchmark/wasm/WasmBuiltInExecutor.kt
@@ -2,8 +2,17 @@ package kotlinx.benchmark.wasm
2
3
import kotlinx.benchmark.*
4
5
+
6
+private external interface JsAny
7
8
@JsFun("(p) => p")
-private external fun id(p: Any): Any
9
+private external fun jsId(p: JsAny): JsAny
10
11
+private fun id(p: Any): Any {
12
+ // TODO: Use dedicated type for passing Kotlin references to JS when it is available
13
+ @Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
14
+ return jsId(p as JsAny)
15
+}
16
17
class WasmBuiltInExecutor(
18
name: String,
0 commit comments