From 23be7aac3fa41e46dd83e0337f3ae4d46739e8ee Mon Sep 17 00:00:00 2001
From: Leo Balter <leonardo.balter@gmail.com>
Date: Mon, 5 Nov 2018 17:09:22 -0500
Subject: [PATCH] Refactor templates to assert valid private accessor method
 names

---
 .../default/cls-private-decl-inst.template    | 45 -----------
 .../default/cls-private-decl-static.template  | 44 -----------
 .../default/cls-private-expr-inst.template    | 45 -----------
 .../default/cls-private-expr-static.template  | 44 -----------
 .../private-escape-sequence-ZWJ.case          | 13 ++++
 .../private-escape-sequence-ZWNJ.case         | 13 ++++
 .../private-escape-sequence-u2118.case        | 13 ++++
 .../private-escape-sequence-u6F.case          | 13 ++++
 src/accessor-names/private-name-ZWJ.case      | 13 ++++
 src/accessor-names/private-name-ZWNJ.case     | 13 ++++
 src/accessor-names/private-name-common.case   | 13 ++++
 src/accessor-names/private-name-dollar.case   | 13 ++++
 src/accessor-names/private-name-u2118.case    | 13 ++++
 .../private-name-underscore.case              | 13 ++++
 .../private/cls-private-decl-inst.template    | 77 +++++++++++++++++++
 .../private/cls-private-decl-static.template  | 76 ++++++++++++++++++
 .../private/cls-private-expr-inst.template    | 77 +++++++++++++++++++
 .../private/cls-private-expr-static.template  | 77 +++++++++++++++++++
 18 files changed, 437 insertions(+), 178 deletions(-)
 delete mode 100644 src/accessor-names/default/cls-private-decl-inst.template
 delete mode 100644 src/accessor-names/default/cls-private-decl-static.template
 delete mode 100644 src/accessor-names/default/cls-private-expr-inst.template
 delete mode 100644 src/accessor-names/default/cls-private-expr-static.template
 create mode 100644 src/accessor-names/private-escape-sequence-ZWJ.case
 create mode 100644 src/accessor-names/private-escape-sequence-ZWNJ.case
 create mode 100644 src/accessor-names/private-escape-sequence-u2118.case
 create mode 100644 src/accessor-names/private-escape-sequence-u6F.case
 create mode 100644 src/accessor-names/private-name-ZWJ.case
 create mode 100644 src/accessor-names/private-name-ZWNJ.case
 create mode 100644 src/accessor-names/private-name-common.case
 create mode 100644 src/accessor-names/private-name-dollar.case
 create mode 100644 src/accessor-names/private-name-u2118.case
 create mode 100644 src/accessor-names/private-name-underscore.case
 create mode 100644 src/accessor-names/private/cls-private-decl-inst.template
 create mode 100644 src/accessor-names/private/cls-private-decl-static.template
 create mode 100644 src/accessor-names/private/cls-private-expr-inst.template
 create mode 100644 src/accessor-names/private/cls-private-expr-static.template

