Commit b802051d authored by littledan's avatar littledan Committed by Commit bot

Fix let pattern error accumulation

When the checker was added prohibiting lexical binding called let,
certain error propagation was not implemented properly. This patch
fixes that issue, which fixes error checking for cases such as
  let [let]

BUG=v8:4403
R=adamk
LOG=N

Review URL: https://codereview.chromium.org/1409613003

Cr-Commit-Position: refs/heads/master@{#31289}
parent 37098401
...@@ -264,6 +264,8 @@ class ExpressionClassifier { ...@@ -264,6 +264,8 @@ class ExpressionClassifier {
if (errors & StrongModeFormalParametersProduction) if (errors & StrongModeFormalParametersProduction)
strong_mode_formal_parameter_error_ = strong_mode_formal_parameter_error_ =
inner.strong_mode_formal_parameter_error_; inner.strong_mode_formal_parameter_error_;
if (errors & LetPatternProduction)
let_pattern_error_ = inner.let_pattern_error_;
} }
// As an exception to the above, the result continues to be a valid arrow // As an exception to the above, the result continues to be a valid arrow
......
// Copyright 2015 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.
//
// Flags: --harmony-sloppy --harmony-sloppy-let --harmony-destructuring
let [let];
*%(basename)s:7: SyntaxError: let is disallowed as a lexically bound name
let [let];
^^^
SyntaxError: let is disallowed as a lexically bound name
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