blob: 7f11f5bba07af151ac000571ee12d8fe58f980e4 [file] [log] [blame]
(function() {
var result = 0;
var m = 1000;
var n = 10000;
for (var i = 0; i < m; ++i) {
var o = {valueOf: function() { return 42; }};
result += o;
for (var j = 0; j < n; ++j)
result += j;
}
if (result != m * (42 + n * (n - 1) / 2))
throw "Error: bad result: " + result;
})();