-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
dart2js treats (some) unsigned 32-bit integers as non ints #2983
Comments
Added Area-Dart2JS, Triaged labels. |
This comment was originally written by @bp74 Here is a simplified version of the test. testInt(var value) { void main() { --> Well, the value 0xFFFFFFFF (which could be -1 if you say it's 32 bit int) is not an int when compiled with dart2js. |
Dart2js currently only considers 31 bits as integers. |
Set owner to @floitschG. |
Added this to the M1 milestone. |
Changed the title to: "dart2js treats (some) unsigned 32-bit integers and non ints". |
Issue #3720 has been merged into this issue. |
Related (potentially duplicate): issue #3814 |
Changed the title to: "dart2js treats (some) unsigned 32-bit integers as non ints". |
New commits include: ``` git log --format="%C(auto) %h %s" 11c2a0978e66fbc2c182dc6a8174db1a3651276c..3c14d86a67db7207bbc9f654ac49ee60e08e5240 3c14d86a Test cases with core.ignoreCase = true / false (#3025) 937cd3be Fix CR LF in .gitignore / .pubignore (#3026) 610254f7 Add test to ignore dot-files (#2983) c24d7478 Fixes linter warnings (#3021) ``` Change-Id: I49f0fc3a2360b0e1e4e009a4fff2a702163cd6b7 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202481 Auto-Submit: Jonas Jensen <[email protected]> Commit-Queue: Jonas Jensen <[email protected]> Commit-Queue: Alexander Thomas <[email protected]> Reviewed-by: Alexander Thomas <[email protected]>
This issue was originally filed by @bp74
What steps will reproduce the problem?
class Test {
static final int Black = 0xFF000000;
}
testInt(var value) {
print("value is an int: ${value is int}");
}
void main() {
int x = Test.Black;
testInt(x);
}
What is the expected output? What do you see instead?
The Dart-VM says: "value is an int: true"
compiled with frog: "value is an int: true"
compiled with dart2js: "value is an int: false"
Tested in Chrome 18, IE 9, Firefox 12.
What version of the product are you using? On what operating system?
Dart Editor Buid 7466 32 bit, Windows 7 64 bit
The text was updated successfully, but these errors were encountered: