21 lines
311 B
JavaScript
21 lines
311 B
JavaScript
|
//@ runDefault
|
||
|
|
||
|
function shouldBe(actual, expected) {
|
||
|
if (actual !== expected)
|
||
|
throw new Error('bad value: ' + actual);
|
||
|
}
|
||
|
|
||
|
(function thingy() {
|
||
|
function bar()
|
||
|
{
|
||
|
return bar.caller;
|
||
|
}
|
||
|
|
||
|
function* foo()
|
||
|
{
|
||
|
shouldBe(bar(), null);
|
||
|
}
|
||
|
|
||
|
foo().next();
|
||
|
})();
|