summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/bug852016-2.js
blob: 3efc58964827d0c0df8fac2842a8e630ddfb6d89 (plain)
1
2
3
4
5
6
7
8
function* foo(str) {
  var x = eval(str); yield x[0];
}
for (var i = 0; i < 5; i++)
  assertEq(foo("[4,5,6]").next().value, 4);
for (var i = 0; i < 5; i++)
  assertEq(foo("arguments").next().value, "arguments");