Update control flow for nested binary exprs

This commit is contained in:
Ron Buckton
2020-10-29 13:32:32 -07:00
parent 8a15291541
commit 2b7e790732
4 changed files with 504 additions and 33 deletions

View File

@@ -1608,7 +1608,7 @@ namespace ts {
* If `node` is a BinaryExpression, adds it to the local work stack, otherwise recursively binds it
*/
function maybeBind(node: Node) {
if (node && isBinaryExpression(node)) {
if (node && isBinaryExpression(node) && !isDestructuringAssignment(node)) {
stackIndex++;
workStacks.expr[stackIndex] = node;
workStacks.state[stackIndex] = BindBinaryExpressionFlowState.BindThenBindChildren;