Debian Codegraph @

js/src/tests/test262/language/expressions/class/elements/private-accessor-name/static-private-escape-sequence-u6F.js

raw
1 // This file was procedurally generated from the following sources:
2 // - src/accessor-names/private-escape-sequence-u6F.case
3 // - src/accessor-names/private/cls-private-expr-static.template
4 /*---
5 description: Private IdentifierName - u6F (o) (Class expression, static private method)
6 features: [class, class-static-methods-private]
7 flags: [generated]
8 info: |
9 ClassElement :
10 MethodDefinition
11 static MethodDefinition
12 FieldDefinition ;
13 ;
14
15 MethodDefinition :
16 get ClassElementName () { FunctionBody }
17 set ClassElementName ( PropertySetParameterList ){ FunctionBody }
18
19 ClassElementName :
20 PropertyName
21 PrivateName
22
23 PrivateName ::
24 # IdentifierName
25
26 Initializer :
27 = AssignmentExpression
28
29 IdentifierName ::
30 IdentifierStart
31 IdentifierName IdentifierPart
32
33 IdentifierStart ::
34 UnicodeIDStart
35 $
36 _
37 \ UnicodeEscapeSequence
38
39 IdentifierPart::
40 UnicodeIDContinue
41 $
42 \ UnicodeEscapeSequence
43 <ZWNJ> <ZWJ>
44
45 UnicodeIDStart::
46 any Unicode code point with the Unicode property "ID_Start"
47
48 UnicodeIDContinue::
49 any Unicode code point with the Unicode property "ID_Continue"
50
51
52 NOTE 3
53 The sets of code points with Unicode properties "ID_Start" and
54 "ID_Continue" include, respectively, the code points with Unicode
55 properties "Other_ID_Start" and "Other_ID_Continue".
56
57 ---*/
58
59 var stringSet;
60
61 var C = class {
62 static get #\u{6F}() { return 'get string'; }
63 static set #\u{6F}(param) { stringSet = param; }
64
65 static getPrivateReference() {
66 return this.#o;
67 }
68
69 static setPrivateReference(value) {
70 this.#o = value;
71 }
72 };
73
74
75 assert.sameValue(C.getPrivateReference(), 'get string');
76
77 C.setPrivateReference('set string');
78 assert.sameValue(stringSet, 'set string');
79
80 reportCompare(0, 0);