1efaf46058
Checking impl()->IsAsync(identifier) is insufficient since it could be parenthesized. By checking the token in addition to IsIdentifier guarantees that we've only seen the single token ASYNC. Bug: chromium:898812 Change-Id: Id94dd607381050b4bd8cd6d8672a5d11256db7da Reviewed-on: https://chromium-review.googlesource.com/c/1300134 Reviewed-by: Igor Sheludko <ishell@chromium.org> Commit-Queue: Toon Verwaest <verwaest@chromium.org> Cr-Commit-Position: refs/heads/master@{#57013}
6 lines
213 B
JavaScript
6 lines
213 B
JavaScript
// 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.
|
|
|
|
assertThrows("(async)(a)=>{}", SyntaxError);
|