Skip to content
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

Fixed invalid type annotation for multivalue returns #4210

Merged
merged 4 commits into from
Oct 31, 2024

Conversation

RunDevelopment
Copy link
Contributor

fixes #4207

Array itself is not a valid type because it requires one generic parameter. I replaced it with number[]. I chose number as the element type, because that's what the surrounding code is using for everything.

Using number for everything is probably wrong, since WASM uses bigint for 64-bit ints AFAIK, but it shouldn't matter too much.

@RunDevelopment
Copy link
Contributor Author

CI fails because CI uses the latest stable compiler (Rust 1.82 now), which uses multi-value returns by default. This means that the generated WASM and JS code will be different in all tests now.

Copy link
Collaborator

@daxpedda daxpedda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we should probably read out the ValueType, but this is already a bug, so this doesn't degrade the current state.

@daxpedda daxpedda merged commit 37b9aa5 into rustwasm:main Oct 31, 2024
38 checks passed
@RunDevelopment RunDevelopment deleted the issue4207 branch October 31, 2024 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Functions returning Result<T,E> result in incorrect typescript function output type Array
2 participants