Skip to content

fix: Add coercion for unsigned 64-bit types for bindings #2350

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

Merged
merged 5 commits into from
Jul 20, 2022

Conversation

MaxGraey
Copy link
Member

Example:

export function test(): u64 {
  return 18446744073709551614; // i64.const -2
}

Before:

assert(exports.test() == 18446744073709551614n) // -> fail due to return -2n

Now with this PR:

assert(exports.test() == 18446744073709551614n) // pass!
  • I've read the contributing guidelines
  • I've added my name and email to the NOTICE file

@MaxGraey MaxGraey merged commit fa4a6ef into AssemblyScript:main Jul 20, 2022
@MaxGraey MaxGraey deleted the bindgen-unsigned-lowering branch July 20, 2022 11:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants