Do we really add an exclamation point out of nowhere?
Created attachment 26920 [details]
Created attachment 26921 [details]
Comment on attachment 26921 [details]
r=me, as long as there is a testcase
Transmitting file data .....
Committed revision 40111.
the fix of this bug introduces a new bug. Consider the following code:
var a = 5.4
The switch selects "case 5", because numberToInt32() converts 5.4 to 5, which is wrong in this case!
The right test should be something like this in case of scrutinee is a double value:
if ((double)((int)scrutinee) == scrutinee)
Could you please file a new bug for this?