-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Option<enum> returns undefined #1198
Comments
Thanks for the report! Currently |
Adding
|
Oh dear that sounds like a bug! That may just be an unimplemented code path in wasm-bindgen's JS generating for now |
Find a hole automatically to use a sentinel value for `None`, and then just wire everything up! Closes rustwasm#1198
Ok option support should be added in #1214 |
Find a hole automatically to use a sentinel value for `None`, and then just wire everything up! Closes rustwasm#1198
Hello! I have a reproducer for this bug here: https://github.com/attente/wasm-bindgen-option
Basically:
Returning an
enum
that implementswasm_bindgen::convert::OptionIntoWasmAbi
works. (bar()
)Returning an
Option<i32>
works. (baz()
)But returning
Option<enum: wasm_bindgen::convert::OptionIntoWasmAbi>
doesn't work. (foo()
)The output I got from the reproducer is:
The text was updated successfully, but these errors were encountered: