-
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
expression has type externref but expected i32 #2446
Comments
Would you be able to upload the wasm file? Additionally could you clarify which wasm-bindgen-cli version you're using? |
Thanks for looking into my issue. |
Was this file perhaps run through |
It's not safe for us to arbitrarily modify the instruction stream since wasm isn't guaranteed to be an AST! Instead we resort to a few extra instructions with locals to achieve what we want here. Closes rustwasm#2446
Ok thanks for clarifying! I dug in a bit and this should be fixed in #2450. Thanks again for the report! |
Awesome. I'm glad I could help. Thank you for the fix (and all your work on the Rust wasm ecosystem)! |
It's not safe for us to arbitrarily modify the instruction stream since wasm isn't guaranteed to be an AST! Instead we resort to a few extra instructions with locals to achieve what we want here. Closes #2446
Describe the Bug
When I compile my project with
--reference-types
, I getexpression has type externref but expected i32
in Firefox (nightly 87.0a1 (2021-02-04) as well as beta) and Chrome (with flags to enable reference types).Steps to Reproduce
yarn build
Expected Behavior
Without
--reference-types
the library works so I would expect it to work with the flag as well.Actual Behavior
Error
expression has type externref but expected i32
.The text was updated successfully, but these errors were encountered: