Async function returning unit triggers assert_signature_match
assertion failure
#1781
Labels
assert_signature_match
assertion failure
#1781
Describe the Bug
When returning a unit or a value such as a
Result<(), JsValue>
which contains a unit from an async function, this assertion fails.Steps to Reproduce
lib.rs
containing this code:rustup run nightly wasm-pack build --target web
Expected Behavior
wasm-bindgen
will either convert the unit as a correspondingJsValue
(likelynull
orundefined
) or log an error at compile time.Actual Behavior
The compilation will succeed, but
wasm-bindgen
will panic when the assertion fails.Example output:
Additional Context
wasm-bindgen
,wasm-bindgen-futures
,js-sys
,web-sys
, and CLI version: master branch (93f5bba at the time of writing); also tested on 8861811 to validate this is not a regressionwasm-pack
version: Both 0.9.0 or 0.8.1 do not workRust version:
rustc 1.39.0-nightly (9b9d2aff8 2019-09-19)
The text was updated successfully, but these errors were encountered: