[Wasm] Use static import for wasm imports
^KT-65777 fixed
This commit is contained in:
committed by
Space Team
parent
68e5fc7344
commit
abb5f55087
+3
-3
@@ -2,7 +2,7 @@
|
||||
|
||||
// RUN_THIRD_PARTY_OPTIMIZER
|
||||
// WASM_DCE_EXPECTED_OUTPUT_SIZE: wasm 12_773
|
||||
// WASM_DCE_EXPECTED_OUTPUT_SIZE: mjs 4_528
|
||||
// WASM_DCE_EXPECTED_OUTPUT_SIZE: mjs 4_921
|
||||
// WASM_OPT_EXPECTED_OUTPUT_SIZE: 2_640
|
||||
|
||||
// FILE: test.kt
|
||||
@@ -11,7 +11,7 @@
|
||||
fun add(a: Int, b: Int) = a + b
|
||||
|
||||
// FILE: entry.mjs
|
||||
import k from "./index.mjs"
|
||||
import { add } from "./index.mjs"
|
||||
|
||||
const r = k.add(2, 3);
|
||||
const r = add(2, 3);
|
||||
if (r != 5) throw Error("Wrong result: " + r);
|
||||
|
||||
Reference in New Issue
Block a user