Open fiFoFy opened 3 years ago
In quickjs, integer larger than 2147483647 is stored in double please see https://262.ecma-international.org/5.1/#sec-8.5 and https://bellard.org/quickjs/quickjs.html#Numbers
It may make sense to somehow change this behavior, because it is logical that the int in Javascript is compatible with int in Dart? It turns out that depending on the size of the number, we have to interpret the result differently.
For example: If the user is using the package built_value then this behavior creates problems _(I know how to solve it with builtvalue, but it is unexpected behavior).
I do not know what behavior you want. Is there any problem that using num
type in package built_value?
Currently type wrapper cannot tell whether the passed js float point value is integer or not.
When the number greater then 2147483647 in Dart I get double value.
Example: