"" + x where x is not a string should be optimized by the DFG to some manner of ToStr...
[WebKit-https.git] / LayoutTests / fast / js / regress / script-tests / empty-string-plus-int.js
1 function foo(x) {
2     return "" + x;
3 }
4
5 var result;
6 var limit = 100000;
7 for (var i = 0; i < limit; ++i)
8     result = foo(i);
9
10 if (result != String(limit - 1))
11     throw "Error: bad result: " + result;