Bug 773927 - Propagate closed-ness in CompExprTransplanter (r=dvander)

--HG--
extra : rebase_source : 85f484b705372b380832d94172024b0da20f19cf
This commit is contained in:
Luke Wagner 2012-07-16 15:10:38 -07:00
parent 209edc9144
commit 08a191c58f
2 changed files with 8 additions and 0 deletions

View File

@ -5191,6 +5191,8 @@ CompExprTransplanter::transplant(ParseNode *pn)
*pnup = NULL;
if (!tc->lexdeps->put(atom, dn2))
return false;
if (dn->isClosed())
dn2->pn_dflags |= PND_CLOSED;
} else if (dn->isPlaceholder()) {
/*
* The variable first occurs free in the 'yield' expression;

View File

@ -0,0 +1,6 @@
function outer() {
(function() {x})
assertEq(((function() {return x}) for (x in [42])).next()(), "0");
var x;
}
outer();