Commit bd114da7 authored by Toon Verwaest's avatar Toon Verwaest Committed by Commit Bot

[parser] Set rewritable_length to the correct length rather than 0

Bug: chromium:908975
Change-Id: I3dd9cf32de5b11554c2e1cbc0538c9b11ecda09d
Reviewed-on: https://chromium-review.googlesource.com/c/1352286Reviewed-by: 's avatarMarja Hölttä <marja@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57892}
parent 894cc021
......@@ -1745,7 +1745,8 @@ ParserBase<Impl>::ParsePrimaryExpression() {
if (peek() == Token::ARROW) {
scope_snapshot_ = std::move(Scope::Snapshot(scope()));
rewritable_length_ = 0;
rewritable_length_ = static_cast<int>(
function_state_->destructuring_assignments_to_rewrite().size());
}
return impl()->ExpressionFromIdentifier(name, beg_pos, infer);
}
......
// Copyright 2018 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
[] = [];
a => 0
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment