Commit 536f62c4 authored by Toon Verwaest's avatar Toon Verwaest Committed by Commit Bot

[parser] Relax DCHECK in has_error() case

No-Tree-Checks: true
No-Try: true
Bug: chromium:908231
Change-Id: I1acf33400ad3546974a0ccb5955f8c6966b17dcf
Reviewed-on: https://chromium-review.googlesource.com/c/1350116
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57815}
parent 0453d418
......@@ -2497,7 +2497,7 @@ FunctionLiteral* Parser::ParseFunctionLiteral(
// immediately). bar can be parsed lazily, but we need to parse it in a mode
// that tracks unresolved variables.
DCHECK_IMPLIES(parse_lazily(), FLAG_lazy);
DCHECK_IMPLIES(parse_lazily(), allow_lazy_);
DCHECK_IMPLIES(parse_lazily(), has_error() || allow_lazy_);
DCHECK_IMPLIES(parse_lazily(), extension_ == nullptr);
const bool is_lazy =
......
// 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.
assertThrows(`
class C {
get [(function() { function lazy() { Syntax Error } })()]() {}
}`, 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