diff options
Diffstat (limited to 'deps/v8/test/message/fail/destructuring-object-private-name.js')
-rw-r--r-- | deps/v8/test/message/fail/destructuring-object-private-name.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/deps/v8/test/message/fail/destructuring-object-private-name.js b/deps/v8/test/message/fail/destructuring-object-private-name.js new file mode 100644 index 0000000000..3e30bd2321 --- /dev/null +++ b/deps/v8/test/message/fail/destructuring-object-private-name.js @@ -0,0 +1,13 @@ +// 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; + } +} |