E3014#
Inline wasm syntax error. MoonBit will check if the inline wasm syntax is correct, including:
If the parenthesis are correctly matched.
If the wasm instructions are correctly formatted.
Erroneous example#
///|
extern "wasm" fn i32_load(
addr : Int, // Error: Inline wasm syntax error: unmatched parenthesis at 1:1-1:57
) -> Int =
#|(func (param i32) (result i32)
#| (i32.load (local.get 0))
Suggestion#
Fix the inline wasm syntax as suggested by the warning message.
///|
extern "wasm" fn i32_load(addr : Int) -> Int =
#|(func (param i32) (result i32)
#| (i32.load (local.get 0)))
///|
test {
ignore(i32_load(0))
}