DFG NewArray/NewArrayBuffer shouldn't be constructing with negative indexing
[WebKit-https.git] / LayoutTests / js / script-tests / dfg-new-array-while-having-a-bad-time.js
1 description("Tests that DFG NewArray works when having a bad time.");
2
3 Array.prototype.__defineSetter__("100", function() { debug("Ouch!"); });
4
5 function foo() { return ["foo", 42, {f:23}]; }
6
7 dfgShouldBe(foo, "foo()[0]", "\"foo\"");
8 dfgShouldBe(foo, "foo()[1]", "42");
9 dfgShouldBe(foo, "foo()[2].f", "23");
10