84a71a585a
await expressions are an invalid destructuring target, and should result in a SyntaxError when used in a position where a destructuring target is expected. BUG=v8:7173 R=marja@chromium.org, adamk@chromium.org Change-Id: I1bdb4bc13cb2e3e904fc4389a6e0abca1e0ed17f Reviewed-on: https://chromium-review.googlesource.com/811946 Reviewed-by: Sathya Gunasekaran (ooo until 12/12) <gsathya@chromium.org> Commit-Queue: Caitlin Potter <caitp@igalia.com> Cr-Commit-Position: refs/heads/master@{#49977}
10 lines
245 B
JavaScript
10 lines
245 B
JavaScript
// Copyright 2017 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.
|
|
|
|
async function f() {
|
|
let { [await "a"]: a } = { a: 1 };
|
|
return a;
|
|
}
|
|
f();
|