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

int check in checked mode is problematic #3720

Closed
peter-ahe-google opened this issue Jun 18, 2012 · 6 comments
Closed

int check in checked mode is problematic #3720

peter-ahe-google opened this issue Jun 18, 2012 · 6 comments
Labels
closed-duplicate Closed in favor of an existing report web-dart2js

Comments

@peter-ahe-google
Copy link
Contributor

Our int check in checked mode doesn't work for integers outside the 32bit range.

@peter-ahe-google
Copy link
Contributor Author

The new fixnum library is failing a unit test in checked mode. The problem is code like this:

int x = 2147483648;

@kasperl
Copy link

kasperl commented Jun 19, 2012

It's actually even worse than not working for integers outside the 32-bit range. All our bitwise operations produce unsigned 32-bit results and our int type checks fail for unsigned integers outside the 31-bit range. The reason is that we use code like this to check for it:

   if (i !== (i | 0)) ...

and i | 0 forces a conversion to a signed 32-bit integer.


cc @floitschG.

@floitschG
Copy link
Contributor

Issue #4437 has been merged into this issue.

@floitschG
Copy link
Contributor

Related (potentially duplicate): issue #3814

@floitschG
Copy link
Contributor

Added Duplicate label.
Marked as being merged into #2983.

@kasperl
Copy link

kasperl commented Sep 7, 2012

Issue #4437 has been merged into this issue.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-duplicate Closed in favor of an existing report web-dart2js
Projects
None yet
Development

No branches or pull requests

3 participants