blob: 071a0860f8112eaf64a364563f52cae28c080105 [file] [log] [blame]
(function() {
// Change string value of the loop variable in the loop.
var foo = function() {
var sum = 0;
var a = [1, 2, 3];
a.foo = 42;
for (var i in a) {
i = "foo";
sum += a[i];
}
return sum;
};
noInline(foo);
for (var i = 0; i < 10000; ++i) {
if (foo() != 42 * 4)
throw new Error("bad result");
}
foo(null);
})();