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

Can't represent large constants #21

Closed
jyasskin opened this issue Dec 8, 2014 · 3 comments
Closed

Can't represent large constants #21

jyasskin opened this issue Dec 8, 2014 · 3 comments

Comments

@jyasskin
Copy link
Member

jyasskin commented Dec 8, 2014

WebIDL allows constants of the 64-bit integer type unsigned long long. However, this library tries to represent them as a javascript number, which means that large numbers get rounded. jyasskin@48a2400 demonstrates this.

@darobin
Copy link
Member

darobin commented Dec 11, 2014

Yeah, but last I checked TC-39 had rejected bigger number support. I'm not sure how to handle this gracefully (a string isn't a good option). Maybe using node-int64 (which I think can be browserified)?

I wonder if this should be in WebIDL in the first place.

@jyasskin
Copy link
Member Author

As long as we're happy with ReSpec rounding large numbers to the nearest double, this isn't urgent for me.

@darobin
Copy link
Member

darobin commented Dec 11, 2014

Yeah, if someone adds a large numeric constant we should probably slap them in the face anyway.

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

No branches or pull requests

3 participants