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

[parser] Don't verify arrow declaration positions if we're going to fail

Bug: chromium:1018611
Change-Id: I2d48673aa5a05e67a6b253415e66af975b693af5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1936470
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65171}
parent d07e3a81
......@@ -766,8 +766,11 @@ class ArrowHeadParsingScope : public ExpressionParsingScope<Types> {
}
#ifdef DEBUG
for (auto declaration : *result->declarations()) {
DCHECK_NE(declaration->var()->initializer_position(), kNoSourcePosition);
if (!this->has_error()) {
for (auto declaration : *result->declarations()) {
DCHECK_NE(declaration->var()->initializer_position(),
kNoSourcePosition);
}
}
#endif // DEBUG
......
// Copyright 2019 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.
assertThrows("({a, b: ([c])}) => { }", SyntaxError);
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