diff --git a/src/accessor-names/default/cls-private-decl-inst.template b/src/accessor-names/default/cls-private-decl-inst.template
deleted file mode 100644
index 26b3c5568c..0000000000
--- a/src/accessor-names/default/cls-private-decl-inst.template
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright (C) 2018 Katie Broida. All rights reserved.
-// This code is governed by the BSD license found in the LICENSE file.
-/*---
-path: language/statements/class/private-accessor-name-inst-
-name: Class declaration, private instance method
-esid: #prod-MethodDefinition
-info: |
-  [...]
-  MethodDefinition[Yield, Await]:
-      PropertyNameClassElementName [?Yield, ?Await](
-        UniqueFormalParameters [~Yield, ~Await] ) {
-        FunctionBody [~Yield, ~Await] }
-      AsyncMethod[?Yield, ?Await]
-        get PropertyName ClassElementName [?Yield, ?Await] (){
-          FunctionBody [~Yield, ~Await] }
-        set PropertyNameClassElementName [?Yield, ?Await] (
-          PropertySetParameterList ) { FunctionBody [~Yield, ~Await] }
-      AsyncMethod [Yield, Await]:
-        async [no LineTerminator here] PropertyName
-          ClassElementName[?Yield, ?Await](
-          UniqueFormalParameters[~Yield, +Await] ) { AsyncFunctionBody }
-
----*/
-
-var stringSet;
-
-class C {
-  get #/*{ declareWith }*/() { return 'get string'; }
-  set #/*{ declareWith }*/(param) { stringSet = param; }
-
-  getPrivateReference() {
-    return this[#/*{ referenceWith }*/];
-  }
-
-  setPrivateReference(value) {
-    this[#/*{ referenceWith }*/] = value;
-  }
-};
-
-var inst = new C();
-
-assert.sameValue(inst.getPrivateReference(), 'get string');
-
-inst.setPrivateReference('set string');
-assert.sameValue(stringSet, 'set string');
diff --git a/src/accessor-names/default/cls-private-decl-static.template b/src/accessor-names/default/cls-private-decl-static.template
deleted file mode 100644
index f51c9b5365..0000000000
--- a/src/accessor-names/default/cls-private-decl-static.template
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright (C) 2018 Katie Broida. All rights reserved.
-// This code is governed by the BSD license found in the LICENSE file.
-/*---
-path: language/statements/class/private-accessor-name-static-
-name: Class declaration, static method
-esid: #prod-MethodDefinition
-info: |
-  [...]
-  MethodDefinition[Yield, Await]:
-      PropertyNameClassElementName [?Yield, ?Await](
-        UniqueFormalParameters [~Yield, ~Await] ) {
-        FunctionBody [~Yield, ~Await] }
-      AsyncMethod[?Yield, ?Await]
-        get PropertyName ClassElementName [?Yield, ?Await] (){
-          FunctionBody [~Yield, ~Await] }
-        set PropertyNameClassElementName [?Yield, ?Await] (
-          PropertySetParameterList ) { FunctionBody [~Yield, ~Await] }
-      AsyncMethod [Yield, Await]:
-        async [no LineTerminator here] PropertyName
-          ClassElementName[?Yield, ?Await](
-          UniqueFormalParameters[~Yield, +Await] ) { AsyncFunctionBody }
-
----*/
-
-var stringSet;
-
-class C {
-  static get #/*{ declareWith }*/() { return 'get string'; }
-  static set #/*{ declareWith }*/(param) { stringSet = param; }
-
-  static getPrivateReference() {
-    return this[#/*{ referenceWith }*/];
-  }
-
-  static setPrivateReference(value) {
-    this[#/*{ referenceWith }*/] = value;
-  }
-}
-
-assert.sameValue(C.getPrivateReference(), 'get string');
-
-C.setPrivateReference('set string');
-assert.sameValue(stringSet, 'set string');
-
diff --git a/src/accessor-names/default/cls-private-expr-inst.template b/src/accessor-names/default/cls-private-expr-inst.template
deleted file mode 100644
index 41f98b91b5..0000000000
--- a/src/accessor-names/default/cls-private-expr-inst.template
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright (C) 2018 Katie Broida. All rights reserved.
-// This code is governed by the BSD license found in the LICENSE file.
-/*---
-path: language/expressions/class/private-accessor-name-inst-
-name: Class expression, instance private method
-esid: #prod-MethodDefinition
-info: |
-  [...]
-    MethodDefinition[Yield, Await]:
-      PropertyNameClassElementName [?Yield, ?Await](
-        UniqueFormalParameters [~Yield, ~Await] ) {
-        FunctionBody [~Yield, ~Await] }
-      AsyncMethod[?Yield, ?Await]
-        get PropertyName ClassElementName [?Yield, ?Await] (){
-          FunctionBody [~Yield, ~Await] }
-        set PropertyNameClassElementName [?Yield, ?Await] (
-          PropertySetParameterList ) { FunctionBody [~Yield, ~Await] }
-      AsyncMethod [Yield, Await]:
-        async [no LineTerminator here] PropertyName
-          ClassElementName[?Yield, ?Await](
-          UniqueFormalParameters[~Yield, +Await] ) { AsyncFunctionBody }
-
----*/
-
-var stringSet;
-
-var C = class {
-  get #/*{ declareWith }*/() { return 'get string'; }
-  set #/*{ declareWith }*/(param) { stringSet = param; }
-
-  getPrivateReference() {
-    return this[#/*{ referenceWith }*/];
-  }
-
-  setPrivateReference(value) {
-    this[#/*{ referenceWith }*/] = value;
-  }
-};
-
-var inst = new C();
-
-assert.sameValue(inst.getPrivateReference(), 'get string');
-
-inst.setPrivateReference('set string');
-assert.sameValue(stringSet, 'set string');
diff --git a/src/accessor-names/default/cls-private-expr-static.template b/src/accessor-names/default/cls-private-expr-static.template
deleted file mode 100644
index 5233cf13e8..0000000000
--- a/src/accessor-names/default/cls-private-expr-static.template
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright (C) 2018 Katie Broida. All rights reserved.
-// This code is governed by the BSD license found in the LICENSE file.
-/*---
-path: language/expressions/class/private-accessor-name-static-
-name: Class expression, static private method
-esid: #prod-MethodDefinition
-info: |
-  [...]
-  MethodDefinition[Yield, Await]:
-      PropertyNameClassElementName [?Yield, ?Await](
-        UniqueFormalParameters [~Yield, ~Await] ) {
-        FunctionBody [~Yield, ~Await] }
-      AsyncMethod[?Yield, ?Await]
-        get PropertyName ClassElementName [?Yield, ?Await] (){
-          FunctionBody [~Yield, ~Await] }
-        set PropertyNameClassElementName [?Yield, ?Await] ( 
-          PropertySetParameterList ) { FunctionBody [~Yield, ~Await] }
-      AsyncMethod [Yield, Await]:
-        async [no LineTerminator here] PropertyName
-          ClassElementName[?Yield, ?Await](
-          UniqueFormalParameters[~Yield, +Await] ) { AsyncFunctionBody }
-
----*/
-
-var stringSet;
-
-var C = class {
-  static get #/*{ declareWith }*/() { return 'get string'; }
-  static set #/*{ declareWith }*/(param) { stringSet = param; }
-
-  static getPrivateReference() {
-    return this.#/*{ referenceWith }*/;
-  }
-
-  static setPrivateReference(value) {
-    this.#/*{ referenceWith }*/ = value;
-  }
-};
-
-
-assert.sameValue(C.getPrivateReference(), 'get string');
-
-C.setPrivateReference('set string');
-assert.sameValue(stringSet, 'set string');
diff --git a/src/accessor-names/private-escape-sequence-ZWJ.case b/src/accessor-names/private-escape-sequence-ZWJ.case
new file mode 100644
index 0000000000..76627929d5
--- /dev/null
+++ b/src/accessor-names/private-escape-sequence-ZWJ.case
@@ -0,0 +1,13 @@
+// Copyright (C) 2018 Leo Balter. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+desc: Private IdentifierName - ZWJ
+esid: sec-private-names-static-semantics-stringvalue
+template: private
+---*/
+
+//- declareWith
+ZW_\u200D_J
+//- referenceWith
+ZW_‍_J
diff --git a/src/accessor-names/private-escape-sequence-ZWNJ.case b/src/accessor-names/private-escape-sequence-ZWNJ.case
new file mode 100644
index 0000000000..eaca213f5e
--- /dev/null
+++ b/src/accessor-names/private-escape-sequence-ZWNJ.case
@@ -0,0 +1,13 @@
+// Copyright (C) 2018 Leo Balter. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+desc: Private IdentifierName - ZWNJ
+esid: sec-private-names-static-semantics-stringvalue
+template: private
+---*/
+
+//- declareWith
+ZW_\u200C_NJ
+//- referenceWith
+ZW_‌_NJ
diff --git a/src/accessor-names/private-escape-sequence-u2118.case b/src/accessor-names/private-escape-sequence-u2118.case
new file mode 100644
index 0000000000..0262fd47fc
--- /dev/null
+++ b/src/accessor-names/private-escape-sequence-u2118.case
@@ -0,0 +1,13 @@
+// Copyright (C) 2018 Leo Balter. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+desc: Private IdentifierName - u2118 (℘)
+esid: sec-private-names-static-semantics-stringvalue
+template: private
+---*/
+
+//- declareWith
+\u2118
+//- referenceWith
+℘
diff --git a/src/accessor-names/private-escape-sequence-u6F.case b/src/accessor-names/private-escape-sequence-u6F.case
new file mode 100644
index 0000000000..bab28e3c61
--- /dev/null
+++ b/src/accessor-names/private-escape-sequence-u6F.case
@@ -0,0 +1,13 @@
+// Copyright (C) 2018 Leo Balter. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+desc: Private IdentifierName - u6F (o)
+esid: sec-private-names-static-semantics-stringvalue
+template: private
+---*/
+
+//- declareWith
+\u{6F}
+//- referenceWith
+o
diff --git a/src/accessor-names/private-name-ZWJ.case b/src/accessor-names/private-name-ZWJ.case
new file mode 100644
index 0000000000..9b465b39ee
--- /dev/null
+++ b/src/accessor-names/private-name-ZWJ.case
@@ -0,0 +1,13 @@
+// Copyright (C) 2018 Leo Balter. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+desc: Private IdentifierName - ZWJ
+esid: sec-private-names-static-semantics-stringvalue
+template: private
+---*/
+
+//- declareWith
+ZW_‍_J
+//- referenceWith
+ZW_‍_J
diff --git a/src/accessor-names/private-name-ZWNJ.case b/src/accessor-names/private-name-ZWNJ.case
new file mode 100644
index 0000000000..a9ba2aed04
--- /dev/null
+++ b/src/accessor-names/private-name-ZWNJ.case
@@ -0,0 +1,13 @@
+// Copyright (C) 2018 Leo Balter. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+desc: Private IdentifierName - ZWNJ
+esid: sec-private-names-static-semantics-stringvalue
+template: private
+---*/
+
+//- declareWith
+ZW_‌_NJ
+//- referenceWith
+ZW_‌_NJ
diff --git a/src/accessor-names/private-name-common.case b/src/accessor-names/private-name-common.case
new file mode 100644
index 0000000000..4ff2e577f2
--- /dev/null
+++ b/src/accessor-names/private-name-common.case
@@ -0,0 +1,13 @@
+// Copyright (C) 2018 Leo Balter. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+desc: Private IdentifierName - common
+esid: sec-private-names-static-semantics-stringvalue
+template: private
+---*/
+
+//- declareWith
+test262
+//- referenceWith
+test262
diff --git a/src/accessor-names/private-name-dollar.case b/src/accessor-names/private-name-dollar.case
new file mode 100644
index 0000000000..016306d2fd
--- /dev/null
+++ b/src/accessor-names/private-name-dollar.case
@@ -0,0 +1,13 @@
+// Copyright (C) 2018 Leo Balter. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+desc: Private IdentifierName - $
+esid: sec-private-names-static-semantics-stringvalue
+template: private
+---*/
+
+//- declareWith
+$
+//- referenceWith
+$
diff --git a/src/accessor-names/private-name-u2118.case b/src/accessor-names/private-name-u2118.case
new file mode 100644
index 0000000000..2ac959453f
--- /dev/null
+++ b/src/accessor-names/private-name-u2118.case
@@ -0,0 +1,13 @@
+// Copyright (C) 2018 Leo Balter. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+desc: Private IdentifierName - ℘
+esid: sec-private-names-static-semantics-stringvalue
+template: private
+---*/
+
+//- declareWith
+℘
+//- referenceWith
+℘
diff --git a/src/accessor-names/private-name-underscore.case b/src/accessor-names/private-name-underscore.case
new file mode 100644
index 0000000000..a25784c7ca
--- /dev/null
+++ b/src/accessor-names/private-name-underscore.case
@@ -0,0 +1,13 @@
+// Copyright (C) 2018 Leo Balter. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+desc: Private IdentifierName - _
+esid: sec-private-names-static-semantics-stringvalue
+template: private
+---*/
+
+//- declareWith
+_
+//- referenceWith
+_
diff --git a/src/accessor-names/private/cls-private-decl-inst.template b/src/accessor-names/private/cls-private-decl-inst.template
new file mode 100644
index 0000000000..25040ddd11
--- /dev/null
+++ b/src/accessor-names/private/cls-private-decl-inst.template
@@ -0,0 +1,77 @@
+// Copyright (C) 2018 Katie Broida. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+path: language/statements/class/private-accessor-name/inst-
+name: Class declaration, private instance method
+esid: #prod-MethodDefinition
+info: |
+  ClassElement :
+    MethodDefinition
+    static MethodDefinition
+    FieldDefinition ;
+    ;
+
+  FieldDefinition :
+    ClassElementName Initializer _opt
+
+  ClassElementName :
+    PropertyName
+    PrivateName
+
+  PrivateName ::
+    # IdentifierName
+
+  Initializer :
+    = AssignmentExpression
+
+  IdentifierName ::
+    IdentifierStart
+    IdentifierName IdentifierPart
+
+  IdentifierStart ::
+    UnicodeIDStart
+    $
+    _
+    \ UnicodeEscapeSequence
+
+  IdentifierPart::
+    UnicodeIDContinue
+    $
+    \ UnicodeEscapeSequence
+    <ZWNJ> <ZWJ>
+
+  UnicodeIDStart::
+    any Unicode code point with the Unicode property "ID_Start"
+
+  UnicodeIDContinue::
+    any Unicode code point with the Unicode property "ID_Continue"
+
+
+  NOTE 3
+  The sets of code points with Unicode properties "ID_Start" and
+  "ID_Continue" include, respectively, the code points with Unicode
+  properties "Other_ID_Start" and "Other_ID_Continue".
+features: [class-methods-private]
+---*/
+
+var stringSet;
+
+class C {
+  get #/*{ declareWith }*/() { return 'get string'; }
+  set #/*{ declareWith }*/(param) { stringSet = param; }
+
+  getPrivateReference() {
+    return this.#/*{ referenceWith }*/;
+  }
+
+  setPrivateReference(value) {
+    this.#/*{ referenceWith }*/ = value;
+  }
+};
+
+var inst = new C();
+
+assert.sameValue(inst.getPrivateReference(), 'get string');
+
+inst.setPrivateReference('set string');
+assert.sameValue(stringSet, 'set string');
diff --git a/src/accessor-names/private/cls-private-decl-static.template b/src/accessor-names/private/cls-private-decl-static.template
new file mode 100644
index 0000000000..a1d0a38129
--- /dev/null
+++ b/src/accessor-names/private/cls-private-decl-static.template
@@ -0,0 +1,76 @@
+// Copyright (C) 2018 Katie Broida. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+path: language/statements/class/private-accessor-name/static-
+name: Class declaration, static method
+esid: #prod-MethodDefinition
+info: |
+  ClassElement :
+    MethodDefinition
+    static MethodDefinition
+    FieldDefinition ;
+    ;
+
+  FieldDefinition :
+    ClassElementName Initializer _opt
+
+  ClassElementName :
+    PropertyName
+    PrivateName
+
+  PrivateName ::
+    # IdentifierName
+
+  Initializer :
+    = AssignmentExpression
+
+  IdentifierName ::
+    IdentifierStart
+    IdentifierName IdentifierPart
+
+  IdentifierStart ::
+    UnicodeIDStart
+    $
+    _
+    \ UnicodeEscapeSequence
+
+  IdentifierPart::
+    UnicodeIDContinue
+    $
+    \ UnicodeEscapeSequence
+    <ZWNJ> <ZWJ>
+
+  UnicodeIDStart::
+    any Unicode code point with the Unicode property "ID_Start"
+
+  UnicodeIDContinue::
+    any Unicode code point with the Unicode property "ID_Continue"
+
+
+  NOTE 3
+  The sets of code points with Unicode properties "ID_Start" and
+  "ID_Continue" include, respectively, the code points with Unicode
+  properties "Other_ID_Start" and "Other_ID_Continue".
+features: [class-methods-private]
+---*/
+
+var stringSet;
+
+class C {
+  static get #/*{ declareWith }*/() { return 'get string'; }
+  static set #/*{ declareWith }*/(param) { stringSet = param; }
+
+  static getPrivateReference() {
+    return this.#/*{ referenceWith }*/;
+  }
+
+  static setPrivateReference(value) {
+    this.#/*{ referenceWith }*/ = value;
+  }
+}
+
+assert.sameValue(C.getPrivateReference(), 'get string');
+
+C.setPrivateReference('set string');
+assert.sameValue(stringSet, 'set string');
+
diff --git a/src/accessor-names/private/cls-private-expr-inst.template b/src/accessor-names/private/cls-private-expr-inst.template
new file mode 100644
index 0000000000..718ae187c7
--- /dev/null
+++ b/src/accessor-names/private/cls-private-expr-inst.template
@@ -0,0 +1,77 @@
+// Copyright (C) 2018 Katie Broida. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+path: language/expressions/class/private-accessor-name/inst-
+name: Class expression, instance private method
+esid: #prod-MethodDefinition
+info: |
+  ClassElement :
+    MethodDefinition
+    static MethodDefinition
+    FieldDefinition ;
+    ;
+
+  FieldDefinition :
+    ClassElementName Initializer _opt
+
+  ClassElementName :
+    PropertyName
+    PrivateName
+
+  PrivateName ::
+    # IdentifierName
+
+  Initializer :
+    = AssignmentExpression
+
+  IdentifierName ::
+    IdentifierStart
+    IdentifierName IdentifierPart
+
+  IdentifierStart ::
+    UnicodeIDStart
+    $
+    _
+    \ UnicodeEscapeSequence
+
+  IdentifierPart::
+    UnicodeIDContinue
+    $
+    \ UnicodeEscapeSequence
+    <ZWNJ> <ZWJ>
+
+  UnicodeIDStart::
+    any Unicode code point with the Unicode property "ID_Start"
+
+  UnicodeIDContinue::
+    any Unicode code point with the Unicode property "ID_Continue"
+
+
+  NOTE 3
+  The sets of code points with Unicode properties "ID_Start" and
+  "ID_Continue" include, respectively, the code points with Unicode
+  properties "Other_ID_Start" and "Other_ID_Continue".
+features: [class-methods-private]
+---*/
+
+var stringSet;
+
+var C = class {
+  get #/*{ declareWith }*/() { return 'get string'; }
+  set #/*{ declareWith }*/(param) { stringSet = param; }
+
+  getPrivateReference() {
+    return this.#/*{ referenceWith }*/;
+  }
+
+  setPrivateReference(value) {
+    this.#/*{ referenceWith }*/ = value;
+  }
+};
+
+var inst = new C();
+
+assert.sameValue(inst.getPrivateReference(), 'get string');
+
+inst.setPrivateReference('set string');
+assert.sameValue(stringSet, 'set string');
diff --git a/src/accessor-names/private/cls-private-expr-static.template b/src/accessor-names/private/cls-private-expr-static.template
new file mode 100644
index 0000000000..2a86f3b184
--- /dev/null
+++ b/src/accessor-names/private/cls-private-expr-static.template
@@ -0,0 +1,77 @@
+// Copyright (C) 2018 Katie Broida. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+path: language/expressions/class/private-accessor-name/static-
+name: Class expression, static private method
+esid: #prod-MethodDefinition
+info: |
+  ClassElement :
+    MethodDefinition
+    static MethodDefinition
+    FieldDefinition ;
+    ;
+
+  MethodDefinition :
+    get ClassElementName () { FunctionBody }
+    set ClassElementName ( PropertySetParameterList ){ FunctionBody }
+
+  ClassElementName :
+    PropertyName
+    PrivateName
+
+  PrivateName ::
+    # IdentifierName
+
+  Initializer :
+    = AssignmentExpression
+
+  IdentifierName ::
+    IdentifierStart
+    IdentifierName IdentifierPart
+
+  IdentifierStart ::
+    UnicodeIDStart
+    $
+    _
+    \ UnicodeEscapeSequence
+
+  IdentifierPart::
+    UnicodeIDContinue
+    $
+    \ UnicodeEscapeSequence
+    <ZWNJ> <ZWJ>
+
+  UnicodeIDStart::
+    any Unicode code point with the Unicode property "ID_Start"
+
+  UnicodeIDContinue::
+    any Unicode code point with the Unicode property "ID_Continue"
+
+
+  NOTE 3
+  The sets of code points with Unicode properties "ID_Start" and
+  "ID_Continue" include, respectively, the code points with Unicode
+  properties "Other_ID_Start" and "Other_ID_Continue".
+features: [class-methods-private]
+---*/
+
+var stringSet;
+
+var C = class {
+  static get #/*{ declareWith }*/() { return 'get string'; }
+  static set #/*{ declareWith }*/(param) { stringSet = param; }
+
+  static getPrivateReference() {
+    return this.#/*{ referenceWith }*/;
+  }
+
+  static setPrivateReference(value) {
+    this.#/*{ referenceWith }*/ = value;
+  }
+};
+
+
+assert.sameValue(C.getPrivateReference(), 'get string');
+
+C.setPrivateReference('set string');
+assert.sameValue(stringSet, 'set string');
-- 
GitLab