blob: 8254217109b413b5eb5ca5f68d9fcc9a7a06da40 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
// |reftest| error:SyntaxError
// This file was procedurally generated from the following sources:
// - src/class-elements/grammar-private-field-on-object-destructuring.case
// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
/*---
description: Acessing private field from object destructuring pattern is not a valid syntax (class declaration)
esid: prod-ClassElement
features: [class-fields-private, destructuring-binding, class]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
Updated Productions
ObjectAssignmentPattern[Yield, Await]:
{}
{AssignmentRestProperty[?Yield, ?Await]}
{AssignmentPropertyList[?Yield, ?Await]}
{AssignmentPropertyList[?Yield, ?Await],AssignmentRestProperty[?Yield, ?Await]opt}
---*/
$DONOTEVALUATE();
class C {
#x = 1;
destructureX() {
const { #x: x } = this;
}
}
|