blob: 2fa6afda2ce9971727c916f899d793c88fb467e2 [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;
})();