Files
kotlin-fork/compiler/testData/codegen/box/size/add.kt
T
Zalim Bashorov 77491ded1b Use Array constructor with size to create Array of nulls
Change the constructor visibility from public to private as it should be.
2023-04-22 17:41:23 +00:00

16 lines
299 B
Kotlin
Vendored

// TARGET_BACKEND: WASM
// WASM_DCE_EXPECTED_OUTPUT_SIZE: wasm 12_295
// WASM_DCE_EXPECTED_OUTPUT_SIZE: mjs 5_579
// 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);