Files
kotlin-fork/compiler/testData/codegen/box/size/add.kt
T
Ilya Goncharov d865202bd5 [Wasm] Inline _importModule
^KT-59556 fixed
2023-06-22 13:56:47 +00:00

16 lines
297 B
Kotlin
Vendored

// TARGET_BACKEND: WASM
// WASM_DCE_EXPECTED_OUTPUT_SIZE: wasm 12_946
// WASM_DCE_EXPECTED_OUTPUT_SIZE: mjs 5_456
// FILE: test.kt
@JsExport
fun add(a: Int, b: Int) = a + b
// FILE: entry.mjs
import k from "./index.mjs"
const r = k.add(2, 3);
if (r != 5) throw Error("Wrong result: " + r);