1483561328
Currently, PRIVATE_NAME / PrivateIdentifier is not valid in ObjectLiterals or other places expecting the PropertyName production. A SyntaxError here prevents an access violation later on when attempting to dereference a null property key BUG=v8:8808 R=gsathya@chromium.org, littledan@chromium.org Change-Id: Idde9c669cb48c1595b83115351a8fe0caed40eef Reviewed-on: https://chromium-review.googlesource.com/c/1461161 Reviewed-by: Georg Neis <neis@chromium.org> Commit-Queue: Caitlin Potter <caitp@igalia.com> Cr-Commit-Position: refs/heads/master@{#59515}
14 lines
291 B
JavaScript
14 lines
291 B
JavaScript
// 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.
|
|
|
|
// Flags: --harmony-class-fields
|
|
|
|
class Foo {
|
|
#x = 1;
|
|
destructureX() {
|
|
const { #x: x } = this;
|
|
return x;
|
|
}
|
|
}
|