binaryen
binaryen copied to clipboard
wasm-as should accept empty `then`
Hi,
The following code is rejected by wasm-as
:
(module
(func $f (export "f") (param $n i32)
(if (local.get $n) (then))
)
)
$ wasm-as tmp.wast
[parse exception: expected more elements in list (at 3:23)]Fatal: error in parsing input
It's actually valid and accepted by the reference interpreter.
We're working on a new text parser that will handle this correctly.
Looks like this has been resolved in 1d95fdc7805ef2f29b8b8b0cce8f7c8cc385edd0