mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1018628 - Lookup definition node for identifierName in default value in destructuring. r=jorendorff
This commit is contained in:
parent
2d6158780c
commit
f8f59ee89e
@ -6292,7 +6292,10 @@ Parser<ParseHandler>::assignExpr(InvokedPrediction invoked)
|
|||||||
if (!checkAndMarkAsAssignmentLhs(lhs, flavor))
|
if (!checkAndMarkAsAssignmentLhs(lhs, flavor))
|
||||||
return null();
|
return null();
|
||||||
|
|
||||||
|
bool saved = pc->inDeclDestructuring;
|
||||||
|
pc->inDeclDestructuring = false;
|
||||||
Node rhs = assignExpr();
|
Node rhs = assignExpr();
|
||||||
|
pc->inDeclDestructuring = saved;
|
||||||
if (!rhs)
|
if (!rhs)
|
||||||
return null();
|
return null();
|
||||||
|
|
||||||
|
@ -0,0 +1,10 @@
|
|||||||
|
var a = 10;
|
||||||
|
function f1(a,
|
||||||
|
[b=(assertEq(a, 1), a=2, 42)],
|
||||||
|
{c:c=(assertEq(a, 2), a=3, 43)}) {
|
||||||
|
assertEq(a, 3);
|
||||||
|
assertEq(b, 42);
|
||||||
|
assertEq(c, 43);
|
||||||
|
}
|
||||||
|
f1(1, [], {});
|
||||||
|
assertEq(a, 10);
|
Loading…
Reference in New Issue
Block a user