Commit 69f370b6 authored by Toon Verwaest's avatar Toon Verwaest Committed by Commit Bot

[parser] Only validate async params of valid arrow functions

Bug: chromium:898936
Change-Id: I2c8d8212fa97436e32628d4030d36ce457346c1f
Reviewed-on: https://chromium-review.googlesource.com/c/1300133Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57014}
parent 1efaf460
......@@ -946,9 +946,10 @@ class ParserBase {
}
} else if (!classifier()->is_valid_arrow_formal_parameters()) {
ReportClassifierError(classifier()->arrow_formal_parameters_error());
} else {
DCHECK_IMPLIES(is_async,
classifier()->is_valid_async_arrow_formal_parameters());
}
DCHECK_IMPLIES(is_async,
classifier()->is_valid_async_arrow_formal_parameters());
}
void ValidateLetPattern() {
......
// 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("async(...x=e)()=>");
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