summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/bug560234b.js
blob: a008b5f42a8e3d4cd7a6e8b05f994512b2874d5d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
function f(a) {
   function* g() {
       yield function () { return a; };
   }
   if (a == 8)
       return g();
   a = 3;
}
var x;
for (var i = 0; i < 9; i++)
   x = f(i);
x.next().value();  // ReferenceError: a is not defined.