summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/generators/yield-yield.js
blob: 4c468ba5af76d0975ab32b330b71f62e467f9617 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// Bug 880447

load(libdir + "asserts.js");

function* f() {
    yield yield 1;
}

var g = f();
assertEq(g.next().value, 1);
assertEq(g.return("hello").value, "hello");
assertEq(g.next().value, undefined);