-
Notifications
You must be signed in to change notification settings - Fork 237
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
brili: Problem when deserializing large integer constants from JSON #304
Comments
The I would guess |
It might be the JSON parser in typescript truncating the input integer before it can be converted to a bigint
|
Try printing out x then to see if the value is different. Might also be interesting to print out val here before it gets converted to bigInt Line 466 in daaff28
|
So looks like it's part of the problem.
Here's a StackOverflow page that talks about JSON.parse and numbers. |
Also logged the val using this diff
|
There's also a JS package for JSON parsing with bigints |
Thanks for reporting this! Fortunately, it's pretty easy to confirm that JSON deserialization is causing the problem; there's no need to observe it "in situ" in the interpreter:
It's too bad that |
To reproduce:
The Bril documentation on integers writes:
I wonder which one is correct?
The text was updated successfully, but these errors were encountered: