Closed
Description
This issue was originally filed by [email protected]
What steps will reproduce the problem?
- Use the code :
import('dart:math');
num newId(){
var id = new Random();
return id.nextInt((1<<32)-1);
}
main(){
var id = newId();
print(id);
}
- Run dart2js
- Launch with Chrome
What is the expected output? What do you see instead?
I expect a random integer.
I see nothing.
What version of the product are you using? On what operating system?
Dart Edidor Version 0.1.0.201210082016, build 13393
Dart SDK version 13387
OS : ubuntu 12.04 64bits
Please provide any additional information below.
The code above works with Dart alone, but the javascript version doesn't.
If we replace (1<<32)-1 by (1<<31)-1 the javascript works.