summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/language/statements/class/elements
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/tests/test262/language/statements/class/elements')
-rw-r--r--js/src/tests/test262/language/statements/class/elements/abrupt-completition-on-field-initializer.js55
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-gen-computed-names.js107
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-gen-computed-symbol-names.js105
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-gen-grammar-privatename-identifier-semantics-stringvalue.js109
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-gen-literal-names-asi.js77
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-gen-literal-names.js96
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-gen-private-field-usage.js49
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-gen-private-method-getter-usage.js49
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-gen-private-method-usage.js49
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-gen-private-names.js71
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-field-identifier-initializer.js87
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-field-identifier.js94
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-private-getter-alt.js128
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-private-getter.js128
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-private-method-alt.js127
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-private-method.js127
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-private-setter-alt.js127
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-private-setter.js127
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-privatename-identifier-alt.js109
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-privatename-identifier-initializer-alt.js103
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-privatename-identifier-initializer.js103
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-privatename-identifier.js109
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js134
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-static-async-generator-method-privatename-identifier.js135
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-static-async-method-privatename-identifier-alt.js134
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-static-async-method-privatename-identifier.js135
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-static-generator-method-privatename-identifier-alt.js124
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-static-generator-method-privatename-identifier.js125
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-static-method-privatename-identifier-alt.js122
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-static-method-privatename-identifier.js122
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-static-privatename-identifier-alt-by-classname.js110
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-static-privatename-identifier-alt.js110
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-static-privatename-identifier-by-classname.js110
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js104
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-static-privatename-identifier-initializer-alt.js104
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-static-privatename-identifier-initializer.js104
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-static-privatename-identifier.js110
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-gen-static-private-fields.js71
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-gen-static-private-methods-with-fields.js88
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-gen-static-private-methods.js75
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-gen-string-literal-names.js109
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-method-computed-names.js107
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-method-computed-symbol-names.js105
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-method-grammar-privatename-identifier-semantics-stringvalue.js109
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-method-literal-names-asi.js77
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-method-literal-names.js96
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-method-private-field-usage.js49
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-method-private-method-getter-usage.js49
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-method-private-method-usage.js49
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-method-private-names.js71
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-field-identifier-initializer.js87
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-field-identifier.js94
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-private-getter-alt.js128
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-private-getter.js128
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-private-method-alt.js127
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-private-method.js127
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-private-setter-alt.js127
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-private-setter.js127
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-privatename-identifier-alt.js109
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-privatename-identifier-initializer-alt.js103
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-privatename-identifier-initializer.js103
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-privatename-identifier.js109
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-static-async-generator-method-privatename-identifier-alt.js134
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-static-async-generator-method-privatename-identifier.js135
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-static-async-method-privatename-identifier-alt.js134
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-static-async-method-privatename-identifier.js135
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-static-generator-method-privatename-identifier-alt.js124
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-static-generator-method-privatename-identifier.js125
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-static-method-privatename-identifier-alt.js122
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-static-method-privatename-identifier.js122
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-static-privatename-identifier-alt-by-classname.js110
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-static-privatename-identifier-alt.js110
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-static-privatename-identifier-by-classname.js110
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-static-privatename-identifier-initializer-alt-by-classname.js104
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-static-privatename-identifier-initializer-alt.js104
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-static-privatename-identifier-initializer.js104
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-static-privatename-identifier.js110
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-method-static-private-fields.js71
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-method-static-private-methods-with-fields.js88
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-method-static-private-methods.js75
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-method-string-literal-names.js109
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-computed-names.js123
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-computed-symbol-names.js121
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-grammar-privatename-identifier-semantics-stringvalue.js125
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-literal-names-asi.js93
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-literal-names.js112
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-private-field-usage.js65
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-private-method-getter-usage.js65
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-private-method-usage.js65
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-private-names.js87
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-field-identifier-initializer.js103
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-field-identifier.js110
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-private-getter-alt.js144
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-private-getter.js144
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-private-method-alt.js143
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-private-method.js143
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-private-setter-alt.js143
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-private-setter.js143
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-privatename-identifier-alt.js125
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-privatename-identifier-initializer-alt.js119
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-privatename-identifier-initializer.js119
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-privatename-identifier.js125
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-static-async-generator-method-privatename-identifier-alt.js151
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-static-async-generator-method-privatename-identifier.js152
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-static-async-method-privatename-identifier-alt.js151
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-static-async-method-privatename-identifier.js152
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-static-generator-method-privatename-identifier-alt.js140
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-static-generator-method-privatename-identifier.js141
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-static-method-privatename-identifier-alt.js138
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-static-method-privatename-identifier.js138
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-static-privatename-identifier-alt-by-classname.js126
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-static-privatename-identifier-alt.js126
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-static-privatename-identifier-by-classname.js126
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js120
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-static-privatename-identifier-initializer-alt.js120
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-static-privatename-identifier-initializer.js120
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-static-privatename-identifier.js126
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-static-private-fields.js87
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-static-private-methods-with-fields.js104
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-static-private-methods.js91
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-string-literal-names.js125
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-computed-names.js122
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-computed-symbol-names.js120
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-grammar-privatename-identifier-semantics-stringvalue.js124
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-literal-names-asi.js92
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-literal-names.js111
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-private-field-usage.js64
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-private-method-getter-usage.js64
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-private-method-usage.js64
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-private-names.js86
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-field-identifier-initializer.js102
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-field-identifier.js109
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-private-getter-alt.js143
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-private-getter.js143
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-private-method-alt.js142
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-private-method.js142
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-private-setter-alt.js142
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-private-setter.js142
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-privatename-identifier-alt.js124
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-privatename-identifier-initializer-alt.js118
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-privatename-identifier-initializer.js118
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-privatename-identifier.js124
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-static-async-generator-method-privatename-identifier-alt.js150
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-static-async-generator-method-privatename-identifier.js151
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-static-async-method-privatename-identifier-alt.js150
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-static-async-method-privatename-identifier.js151
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-static-generator-method-privatename-identifier-alt.js139
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-static-generator-method-privatename-identifier.js140
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-static-method-privatename-identifier-alt.js137
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-static-method-privatename-identifier.js137
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-static-privatename-identifier-alt-by-classname.js125
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-static-privatename-identifier-alt.js125
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-static-privatename-identifier-by-classname.js125
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-static-privatename-identifier-initializer-alt-by-classname.js119
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-static-privatename-identifier-initializer-alt.js119
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-static-privatename-identifier-initializer.js119
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-static-privatename-identifier.js125
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-static-private-fields.js86
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-static-private-methods-with-fields.js103
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-static-private-methods.js90
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-string-literal-names.js124
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-computed-names.js110
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-computed-symbol-names.js108
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-grammar-privatename-identifier-semantics-stringvalue.js112
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-literal-names-asi.js80
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-literal-names.js99
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-private-field-usage.js52
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-private-method-getter-usage.js52
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-private-method-usage.js52
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-private-names.js74
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-field-identifier-initializer.js90
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-field-identifier.js97
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-private-getter-alt.js131
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-private-getter.js131
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-private-method-alt.js130
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-private-method.js130
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-private-setter-alt.js130
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-private-setter.js130
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-privatename-identifier-alt.js112
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-privatename-identifier-initializer-alt.js106
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-privatename-identifier-initializer.js106
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-privatename-identifier.js112
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-static-async-generator-method-privatename-identifier-alt.js137
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-static-async-generator-method-privatename-identifier.js138
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-static-async-method-privatename-identifier-alt.js137
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-static-async-method-privatename-identifier.js138
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-static-generator-method-privatename-identifier-alt.js127
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-static-generator-method-privatename-identifier.js128
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-static-method-privatename-identifier-alt.js125
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-static-method-privatename-identifier.js125
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-static-privatename-identifier-alt-by-classname.js113
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-static-privatename-identifier-alt.js113
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-static-privatename-identifier-by-classname.js113
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js107
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-static-privatename-identifier-initializer-alt.js107
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-static-privatename-identifier-initializer.js107
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-static-privatename-identifier.js113
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-static-private-fields.js74
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-static-private-methods-with-fields.js91
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-static-private-methods.js78
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-string-literal-names.js112
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-computed-names.js110
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-computed-symbol-names.js108
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-grammar-privatename-identifier-semantics-stringvalue.js112
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-literal-names-asi.js80
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-literal-names.js99
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-private-field-usage.js52
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-private-method-getter-usage.js52
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-private-method-usage.js52
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-private-names.js74
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-field-identifier-initializer.js90
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-field-identifier.js97
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-private-getter-alt.js131
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-private-getter.js131
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-private-method-alt.js130
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-private-method.js130
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-private-setter-alt.js130
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-private-setter.js130
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-privatename-identifier-alt.js112
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-privatename-identifier-initializer-alt.js106
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-privatename-identifier-initializer.js106
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-privatename-identifier.js112
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-static-async-generator-method-privatename-identifier-alt.js137
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-static-async-generator-method-privatename-identifier.js138
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-static-async-method-privatename-identifier-alt.js137
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-static-async-method-privatename-identifier.js138
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-static-generator-method-privatename-identifier-alt.js127
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-static-generator-method-privatename-identifier.js128
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-static-method-privatename-identifier-alt.js125
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-static-method-privatename-identifier.js125
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-static-privatename-identifier-alt-by-classname.js113
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-static-privatename-identifier-alt.js113
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-static-privatename-identifier-by-classname.js113
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-static-privatename-identifier-initializer-alt-by-classname.js107
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-static-privatename-identifier-initializer-alt.js107
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-static-privatename-identifier-initializer.js107
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-static-privatename-identifier.js113
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-static-private-fields.js74
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-static-private-methods-with-fields.js91
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-static-private-methods.js78
-rw-r--r--js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-string-literal-names.js112
-rw-r--r--js/src/tests/test262/language/statements/class/elements/arrow-body-derived-cls-direct-eval-contains-superproperty-1.js36
-rw-r--r--js/src/tests/test262/language/statements/class/elements/arrow-body-derived-cls-direct-eval-contains-superproperty-2.js33
-rw-r--r--js/src/tests/test262/language/statements/class/elements/arrow-body-derived-cls-direct-eval-err-contains-supercall-1.js38
-rw-r--r--js/src/tests/test262/language/statements/class/elements/arrow-body-derived-cls-direct-eval-err-contains-supercall-2.js31
-rw-r--r--js/src/tests/test262/language/statements/class/elements/arrow-body-derived-cls-direct-eval-err-contains-supercall.js38
-rw-r--r--js/src/tests/test262/language/statements/class/elements/arrow-body-derived-cls-indirect-eval-contains-superproperty-1.js36
-rw-r--r--js/src/tests/test262/language/statements/class/elements/arrow-body-derived-cls-indirect-eval-contains-superproperty-2.js33
-rw-r--r--js/src/tests/test262/language/statements/class/elements/arrow-body-derived-cls-indirect-eval-err-contains-supercall-1.js36
-rw-r--r--js/src/tests/test262/language/statements/class/elements/arrow-body-derived-cls-indirect-eval-err-contains-supercall-2.js29
-rw-r--r--js/src/tests/test262/language/statements/class/elements/arrow-body-derived-cls-indirect-eval-err-contains-supercall.js36
-rw-r--r--js/src/tests/test262/language/statements/class/elements/arrow-body-direct-eval-err-contains-arguments.js38
-rw-r--r--js/src/tests/test262/language/statements/class/elements/arrow-body-direct-eval-err-contains-newtarget.js36
-rw-r--r--js/src/tests/test262/language/statements/class/elements/arrow-body-indirect-eval-err-contains-newtarget.js35
-rw-r--r--js/src/tests/test262/language/statements/class/elements/arrow-body-private-derived-cls-direct-eval-contains-superproperty-1.js39
-rw-r--r--js/src/tests/test262/language/statements/class/elements/arrow-body-private-derived-cls-direct-eval-contains-superproperty-2.js36
-rw-r--r--js/src/tests/test262/language/statements/class/elements/arrow-body-private-derived-cls-direct-eval-err-contains-supercall-1.js38
-rw-r--r--js/src/tests/test262/language/statements/class/elements/arrow-body-private-derived-cls-direct-eval-err-contains-supercall-2.js31
-rw-r--r--js/src/tests/test262/language/statements/class/elements/arrow-body-private-derived-cls-direct-eval-err-contains-supercall.js38
-rw-r--r--js/src/tests/test262/language/statements/class/elements/arrow-body-private-derived-cls-indirect-eval-contains-superproperty-1.js36
-rw-r--r--js/src/tests/test262/language/statements/class/elements/arrow-body-private-derived-cls-indirect-eval-contains-superproperty-2.js33
-rw-r--r--js/src/tests/test262/language/statements/class/elements/arrow-body-private-derived-cls-indirect-eval-err-contains-supercall-1.js36
-rw-r--r--js/src/tests/test262/language/statements/class/elements/arrow-body-private-derived-cls-indirect-eval-err-contains-supercall-2.js29
-rw-r--r--js/src/tests/test262/language/statements/class/elements/arrow-body-private-derived-cls-indirect-eval-err-contains-supercall.js36
-rw-r--r--js/src/tests/test262/language/statements/class/elements/arrow-body-private-direct-eval-err-contains-arguments.js41
-rw-r--r--js/src/tests/test262/language/statements/class/elements/arrow-body-private-direct-eval-err-contains-newtarget.js39
-rw-r--r--js/src/tests/test262/language/statements/class/elements/arrow-body-private-indirect-eval-err-contains-newtarget.js35
-rw-r--r--js/src/tests/test262/language/statements/class/elements/arrow-fnc-init-err-contains-arguments.js35
-rw-r--r--js/src/tests/test262/language/statements/class/elements/arrow-fnc-init-err-contains-super.js28
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/await-as-binding-identifier-escaped.js37
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/await-as-binding-identifier.js37
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/await-as-identifier-reference-escaped.js37
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/await-as-identifier-reference.js37
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/await-as-label-identifier-escaped.js37
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/await-as-label-identifier.js37
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/browser.js0
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/shell.js0
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-as-binding-identifier-escaped.js37
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-as-binding-identifier.js37
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-as-identifier-reference-escaped.js37
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-as-identifier-reference.js37
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-as-label-identifier-escaped.js37
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-as-label-identifier.js37
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-identifier-spread-strict-strict.js76
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-identifier-strict-strict.js67
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-promise-reject-next-catch.js72
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-promise-reject-next-for-await-of-async-iterator.js78
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-promise-reject-next-for-await-of-sync-iterator.js77
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-promise-reject-next-yield-star-async-iterator.js76
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-promise-reject-next-yield-star-sync-iterator.js75
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-promise-reject-next.js72
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-spread-arr-multiple.js78
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-spread-arr-single.js77
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-spread-obj.js80
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-async-next.js247
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-async-return.js263
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-async-throw.js271
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-expr-abrupt.js82
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-get-abrupt.js102
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-not-callable-boolean-throw.js101
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-not-callable-number-throw.js101
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-not-callable-object-throw.js101
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-not-callable-string-throw.js101
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-not-callable-symbol-throw.js101
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-null-sync-get-abrupt.js107
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-returns-abrupt.js98
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-returns-boolean-throw.js98
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-returns-null-throw.js98
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-returns-number-throw.js98
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-returns-string-throw.js98
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-returns-symbol-throw.js98
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-returns-undefined-throw.js98
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-undefined-sync-get-abrupt.js107
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-sync-get-abrupt.js101
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-sync-not-callable-boolean-throw.js100
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-sync-not-callable-number-throw.js100
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-sync-not-callable-object-throw.js100
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-sync-not-callable-string-throw.js100
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-sync-not-callable-symbol-throw.js100
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-sync-returns-abrupt.js95
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-sync-returns-boolean-throw.js100
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-sync-returns-null-throw.js100
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-sync-returns-number-throw.js100
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-sync-returns-string-throw.js100
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-sync-returns-symbol-throw.js100
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-sync-returns-undefined-throw.js100
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-next-call-done-get-abrupt.js101
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-next-call-returns-abrupt.js93
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-next-call-value-get-abrupt.js103
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-next-get-abrupt.js93
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-next-non-object-ignores-then.js113
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-next-not-callable-boolean-throw.js90
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-next-not-callable-null-throw.js90
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-next-not-callable-number-throw.js90
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-next-not-callable-object-throw.js90
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-next-not-callable-string-throw.js90
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-next-not-callable-symbol-throw.js90
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-next-not-callable-undefined-throw.js90
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-next-then-get-abrupt.js117
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-next-then-non-callable-boolean-fulfillpromise.js111
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-next-then-non-callable-null-fulfillpromise.js111
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-next-then-non-callable-number-fulfillpromise.js111
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-next-then-non-callable-object-fulfillpromise.js111
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-next-then-non-callable-string-fulfillpromise.js111
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-next-then-non-callable-symbol-fulfillpromise.js111
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-next-then-non-callable-undefined-fulfillpromise.js111
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-next-then-returns-abrupt.js117
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-sync-next.js250
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-sync-return.js225
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-sync-throw.js231
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method/await-as-binding-identifier-escaped.js37
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method/await-as-binding-identifier.js37
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method/await-as-identifier-reference-escaped.js37
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method/await-as-identifier-reference.js37
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method/await-as-label-identifier-escaped.js37
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method/await-as-label-identifier.js37
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method/browser.js0
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method/shell.js0
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-as-binding-identifier-escaped.js37
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-as-binding-identifier.js37
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-as-identifier-reference-escaped.js37
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-as-identifier-reference.js37
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-as-label-identifier-escaped.js37
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-as-label-identifier.js37
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-identifier-spread-strict-strict.js86
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-identifier-strict-strict.js77
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-promise-reject-next-catch.js82
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-promise-reject-next-for-await-of-async-iterator.js88
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-promise-reject-next-for-await-of-sync-iterator.js87
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-promise-reject-next-yield-star-async-iterator.js86
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-promise-reject-next-yield-star-sync-iterator.js85
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-promise-reject-next.js82
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-spread-arr-multiple.js88
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-spread-arr-single.js87
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-spread-obj.js90
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-async-next.js257
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-async-return.js273
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-async-throw.js281
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-expr-abrupt.js92
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-get-abrupt.js112
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-not-callable-boolean-throw.js111
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-not-callable-number-throw.js111
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-not-callable-object-throw.js111
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-not-callable-string-throw.js111
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-not-callable-symbol-throw.js111
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-null-sync-get-abrupt.js117
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-returns-abrupt.js108
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-returns-boolean-throw.js108
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-returns-null-throw.js108
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-returns-number-throw.js108
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-returns-string-throw.js108
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-returns-symbol-throw.js108
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-returns-undefined-throw.js108
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-undefined-sync-get-abrupt.js117
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-sync-get-abrupt.js111
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-sync-not-callable-boolean-throw.js110
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-sync-not-callable-number-throw.js110
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-sync-not-callable-object-throw.js110
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-sync-not-callable-string-throw.js110
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-sync-not-callable-symbol-throw.js110
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-sync-returns-abrupt.js105
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-sync-returns-boolean-throw.js110
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-sync-returns-null-throw.js110
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-sync-returns-number-throw.js110
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-sync-returns-string-throw.js110
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-sync-returns-symbol-throw.js110
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-sync-returns-undefined-throw.js110
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-next-call-done-get-abrupt.js111
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-next-call-returns-abrupt.js103
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-next-call-value-get-abrupt.js113
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-next-get-abrupt.js103
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-next-non-object-ignores-then.js123
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-next-not-callable-boolean-throw.js100
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-next-not-callable-null-throw.js100
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-next-not-callable-number-throw.js100
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-next-not-callable-object-throw.js100
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-next-not-callable-string-throw.js100
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-next-not-callable-symbol-throw.js100
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-next-not-callable-undefined-throw.js100
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-next-then-get-abrupt.js127
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-next-then-non-callable-boolean-fulfillpromise.js121
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-next-then-non-callable-null-fulfillpromise.js121
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-next-then-non-callable-number-fulfillpromise.js121
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-next-then-non-callable-object-fulfillpromise.js121
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-next-then-non-callable-string-fulfillpromise.js121
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-next-then-non-callable-symbol-fulfillpromise.js121
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-next-then-non-callable-undefined-fulfillpromise.js121
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-next-then-returns-abrupt.js127
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-sync-next.js260
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-sync-return.js235
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-sync-throw.js241
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-private-method-static/await-as-binding-identifier-escaped.js41
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-private-method-static/await-as-binding-identifier.js41
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-private-method-static/await-as-identifier-reference-escaped.js41
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-private-method-static/await-as-identifier-reference.js41
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-private-method-static/await-as-label-identifier-escaped.js41
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-private-method-static/await-as-label-identifier.js41
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-private-method-static/browser.js0
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-private-method-static/returns-async-arrow-returns-arguments-from-parent-function.js44
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-private-method-static/returns-async-arrow-returns-newtarget.js43
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-private-method-static/returns-async-arrow.js43
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-private-method-static/returns-async-function-returns-arguments-from-own-function.js44
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-private-method-static/returns-async-function-returns-newtarget.js43
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-private-method-static/returns-async-function.js43
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-private-method-static/shell.js0
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-private-method/await-as-binding-identifier-escaped.js39
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-private-method/await-as-binding-identifier.js39
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-private-method/await-as-identifier-reference-escaped.js39
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-private-method/await-as-identifier-reference.js39
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-private-method/await-as-label-identifier-escaped.js39
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-private-method/await-as-label-identifier.js39
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-private-method/browser.js0
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-private-method/returns-async-arrow-returns-arguments-from-parent-function.js45
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-private-method/returns-async-arrow-returns-newtarget.js44
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-private-method/returns-async-arrow.js44
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-private-method/returns-async-function-returns-arguments-from-own-function.js45
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-private-method/returns-async-function-returns-newtarget.js44
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-private-method/returns-async-function.js44
-rw-r--r--js/src/tests/test262/language/statements/class/elements/async-private-method/shell.js0
-rw-r--r--js/src/tests/test262/language/statements/class/elements/browser.js0
-rw-r--r--js/src/tests/test262/language/statements/class/elements/class-field-is-observable-by-proxy.js48
-rw-r--r--js/src/tests/test262/language/statements/class/elements/class-field-on-frozen-objects-strict.js30
-rw-r--r--js/src/tests/test262/language/statements/class/elements/comp-name-init-err-contains-arguments.js36
-rw-r--r--js/src/tests/test262/language/statements/class/elements/comp-name-init-err-contains-super.js29
-rw-r--r--js/src/tests/test262/language/statements/class/elements/computed-name-toprimitive-symbol.js123
-rw-r--r--js/src/tests/test262/language/statements/class/elements/computed-name-toprimitive.js120
-rw-r--r--js/src/tests/test262/language/statements/class/elements/computed-property-abrupt-completition.js45
-rw-r--r--js/src/tests/test262/language/statements/class/elements/ctor-called-after-fields-init.js35
-rw-r--r--js/src/tests/test262/language/statements/class/elements/derived-cls-direct-eval-contains-superproperty-1.js36
-rw-r--r--js/src/tests/test262/language/statements/class/elements/derived-cls-direct-eval-contains-superproperty-2.js33
-rw-r--r--js/src/tests/test262/language/statements/class/elements/derived-cls-direct-eval-err-contains-supercall-1.js38
-rw-r--r--js/src/tests/test262/language/statements/class/elements/derived-cls-direct-eval-err-contains-supercall-2.js31
-rw-r--r--js/src/tests/test262/language/statements/class/elements/derived-cls-direct-eval-err-contains-supercall.js38
-rw-r--r--js/src/tests/test262/language/statements/class/elements/derived-cls-indirect-eval-contains-superproperty-1.js38
-rw-r--r--js/src/tests/test262/language/statements/class/elements/derived-cls-indirect-eval-contains-superproperty-2.js35
-rw-r--r--js/src/tests/test262/language/statements/class/elements/derived-cls-indirect-eval-err-contains-supercall-1.js38
-rw-r--r--js/src/tests/test262/language/statements/class/elements/derived-cls-indirect-eval-err-contains-supercall-2.js31
-rw-r--r--js/src/tests/test262/language/statements/class/elements/derived-cls-indirect-eval-err-contains-supercall.js38
-rw-r--r--js/src/tests/test262/language/statements/class/elements/direct-eval-err-contains-arguments.js38
-rw-r--r--js/src/tests/test262/language/statements/class/elements/direct-eval-err-contains-newtarget.js36
-rw-r--r--js/src/tests/test262/language/statements/class/elements/equality-init-err-contains-arguments.js35
-rw-r--r--js/src/tests/test262/language/statements/class/elements/equality-init-err-contains-super.js28
-rw-r--r--js/src/tests/test262/language/statements/class/elements/evaluation-error/browser.js0
-rw-r--r--js/src/tests/test262/language/statements/class/elements/evaluation-error/computed-name-referenceerror.js58
-rw-r--r--js/src/tests/test262/language/statements/class/elements/evaluation-error/computed-name-toprimitive-err.js60
-rw-r--r--js/src/tests/test262/language/statements/class/elements/evaluation-error/computed-name-toprimitive-returns-noncallable.js59
-rw-r--r--js/src/tests/test262/language/statements/class/elements/evaluation-error/computed-name-toprimitive-returns-nonobject.js58
-rw-r--r--js/src/tests/test262/language/statements/class/elements/evaluation-error/computed-name-tostring-err.js61
-rw-r--r--js/src/tests/test262/language/statements/class/elements/evaluation-error/computed-name-valueof-err.js61
-rw-r--r--js/src/tests/test262/language/statements/class/elements/evaluation-error/shell.js0
-rw-r--r--js/src/tests/test262/language/statements/class/elements/field-declaration.js111
-rw-r--r--js/src/tests/test262/language/statements/class/elements/field-definition-accessor-no-line-terminator.js52
-rw-r--r--js/src/tests/test262/language/statements/class/elements/fielddefinition-initializer-abrupt-completion.js48
-rw-r--r--js/src/tests/test262/language/statements/class/elements/fields-anonymous-function-length.js48
-rw-r--r--js/src/tests/test262/language/statements/class/elements/fields-asi-1.js21
-rw-r--r--js/src/tests/test262/language/statements/class/elements/fields-asi-2.js19
-rw-r--r--js/src/tests/test262/language/statements/class/elements/fields-asi-3.js19
-rw-r--r--js/src/tests/test262/language/statements/class/elements/fields-asi-4.js19
-rw-r--r--js/src/tests/test262/language/statements/class/elements/fields-asi-5.js30
-rw-r--r--js/src/tests/test262/language/statements/class/elements/fields-asi-same-line-1.js18
-rw-r--r--js/src/tests/test262/language/statements/class/elements/fields-asi-same-line-2.js18
-rw-r--r--js/src/tests/test262/language/statements/class/elements/fields-computed-name-propname-constructor.js54
-rw-r--r--js/src/tests/test262/language/statements/class/elements/fields-computed-name-static-computed-var-propname-constructor.js82
-rw-r--r--js/src/tests/test262/language/statements/class/elements/fields-computed-name-static-computed-var-propname-prototype.js34
-rw-r--r--js/src/tests/test262/language/statements/class/elements/fields-computed-name-static-propname-constructor.js81
-rw-r--r--js/src/tests/test262/language/statements/class/elements/fields-computed-name-static-propname-prototype.js32
-rw-r--r--js/src/tests/test262/language/statements/class/elements/fields-duplicate-privatenames.js25
-rw-r--r--js/src/tests/test262/language/statements/class/elements/fields-hash-constructor-is-a-valid-name.js42
-rw-r--r--js/src/tests/test262/language/statements/class/elements/fields-literal-name-propname-constructor.js30
-rw-r--r--js/src/tests/test262/language/statements/class/elements/fields-literal-name-static-propname-constructor.js30
-rw-r--r--js/src/tests/test262/language/statements/class/elements/fields-literal-name-static-propname-prototype.js30
-rw-r--r--js/src/tests/test262/language/statements/class/elements/fields-string-name-propname-constructor.js31
-rw-r--r--js/src/tests/test262/language/statements/class/elements/fields-string-name-static-propname-constructor.js31
-rw-r--r--js/src/tests/test262/language/statements/class/elements/fields-string-name-static-propname-prototype.js31
-rw-r--r--js/src/tests/test262/language/statements/class/elements/gen-private-method-static/browser.js0
-rw-r--r--js/src/tests/test262/language/statements/class/elements/gen-private-method-static/shell.js0
-rw-r--r--js/src/tests/test262/language/statements/class/elements/gen-private-method-static/yield-as-binding-identifier-escaped.js36
-rw-r--r--js/src/tests/test262/language/statements/class/elements/gen-private-method-static/yield-as-binding-identifier.js36
-rw-r--r--js/src/tests/test262/language/statements/class/elements/gen-private-method-static/yield-as-identifier-reference-escaped.js36
-rw-r--r--js/src/tests/test262/language/statements/class/elements/gen-private-method-static/yield-as-identifier-reference.js36
-rw-r--r--js/src/tests/test262/language/statements/class/elements/gen-private-method-static/yield-as-label-identifier-escaped.js36
-rw-r--r--js/src/tests/test262/language/statements/class/elements/gen-private-method-static/yield-as-label-identifier.js36
-rw-r--r--js/src/tests/test262/language/statements/class/elements/gen-private-method-static/yield-identifier-spread-strict-strict.js75
-rw-r--r--js/src/tests/test262/language/statements/class/elements/gen-private-method-static/yield-identifier-strict-strict.js66
-rw-r--r--js/src/tests/test262/language/statements/class/elements/gen-private-method-static/yield-spread-arr-multiple.js73
-rw-r--r--js/src/tests/test262/language/statements/class/elements/gen-private-method-static/yield-spread-arr-single.js75
-rw-r--r--js/src/tests/test262/language/statements/class/elements/gen-private-method-static/yield-spread-obj.js78
-rw-r--r--js/src/tests/test262/language/statements/class/elements/gen-private-method/browser.js0
-rw-r--r--js/src/tests/test262/language/statements/class/elements/gen-private-method/shell.js0
-rw-r--r--js/src/tests/test262/language/statements/class/elements/gen-private-method/yield-as-binding-identifier-escaped.js36
-rw-r--r--js/src/tests/test262/language/statements/class/elements/gen-private-method/yield-as-binding-identifier.js36
-rw-r--r--js/src/tests/test262/language/statements/class/elements/gen-private-method/yield-as-identifier-reference-escaped.js36
-rw-r--r--js/src/tests/test262/language/statements/class/elements/gen-private-method/yield-as-identifier-reference.js36
-rw-r--r--js/src/tests/test262/language/statements/class/elements/gen-private-method/yield-as-label-identifier-escaped.js36
-rw-r--r--js/src/tests/test262/language/statements/class/elements/gen-private-method/yield-as-label-identifier.js36
-rw-r--r--js/src/tests/test262/language/statements/class/elements/gen-private-method/yield-identifier-spread-strict-strict.js85
-rw-r--r--js/src/tests/test262/language/statements/class/elements/gen-private-method/yield-identifier-strict-strict.js76
-rw-r--r--js/src/tests/test262/language/statements/class/elements/gen-private-method/yield-spread-arr-multiple.js83
-rw-r--r--js/src/tests/test262/language/statements/class/elements/gen-private-method/yield-spread-arr-single.js85
-rw-r--r--js/src/tests/test262/language/statements/class/elements/gen-private-method/yield-spread-obj.js88
-rw-r--r--js/src/tests/test262/language/statements/class/elements/get-access-of-missing-private-getter.js41
-rw-r--r--js/src/tests/test262/language/statements/class/elements/get-access-of-missing-private-static-getter.js40
-rw-r--r--js/src/tests/test262/language/statements/class/elements/get-access-of-missing-shadowed-private-getter.js91
-rw-r--r--js/src/tests/test262/language/statements/class/elements/grammar-private-field-optional-chaining.js42
-rw-r--r--js/src/tests/test262/language/statements/class/elements/indirect-eval-contains-arguments.js23
-rw-r--r--js/src/tests/test262/language/statements/class/elements/indirect-eval-err-contains-newtarget.js37
-rw-r--r--js/src/tests/test262/language/statements/class/elements/init-err-evaluation.js38
-rw-r--r--js/src/tests/test262/language/statements/class/elements/init-value-defined-after-class.js50
-rw-r--r--js/src/tests/test262/language/statements/class/elements/init-value-incremental.js70
-rw-r--r--js/src/tests/test262/language/statements/class/elements/intercalated-static-non-static-computed-fields.js78
-rw-r--r--js/src/tests/test262/language/statements/class/elements/literal-name-init-err-contains-arguments.js35
-rw-r--r--js/src/tests/test262/language/statements/class/elements/literal-name-init-err-contains-super.js28
-rw-r--r--js/src/tests/test262/language/statements/class/elements/multiple-definitions-computed-names.js158
-rw-r--r--js/src/tests/test262/language/statements/class/elements/multiple-definitions-computed-symbol-names.js156
-rw-r--r--js/src/tests/test262/language/statements/class/elements/multiple-definitions-grammar-privatename-identifier-semantics-stringvalue.js160
-rw-r--r--js/src/tests/test262/language/statements/class/elements/multiple-definitions-literal-names-asi.js128
-rw-r--r--js/src/tests/test262/language/statements/class/elements/multiple-definitions-literal-names.js147
-rw-r--r--js/src/tests/test262/language/statements/class/elements/multiple-definitions-private-field-usage.js100
-rw-r--r--js/src/tests/test262/language/statements/class/elements/multiple-definitions-private-method-getter-usage.js100
-rw-r--r--js/src/tests/test262/language/statements/class/elements/multiple-definitions-private-method-usage.js100
-rw-r--r--js/src/tests/test262/language/statements/class/elements/multiple-definitions-private-names.js122
-rw-r--r--js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-field-identifier-initializer.js138
-rw-r--r--js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-field-identifier.js145
-rw-r--r--js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-private-getter-alt.js179
-rw-r--r--js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-private-getter.js179
-rw-r--r--js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-private-method-alt.js178
-rw-r--r--js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-private-method.js178
-rw-r--r--js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-private-setter-alt.js178
-rw-r--r--js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-private-setter.js178
-rw-r--r--js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-privatename-identifier-alt.js160
-rw-r--r--js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-privatename-identifier-initializer-alt.js154
-rw-r--r--js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-privatename-identifier-initializer.js154
-rw-r--r--js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-privatename-identifier.js160
-rw-r--r--js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-static-async-generator-method-privatename-identifier-alt.js185
-rw-r--r--js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-static-async-generator-method-privatename-identifier.js186
-rw-r--r--js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-static-async-method-privatename-identifier-alt.js185
-rw-r--r--js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-static-async-method-privatename-identifier.js186
-rw-r--r--js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-static-generator-method-privatename-identifier-alt.js175
-rw-r--r--js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-static-generator-method-privatename-identifier.js176
-rw-r--r--js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-static-method-privatename-identifier-alt.js173
-rw-r--r--js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-static-method-privatename-identifier.js173
-rw-r--r--js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-static-privatename-identifier-alt-by-classname.js161
-rw-r--r--js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-static-privatename-identifier-alt.js161
-rw-r--r--js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-static-privatename-identifier-by-classname.js161
-rw-r--r--js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-static-privatename-identifier-initializer-alt-by-classname.js155
-rw-r--r--js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-static-privatename-identifier-initializer-alt.js155
-rw-r--r--js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-static-privatename-identifier-initializer.js155
-rw-r--r--js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-static-privatename-identifier.js161
-rw-r--r--js/src/tests/test262/language/statements/class/elements/multiple-definitions-static-private-fields.js122
-rw-r--r--js/src/tests/test262/language/statements/class/elements/multiple-definitions-static-private-methods-with-fields.js139
-rw-r--r--js/src/tests/test262/language/statements/class/elements/multiple-definitions-static-private-methods.js126
-rw-r--r--js/src/tests/test262/language/statements/class/elements/multiple-definitions-string-literal-names.js160
-rw-r--r--js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-computed-names.js130
-rw-r--r--js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-computed-symbol-names.js128
-rw-r--r--js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-grammar-privatename-identifier-semantics-stringvalue.js132
-rw-r--r--js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-literal-names-asi.js100
-rw-r--r--js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-literal-names.js119
-rw-r--r--js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-private-field-usage.js72
-rw-r--r--js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-private-method-getter-usage.js72
-rw-r--r--js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-private-method-usage.js72
-rw-r--r--js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-private-names.js94
-rw-r--r--js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-field-identifier-initializer.js110
-rw-r--r--js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-field-identifier.js117
-rw-r--r--js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-private-getter-alt.js151
-rw-r--r--js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-private-getter.js151
-rw-r--r--js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-private-method-alt.js150
-rw-r--r--js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-private-method.js150
-rw-r--r--js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-private-setter-alt.js150
-rw-r--r--js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-private-setter.js150
-rw-r--r--js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-privatename-identifier-alt.js132
-rw-r--r--js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-privatename-identifier-initializer-alt.js126
-rw-r--r--js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-privatename-identifier-initializer.js126
-rw-r--r--js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-privatename-identifier.js132
-rw-r--r--js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-static-async-generator-method-privatename-identifier-alt.js157
-rw-r--r--js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-static-async-generator-method-privatename-identifier.js158
-rw-r--r--js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-static-async-method-privatename-identifier-alt.js157
-rw-r--r--js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-static-async-method-privatename-identifier.js158
-rw-r--r--js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-static-generator-method-privatename-identifier-alt.js147
-rw-r--r--js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-static-generator-method-privatename-identifier.js148
-rw-r--r--js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-static-method-privatename-identifier-alt.js145
-rw-r--r--js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-static-method-privatename-identifier.js145
-rw-r--r--js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-static-privatename-identifier-alt-by-classname.js133
-rw-r--r--js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-static-privatename-identifier-alt.js133
-rw-r--r--js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-static-privatename-identifier-by-classname.js133
-rw-r--r--js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-static-privatename-identifier-initializer-alt-by-classname.js127
-rw-r--r--js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-static-privatename-identifier-initializer-alt.js127
-rw-r--r--js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-static-privatename-identifier-initializer.js127
-rw-r--r--js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-static-privatename-identifier.js133
-rw-r--r--js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-static-private-fields.js94
-rw-r--r--js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-static-private-methods-with-fields.js111
-rw-r--r--js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-static-private-methods.js98
-rw-r--r--js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-string-literal-names.js132
-rw-r--r--js/src/tests/test262/language/statements/class/elements/nested-arrow-fnc-init-err-contains-arguments.js37
-rw-r--r--js/src/tests/test262/language/statements/class/elements/nested-arrow-fnc-init-err-contains-super.js30
-rw-r--r--js/src/tests/test262/language/statements/class/elements/nested-comp-name-init-err-contains-arguments.js35
-rw-r--r--js/src/tests/test262/language/statements/class/elements/nested-comp-name-init-err-contains-super.js28
-rw-r--r--js/src/tests/test262/language/statements/class/elements/nested-derived-cls-direct-eval-contains-superproperty-1.js36
-rw-r--r--js/src/tests/test262/language/statements/class/elements/nested-derived-cls-direct-eval-contains-superproperty-2.js33
-rw-r--r--js/src/tests/test262/language/statements/class/elements/nested-derived-cls-direct-eval-err-contains-supercall-1.js38
-rw-r--r--js/src/tests/test262/language/statements/class/elements/nested-derived-cls-direct-eval-err-contains-supercall-2.js31
-rw-r--r--js/src/tests/test262/language/statements/class/elements/nested-derived-cls-direct-eval-err-contains-supercall.js38
-rw-r--r--js/src/tests/test262/language/statements/class/elements/nested-derived-cls-indirect-eval-contains-superproperty-1.js38
-rw-r--r--js/src/tests/test262/language/statements/class/elements/nested-derived-cls-indirect-eval-contains-superproperty-2.js35
-rw-r--r--js/src/tests/test262/language/statements/class/elements/nested-derived-cls-indirect-eval-err-contains-supercall-1.js38
-rw-r--r--js/src/tests/test262/language/statements/class/elements/nested-derived-cls-indirect-eval-err-contains-supercall-2.js31
-rw-r--r--js/src/tests/test262/language/statements/class/elements/nested-derived-cls-indirect-eval-err-contains-supercall.js38
-rw-r--r--js/src/tests/test262/language/statements/class/elements/nested-direct-eval-err-contains-arguments.js41
-rw-r--r--js/src/tests/test262/language/statements/class/elements/nested-direct-eval-err-contains-newtarget.js36
-rw-r--r--js/src/tests/test262/language/statements/class/elements/nested-equality-init-err-contains-arguments.js34
-rw-r--r--js/src/tests/test262/language/statements/class/elements/nested-equality-init-err-contains-super.js27
-rw-r--r--js/src/tests/test262/language/statements/class/elements/nested-indirect-eval-contains-arguments.js25
-rw-r--r--js/src/tests/test262/language/statements/class/elements/nested-indirect-eval-err-contains-newtarget.js37
-rw-r--r--js/src/tests/test262/language/statements/class/elements/nested-literal-name-init-err-contains-arguments.js34
-rw-r--r--js/src/tests/test262/language/statements/class/elements/nested-literal-name-init-err-contains-super.js27
-rw-r--r--js/src/tests/test262/language/statements/class/elements/nested-private-arrow-fnc-init-err-contains-arguments.js39
-rw-r--r--js/src/tests/test262/language/statements/class/elements/nested-private-arrow-fnc-init-err-contains-super.js32
-rw-r--r--js/src/tests/test262/language/statements/class/elements/nested-private-derived-cls-direct-eval-contains-superproperty-1.js36
-rw-r--r--js/src/tests/test262/language/statements/class/elements/nested-private-derived-cls-direct-eval-contains-superproperty-2.js33
-rw-r--r--js/src/tests/test262/language/statements/class/elements/nested-private-derived-cls-direct-eval-err-contains-supercall-1.js38
-rw-r--r--js/src/tests/test262/language/statements/class/elements/nested-private-derived-cls-direct-eval-err-contains-supercall-2.js31
-rw-r--r--js/src/tests/test262/language/statements/class/elements/nested-private-derived-cls-direct-eval-err-contains-supercall.js38
-rw-r--r--js/src/tests/test262/language/statements/class/elements/nested-private-derived-cls-indirect-eval-contains-superproperty-1.js38
-rw-r--r--js/src/tests/test262/language/statements/class/elements/nested-private-derived-cls-indirect-eval-contains-superproperty-2.js35
-rw-r--r--js/src/tests/test262/language/statements/class/elements/nested-private-derived-cls-indirect-eval-err-contains-supercall-1.js38
-rw-r--r--js/src/tests/test262/language/statements/class/elements/nested-private-derived-cls-indirect-eval-err-contains-supercall-2.js31
-rw-r--r--js/src/tests/test262/language/statements/class/elements/nested-private-derived-cls-indirect-eval-err-contains-supercall.js38
-rw-r--r--js/src/tests/test262/language/statements/class/elements/nested-private-direct-eval-err-contains-arguments.js44
-rw-r--r--js/src/tests/test262/language/statements/class/elements/nested-private-direct-eval-err-contains-newtarget.js36
-rw-r--r--js/src/tests/test262/language/statements/class/elements/nested-private-indirect-eval-contains-arguments.js26
-rw-r--r--js/src/tests/test262/language/statements/class/elements/nested-private-indirect-eval-err-contains-newtarget.js37
-rw-r--r--js/src/tests/test262/language/statements/class/elements/nested-private-literal-name-init-err-contains-arguments.js34
-rw-r--r--js/src/tests/test262/language/statements/class/elements/nested-private-literal-name-init-err-contains-super.js27
-rw-r--r--js/src/tests/test262/language/statements/class/elements/nested-private-ternary-init-err-contains-arguments.js34
-rw-r--r--js/src/tests/test262/language/statements/class/elements/nested-private-ternary-init-err-contains-super.js27
-rw-r--r--js/src/tests/test262/language/statements/class/elements/nested-private-typeof-init-err-contains-arguments.js34
-rw-r--r--js/src/tests/test262/language/statements/class/elements/nested-private-typeof-init-err-contains-super.js27
-rw-r--r--js/src/tests/test262/language/statements/class/elements/nested-static-comp-name-init-err-contains-arguments.js35
-rw-r--r--js/src/tests/test262/language/statements/class/elements/nested-static-comp-name-init-err-contains-super.js28
-rw-r--r--js/src/tests/test262/language/statements/class/elements/nested-static-literal-init-err-contains-arguments.js34
-rw-r--r--js/src/tests/test262/language/statements/class/elements/nested-static-literal-init-err-contains-super.js27
-rw-r--r--js/src/tests/test262/language/statements/class/elements/nested-static-private-init-err-contains-arguments.js34
-rw-r--r--js/src/tests/test262/language/statements/class/elements/nested-static-private-init-err-contains-super.js27
-rw-r--r--js/src/tests/test262/language/statements/class/elements/nested-static-string-literal-name-init-err-contains-arguments.js34
-rw-r--r--js/src/tests/test262/language/statements/class/elements/nested-static-string-literal-name-init-err-contains-super.js27
-rw-r--r--js/src/tests/test262/language/statements/class/elements/nested-string-literal-name-init-err-contains-arguments.js34
-rw-r--r--js/src/tests/test262/language/statements/class/elements/nested-string-literal-name-init-err-contains-super.js27
-rw-r--r--js/src/tests/test262/language/statements/class/elements/nested-ternary-init-err-contains-arguments.js34
-rw-r--r--js/src/tests/test262/language/statements/class/elements/nested-ternary-init-err-contains-super.js27
-rw-r--r--js/src/tests/test262/language/statements/class/elements/nested-typeof-init-err-contains-arguments.js34
-rw-r--r--js/src/tests/test262/language/statements/class/elements/nested-typeof-init-err-contains-super.js27
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-computed-names.js108
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-computed-symbol-names.js106
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-grammar-privatename-identifier-semantics-stringvalue.js110
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-literal-names-asi.js78
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-literal-names.js97
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-private-field-usage.js50
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-private-method-getter-usage.js50
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-private-method-usage.js50
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-private-names.js72
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-field-identifier-initializer.js88
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-field-identifier.js95
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-private-getter-alt.js129
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-private-getter.js129
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-private-method-alt.js128
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-private-method.js128
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-private-setter-alt.js128
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-private-setter.js128
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-privatename-identifier-alt.js110
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-privatename-identifier-initializer-alt.js104
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-privatename-identifier-initializer.js104
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-privatename-identifier.js110
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-static-async-generator-method-privatename-identifier-alt.js135
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-static-async-generator-method-privatename-identifier.js136
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-static-async-method-privatename-identifier-alt.js135
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-static-async-method-privatename-identifier.js136
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-static-generator-method-privatename-identifier-alt.js125
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-static-generator-method-privatename-identifier.js126
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-static-method-privatename-identifier-alt.js123
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-static-method-privatename-identifier.js123
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-static-privatename-identifier-alt-by-classname.js111
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-static-privatename-identifier-alt.js111
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-static-privatename-identifier-by-classname.js111
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-static-privatename-identifier-initializer-alt-by-classname.js105
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-static-privatename-identifier-initializer-alt.js105
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-static-privatename-identifier-initializer.js105
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-static-privatename-identifier.js111
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-static-private-fields.js72
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-static-private-methods-with-fields.js89
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-static-private-methods.js76
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-string-literal-names.js110
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-computed-names.js108
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-computed-symbol-names.js106
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-grammar-privatename-identifier-semantics-stringvalue.js110
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-literal-names-asi.js78
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-literal-names.js97
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-private-field-usage.js50
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-private-method-getter-usage.js50
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-private-method-usage.js50
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-private-names.js72
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-field-identifier-initializer.js88
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-field-identifier.js95
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-private-getter-alt.js129
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-private-getter.js129
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-private-method-alt.js128
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-private-method.js128
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-private-setter-alt.js128
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-private-setter.js128
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-privatename-identifier-alt.js110
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-privatename-identifier-initializer-alt.js104
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-privatename-identifier-initializer.js104
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-privatename-identifier.js110
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js135
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-static-async-generator-method-privatename-identifier.js136
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-static-async-method-privatename-identifier-alt.js135
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-static-async-method-privatename-identifier.js136
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-static-generator-method-privatename-identifier-alt.js125
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-static-generator-method-privatename-identifier.js126
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-static-method-privatename-identifier-alt.js123
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-static-method-privatename-identifier.js123
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-static-privatename-identifier-alt-by-classname.js111
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-static-privatename-identifier-alt.js111
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-static-privatename-identifier-by-classname.js111
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js105
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-static-privatename-identifier-initializer-alt.js105
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-static-privatename-identifier-initializer.js105
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-static-privatename-identifier.js111
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-static-private-fields.js72
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-static-private-methods-with-fields.js89
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-static-private-methods.js76
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-string-literal-names.js110
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-sc-line-method-computed-names.js108
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-sc-line-method-computed-symbol-names.js106
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-sc-line-method-grammar-privatename-identifier-semantics-stringvalue.js110
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-sc-line-method-literal-names-asi.js78
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-sc-line-method-literal-names.js97
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-sc-line-method-private-field-usage.js50
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-sc-line-method-private-method-getter-usage.js50
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-sc-line-method-private-method-usage.js50
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-sc-line-method-private-names.js72
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-field-identifier-initializer.js88
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-field-identifier.js95
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-private-getter-alt.js129
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-private-getter.js129
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-private-method-alt.js128
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-private-method.js128
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-private-setter-alt.js128
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-private-setter.js128
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-privatename-identifier-alt.js110
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-privatename-identifier-initializer-alt.js104
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-privatename-identifier-initializer.js104
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-privatename-identifier.js110
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-static-async-generator-method-privatename-identifier-alt.js135
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-static-async-generator-method-privatename-identifier.js136
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-static-async-method-privatename-identifier-alt.js135
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-static-async-method-privatename-identifier.js136
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-static-generator-method-privatename-identifier-alt.js125
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-static-generator-method-privatename-identifier.js126
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-static-method-privatename-identifier-alt.js123
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-static-method-privatename-identifier.js123
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-static-privatename-identifier-alt-by-classname.js111
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-static-privatename-identifier-alt.js111
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-static-privatename-identifier-by-classname.js111
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-static-privatename-identifier-initializer-alt-by-classname.js105
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-static-privatename-identifier-initializer-alt.js105
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-static-privatename-identifier-initializer.js105
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-static-privatename-identifier.js111
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-sc-line-method-static-private-fields.js72
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-sc-line-method-static-private-methods-with-fields.js89
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-sc-line-method-static-private-methods.js76
-rw-r--r--js/src/tests/test262/language/statements/class/elements/new-sc-line-method-string-literal-names.js110
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-accessor-is-visible-in-computed-properties.js34
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-accessor-name/browser.js0
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-accessor-name/inst-private-escape-sequence-ZWJ.js80
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-accessor-name/inst-private-escape-sequence-ZWNJ.js80
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-accessor-name/inst-private-escape-sequence-u2118.js80
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-accessor-name/inst-private-escape-sequence-u6F.js80
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-accessor-name/inst-private-name-ZWJ.js80
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-accessor-name/inst-private-name-ZWNJ.js80
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-accessor-name/inst-private-name-common.js80
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-accessor-name/inst-private-name-dollar.js80
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-accessor-name/inst-private-name-u2118.js80
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-accessor-name/inst-private-name-underscore.js80
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-accessor-name/shell.js0
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-accessor-name/static-private-escape-sequence-ZWJ.js79
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-accessor-name/static-private-escape-sequence-ZWNJ.js79
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-accessor-name/static-private-escape-sequence-u2118.js79
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-accessor-name/static-private-escape-sequence-u6F.js79
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-accessor-name/static-private-name-ZWJ.js79
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-accessor-name/static-private-name-ZWNJ.js79
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-accessor-name/static-private-name-common.js79
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-accessor-name/static-private-name-dollar.js79
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-accessor-name/static-private-name-u2118.js79
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-accessor-name/static-private-name-underscore.js79
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-arrow-fnc-init-err-contains-arguments.js36
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-arrow-fnc-init-err-contains-super.js29
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-async-generator-method-name.js61
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-async-method-name.js61
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-class-field-on-frozen-objects-strict.js34
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-derived-cls-direct-eval-contains-superproperty-1.js36
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-derived-cls-direct-eval-contains-superproperty-2.js33
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-derived-cls-direct-eval-err-contains-supercall-1.js38
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-derived-cls-direct-eval-err-contains-supercall-2.js31
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-derived-cls-direct-eval-err-contains-supercall.js38
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-derived-cls-indirect-eval-contains-superproperty-1.js38
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-derived-cls-indirect-eval-contains-superproperty-2.js35
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-derived-cls-indirect-eval-err-contains-supercall-1.js38
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-derived-cls-indirect-eval-err-contains-supercall-2.js31
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-derived-cls-indirect-eval-err-contains-supercall.js38
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-direct-eval-err-contains-arguments.js38
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-direct-eval-err-contains-newtarget.js36
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-field-access-on-inner-arrow-function.js43
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-field-access-on-inner-function.js44
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-field-after-optional-chain.js46
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-field-as-arrow-function.js35
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-field-as-async-arrow-function.js37
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-field-as-async-function.js37
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-field-as-function.js35
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-field-is-not-clobbered-by-computed-property.js45
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-field-is-visible-in-computed-properties.js51
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-field-on-nested-class.js47
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-field-visible-to-direct-eval-on-initializer.js49
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-field-visible-to-direct-eval.js61
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-field-with-initialized-id-is-visible-in-computed-properties.js78
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-generator-method-name.js61
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-getter-access-on-inner-arrow-function.js43
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-getter-access-on-inner-function.js44
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-getter-brand-check-multiple-evaluations-of-class.js49
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-getter-brand-check-super-class.js50
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-getter-brand-check.js47
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-getter-is-not-a-own-property.js47
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-getter-is-not-clobbered-by-computed-property.js45
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-getter-on-nested-class.js38
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-getter-shadowed-by-field-on-nested-class.js46
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-getter-shadowed-by-getter-on-nested-class.js46
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-getter-shadowed-by-method-on-nested-class.js43
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-getter-shadowed-by-setter-on-nested-class.js51
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-getter-visible-to-direct-eval-on-initializer.js49
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-getter-visible-to-direct-eval.js61
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-indirect-eval-contains-arguments.js25
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-indirect-eval-err-contains-newtarget.js37
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-literal-name-init-err-contains-arguments.js35
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-literal-name-init-err-contains-super.js28
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-method-access-on-inner-arrow-function.js43
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-method-access-on-inner-function.js44
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-method-brand-check-multiple-evaluations-of-class.js49
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-method-brand-check-super-class.js50
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-method-brand-check.js47
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-method-comparison-multiple-evaluations-of-class.js47
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-method-comparison.js47
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-method-double-initialisation-get-and-set.js37
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-method-double-initialisation-get.js36
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-method-double-initialisation-set.js36
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-method-double-initialisation.js36
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-method-get-and-call.js49
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-method-is-not-a-own-property.js45
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-method-is-not-clobbered-by-computed-property.js45
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-method-is-visible-in-computed-properties.js34
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-method-length.js49
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-method-not-writable.js35
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-method-on-nested-class.js38
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-method-referenced-from-static-method.js40
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-method-shadowed-by-field-on-nested-class.js46
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-method-shadowed-by-getter-on-nested-class.js49
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-method-shadowed-by-setter-on-nested-class.js51
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-method-shadowed-on-nested-class.js40
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-method-visible-to-direct-eval-on-initializer.js49
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-method-visible-to-direct-eval.js61
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-methods/browser.js0
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-methods/prod-private-async-generator.js134
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-methods/prod-private-async-method.js129
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-methods/prod-private-generator.js126
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-methods/prod-private-method-initialize-order.js141
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-methods/prod-private-method.js122
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-methods/shell.js0
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-setter-access-on-inner-arrow-function.js44
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-setter-access-on-inner-function.js45
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-setter-brand-check-multiple-evaluations-of-class.js51
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-setter-brand-check-super-class.js55
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-setter-brand-check.js48
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-setter-is-not-a-own-property.js48
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-setter-is-not-clobbered-by-computed-property.js46
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-setter-on-nested-class.js39
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-setter-shadowed-by-field-on-nested-class.js53
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-setter-shadowed-by-getter-on-nested-class.js52
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-setter-shadowed-by-method-on-nested-class.js52
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-setter-shadowed-by-setter-on-nested-class.js51
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-setter-visible-to-direct-eval-on-initializer.js50
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-setter-visible-to-direct-eval.js63
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-static-async-generator-method-name.js62
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-static-async-method-name.js62
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-static-field-shadowed-by-field-on-nested-class.js91
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-static-field-shadowed-by-getter-on-nested-class.js92
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-static-field-shadowed-by-method-on-nested-class.js92
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-static-field-shadowed-by-setter-on-nested-class.js93
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-static-field-usage-inside-nested-class.js81
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-static-field-visible-to-direct-eval.js59
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-static-generator-method-name.js62
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-static-getter-abrupt-completition.js41
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-static-getter-visible-to-direct-eval.js63
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-static-method-length.js48
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-static-method-name.js73
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-static-method-not-writable.js33
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-static-method-shadowed-by-field-on-nested-class.js91
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-static-method-shadowed-by-getter-on-nested-class.js92
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-static-method-shadowed-by-method-on-nested-class.js92
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-static-method-shadowed-by-setter-on-nested-class.js93
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-static-method-usage-inside-nested-class.js83
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-static-method-visible-to-direct-eval.js63
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-static-setter-abrupt-completition.js42
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-static-setter-visible-to-direct-eval.js64
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-ternary-init-err-contains-arguments.js35
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-ternary-init-err-contains-super.js28
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-typeof-init-err-contains-arguments.js35
-rw-r--r--js/src/tests/test262/language/statements/class/elements/private-typeof-init-err-contains-super.js28
-rw-r--r--js/src/tests/test262/language/statements/class/elements/privatefield-on-proxy.js55
-rw-r--r--js/src/tests/test262/language/statements/class/elements/privatefieldadd-typeerror.js63
-rw-r--r--js/src/tests/test262/language/statements/class/elements/privatefieldget-primitive-receiver.js78
-rw-r--r--js/src/tests/test262/language/statements/class/elements/privatefieldget-success-1.js48
-rw-r--r--js/src/tests/test262/language/statements/class/elements/privatefieldget-success-2.js46
-rw-r--r--js/src/tests/test262/language/statements/class/elements/privatefieldget-success-3.js43
-rw-r--r--js/src/tests/test262/language/statements/class/elements/privatefieldget-success-4.js42
-rw-r--r--js/src/tests/test262/language/statements/class/elements/privatefieldget-success-5.js42
-rw-r--r--js/src/tests/test262/language/statements/class/elements/privatefieldget-typeerror-1.js41
-rw-r--r--js/src/tests/test262/language/statements/class/elements/privatefieldget-typeerror-2.js57
-rw-r--r--js/src/tests/test262/language/statements/class/elements/privatefieldget-typeerror-3.js55
-rw-r--r--js/src/tests/test262/language/statements/class/elements/privatefieldget-typeerror-4.js55
-rw-r--r--js/src/tests/test262/language/statements/class/elements/privatefieldget-typeerror-5.js60
-rw-r--r--js/src/tests/test262/language/statements/class/elements/privatefieldput-primitive-receiver.js78
-rw-r--r--js/src/tests/test262/language/statements/class/elements/privatefieldset-evaluation-order-1.js45
-rw-r--r--js/src/tests/test262/language/statements/class/elements/privatefieldset-evaluation-order-2.js38
-rw-r--r--js/src/tests/test262/language/statements/class/elements/privatefieldset-evaluation-order-3.js47
-rw-r--r--js/src/tests/test262/language/statements/class/elements/privatefieldset-typeerror-1.js41
-rw-r--r--js/src/tests/test262/language/statements/class/elements/privatefieldset-typeerror-10.js47
-rw-r--r--js/src/tests/test262/language/statements/class/elements/privatefieldset-typeerror-11.js47
-rw-r--r--js/src/tests/test262/language/statements/class/elements/privatefieldset-typeerror-2.js57
-rw-r--r--js/src/tests/test262/language/statements/class/elements/privatefieldset-typeerror-3.js66
-rw-r--r--js/src/tests/test262/language/statements/class/elements/privatefieldset-typeerror-4.js55
-rw-r--r--js/src/tests/test262/language/statements/class/elements/privatefieldset-typeerror-5.js61
-rw-r--r--js/src/tests/test262/language/statements/class/elements/privatefieldset-typeerror-6.js47
-rw-r--r--js/src/tests/test262/language/statements/class/elements/privatefieldset-typeerror-7.js47
-rw-r--r--js/src/tests/test262/language/statements/class/elements/privatefieldset-typeerror-8.js47
-rw-r--r--js/src/tests/test262/language/statements/class/elements/privatefieldset-typeerror-9.js47
-rw-r--r--js/src/tests/test262/language/statements/class/elements/privategetter-on-proxy.js61
-rw-r--r--js/src/tests/test262/language/statements/class/elements/privatemethods-on-proxy.js57
-rw-r--r--js/src/tests/test262/language/statements/class/elements/privatename-not-valid-earlyerr-script-1.js25
-rw-r--r--js/src/tests/test262/language/statements/class/elements/privatename-not-valid-earlyerr-script-2.js25
-rw-r--r--js/src/tests/test262/language/statements/class/elements/privatename-not-valid-earlyerr-script-3.js23
-rw-r--r--js/src/tests/test262/language/statements/class/elements/privatename-not-valid-earlyerr-script-4.js28
-rw-r--r--js/src/tests/test262/language/statements/class/elements/privatename-not-valid-earlyerr-script-5.js25
-rw-r--r--js/src/tests/test262/language/statements/class/elements/privatename-not-valid-earlyerr-script-6.js23
-rw-r--r--js/src/tests/test262/language/statements/class/elements/privatename-not-valid-earlyerr-script-7.js23
-rw-r--r--js/src/tests/test262/language/statements/class/elements/privatename-not-valid-earlyerr-script-8.js23
-rw-r--r--js/src/tests/test262/language/statements/class/elements/privatename-not-valid-eval-earlyerr-1.js29
-rw-r--r--js/src/tests/test262/language/statements/class/elements/privatename-not-valid-eval-earlyerr-2.js29
-rw-r--r--js/src/tests/test262/language/statements/class/elements/privatename-not-valid-eval-earlyerr-3.js27
-rw-r--r--js/src/tests/test262/language/statements/class/elements/privatename-not-valid-eval-earlyerr-4.js32
-rw-r--r--js/src/tests/test262/language/statements/class/elements/privatename-not-valid-eval-earlyerr-5.js27
-rw-r--r--js/src/tests/test262/language/statements/class/elements/privatename-not-valid-eval-earlyerr-6.js24
-rw-r--r--js/src/tests/test262/language/statements/class/elements/privatename-not-valid-eval-earlyerr-7.js24
-rw-r--r--js/src/tests/test262/language/statements/class/elements/privatename-not-valid-eval-earlyerr-8.js28
-rw-r--r--js/src/tests/test262/language/statements/class/elements/privatename-valid-no-earlyerr.js46
-rw-r--r--js/src/tests/test262/language/statements/class/elements/prod-private-getter-before-super-return-in-constructor.js48
-rw-r--r--js/src/tests/test262/language/statements/class/elements/prod-private-getter-before-super-return-in-field-initializer.js46
-rw-r--r--js/src/tests/test262/language/statements/class/elements/prod-private-method-before-super-return-in-constructor.js48
-rw-r--r--js/src/tests/test262/language/statements/class/elements/prod-private-method-before-super-return-in-field-initializer.js46
-rw-r--r--js/src/tests/test262/language/statements/class/elements/prod-private-setter-before-super-return-in-constructor.js48
-rw-r--r--js/src/tests/test262/language/statements/class/elements/prod-private-setter-before-super-return-in-field-initializer.js46
-rw-r--r--js/src/tests/test262/language/statements/class/elements/public-class-field-initialization-is-visible-to-proxy.js33
-rw-r--r--js/src/tests/test262/language/statements/class/elements/public-class-field-initialization-on-super-class-with-setter.js39
-rw-r--r--js/src/tests/test262/language/statements/class/elements/redeclaration-symbol.js63
-rw-r--r--js/src/tests/test262/language/statements/class/elements/redeclaration.js63
-rw-r--r--js/src/tests/test262/language/statements/class/elements/regular-definitions-computed-names.js94
-rw-r--r--js/src/tests/test262/language/statements/class/elements/regular-definitions-computed-symbol-names.js92
-rw-r--r--js/src/tests/test262/language/statements/class/elements/regular-definitions-grammar-privatename-identifier-semantics-stringvalue.js95
-rw-r--r--js/src/tests/test262/language/statements/class/elements/regular-definitions-literal-names-asi.js64
-rw-r--r--js/src/tests/test262/language/statements/class/elements/regular-definitions-literal-names.js83
-rw-r--r--js/src/tests/test262/language/statements/class/elements/regular-definitions-private-field-usage.js35
-rw-r--r--js/src/tests/test262/language/statements/class/elements/regular-definitions-private-method-getter-usage.js35
-rw-r--r--js/src/tests/test262/language/statements/class/elements/regular-definitions-private-method-usage.js35
-rw-r--r--js/src/tests/test262/language/statements/class/elements/regular-definitions-private-names.js57
-rw-r--r--js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-field-identifier-initializer.js73
-rw-r--r--js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-field-identifier.js80
-rw-r--r--js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-private-getter-alt.js114
-rw-r--r--js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-private-getter.js114
-rw-r--r--js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-private-method-alt.js113
-rw-r--r--js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-private-method.js113
-rw-r--r--js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-private-setter-alt.js113
-rw-r--r--js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-private-setter.js113
-rw-r--r--js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-privatename-identifier-alt.js95
-rw-r--r--js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-privatename-identifier-initializer-alt.js89
-rw-r--r--js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-privatename-identifier-initializer.js89
-rw-r--r--js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-privatename-identifier.js95
-rw-r--r--js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-static-async-generator-method-privatename-identifier-alt.js120
-rw-r--r--js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-static-async-generator-method-privatename-identifier.js121
-rw-r--r--js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-static-async-method-privatename-identifier-alt.js120
-rw-r--r--js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-static-async-method-privatename-identifier.js121
-rw-r--r--js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-static-generator-method-privatename-identifier-alt.js110
-rw-r--r--js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-static-generator-method-privatename-identifier.js111
-rw-r--r--js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-static-method-privatename-identifier-alt.js108
-rw-r--r--js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-static-method-privatename-identifier.js108
-rw-r--r--js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-static-privatename-identifier-alt-by-classname.js96
-rw-r--r--js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-static-privatename-identifier-alt.js96
-rw-r--r--js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-static-privatename-identifier-by-classname.js96
-rw-r--r--js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-static-privatename-identifier-initializer-alt-by-classname.js90
-rw-r--r--js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-static-privatename-identifier-initializer-alt.js90
-rw-r--r--js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-static-privatename-identifier-initializer.js90
-rw-r--r--js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-static-privatename-identifier.js96
-rw-r--r--js/src/tests/test262/language/statements/class/elements/regular-definitions-static-private-fields.js57
-rw-r--r--js/src/tests/test262/language/statements/class/elements/regular-definitions-static-private-methods-with-fields.js74
-rw-r--r--js/src/tests/test262/language/statements/class/elements/regular-definitions-static-private-methods.js61
-rw-r--r--js/src/tests/test262/language/statements/class/elements/regular-definitions-string-literal-names.js96
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-async-gen-computed-names.js120
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-async-gen-computed-symbol-names.js118
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-async-gen-grammar-privatename-identifier-semantics-stringvalue.js122
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-async-gen-literal-names-asi.js90
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-async-gen-literal-names.js109
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-async-gen-private-field-usage.js62
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-async-gen-private-method-getter-usage.js62
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-async-gen-private-method-usage.js62
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-async-gen-private-names.js84
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-field-identifier-initializer.js100
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-field-identifier.js107
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-private-getter-alt.js141
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-private-getter.js141
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-private-method-alt.js140
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-private-method.js140
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-private-setter-alt.js140
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-private-setter.js140
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-privatename-identifier-alt.js122
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-privatename-identifier-initializer-alt.js116
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-privatename-identifier-initializer.js116
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-privatename-identifier.js122
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-static-async-generator-method-privatename-identifier-alt.js148
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-static-async-generator-method-privatename-identifier.js149
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-static-async-method-privatename-identifier-alt.js148
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-static-async-method-privatename-identifier.js149
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-static-generator-method-privatename-identifier-alt.js137
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-static-generator-method-privatename-identifier.js138
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-static-method-privatename-identifier-alt.js135
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-static-method-privatename-identifier.js135
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-static-privatename-identifier-alt-by-classname.js123
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-static-privatename-identifier-alt.js123
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-static-privatename-identifier-by-classname.js123
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js117
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-static-privatename-identifier-initializer-alt.js117
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-static-privatename-identifier-initializer.js117
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-static-privatename-identifier.js123
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-async-gen-static-private-fields.js84
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-async-gen-static-private-methods-with-fields.js101
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-async-gen-static-private-methods.js88
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-async-gen-string-literal-names.js122
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-async-method-computed-names.js119
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-async-method-computed-symbol-names.js117
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-async-method-grammar-privatename-identifier-semantics-stringvalue.js121
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-async-method-literal-names-asi.js89
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-async-method-literal-names.js108
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-async-method-private-field-usage.js61
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-async-method-private-method-getter-usage.js61
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-async-method-private-method-usage.js61
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-async-method-private-names.js83
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-field-identifier-initializer.js99
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-field-identifier.js106
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-private-getter-alt.js140
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-private-getter.js140
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-private-method-alt.js139
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-private-method.js139
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-private-setter-alt.js139
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-private-setter.js139
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-privatename-identifier-alt.js121
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-privatename-identifier-initializer-alt.js115
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-privatename-identifier-initializer.js115
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-privatename-identifier.js121
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-static-async-generator-method-privatename-identifier-alt.js147
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-static-async-generator-method-privatename-identifier.js148
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-static-async-method-privatename-identifier-alt.js147
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-static-async-method-privatename-identifier.js148
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-static-generator-method-privatename-identifier-alt.js136
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-static-generator-method-privatename-identifier.js137
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-static-method-privatename-identifier-alt.js134
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-static-method-privatename-identifier.js134
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-static-privatename-identifier-alt-by-classname.js122
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-static-privatename-identifier-alt.js122
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-static-privatename-identifier-by-classname.js122
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-static-privatename-identifier-initializer-alt-by-classname.js116
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-static-privatename-identifier-initializer-alt.js116
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-static-privatename-identifier-initializer.js116
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-static-privatename-identifier.js122
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-async-method-static-private-fields.js83
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-async-method-static-private-methods-with-fields.js100
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-async-method-static-private-methods.js87
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-async-method-string-literal-names.js121
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-gen-computed-names.js107
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-gen-computed-symbol-names.js105
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-gen-grammar-privatename-identifier-semantics-stringvalue.js109
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-gen-literal-names-asi.js77
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-gen-literal-names.js96
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-gen-private-field-usage.js49
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-gen-private-method-getter-usage.js49
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-gen-private-method-usage.js49
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-gen-private-names.js71
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-field-identifier-initializer.js87
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-field-identifier.js94
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-private-getter-alt.js128
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-private-getter.js128
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-private-method-alt.js127
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-private-method.js127
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-private-setter-alt.js127
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-private-setter.js127
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-privatename-identifier-alt.js109
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-privatename-identifier-initializer-alt.js103
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-privatename-identifier-initializer.js103
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-privatename-identifier.js109
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js134
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-static-async-generator-method-privatename-identifier.js135
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-static-async-method-privatename-identifier-alt.js134
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-static-async-method-privatename-identifier.js135
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-static-generator-method-privatename-identifier-alt.js124
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-static-generator-method-privatename-identifier.js125
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-static-method-privatename-identifier-alt.js122
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-static-method-privatename-identifier.js122
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-static-privatename-identifier-alt-by-classname.js110
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-static-privatename-identifier-alt.js110
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-static-privatename-identifier-by-classname.js110
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js104
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-static-privatename-identifier-initializer-alt.js104
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-static-privatename-identifier-initializer.js104
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-static-privatename-identifier.js110
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-gen-static-private-fields.js71
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-gen-static-private-methods-with-fields.js88
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-gen-static-private-methods.js75
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-gen-string-literal-names.js109
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-method-computed-names.js107
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-method-computed-symbol-names.js105
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-method-grammar-privatename-identifier-semantics-stringvalue.js109
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-method-literal-names-asi.js77
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-method-literal-names.js96
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-method-private-field-usage.js49
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-method-private-method-getter-usage.js49
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-method-private-method-usage.js49
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-method-private-names.js71
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-method-rs-field-identifier-initializer.js87
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-method-rs-field-identifier.js94
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-method-rs-private-getter-alt.js128
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-method-rs-private-getter.js128
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-method-rs-private-method-alt.js127
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-method-rs-private-method.js127
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-method-rs-private-setter-alt.js127
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-method-rs-private-setter.js127
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-method-rs-privatename-identifier-alt.js109
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-method-rs-privatename-identifier-initializer-alt.js103
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-method-rs-privatename-identifier-initializer.js103
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-method-rs-privatename-identifier.js109
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-method-rs-static-async-generator-method-privatename-identifier-alt.js134
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-method-rs-static-async-generator-method-privatename-identifier.js135
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-method-rs-static-async-method-privatename-identifier-alt.js134
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-method-rs-static-async-method-privatename-identifier.js135
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-method-rs-static-generator-method-privatename-identifier-alt.js124
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-method-rs-static-generator-method-privatename-identifier.js125
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-method-rs-static-method-privatename-identifier-alt.js122
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-method-rs-static-method-privatename-identifier.js122
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-method-rs-static-privatename-identifier-alt-by-classname.js110
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-method-rs-static-privatename-identifier-alt.js110
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-method-rs-static-privatename-identifier-by-classname.js110
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-method-rs-static-privatename-identifier-initializer-alt-by-classname.js104
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-method-rs-static-privatename-identifier-initializer-alt.js104
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-method-rs-static-privatename-identifier-initializer.js104
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-method-rs-static-privatename-identifier.js110
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-method-static-private-fields.js71
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-method-static-private-methods-with-fields.js88
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-method-static-private-methods.js75
-rw-r--r--js/src/tests/test262/language/statements/class/elements/same-line-method-string-literal-names.js109
-rw-r--r--js/src/tests/test262/language/statements/class/elements/set-access-of-missing-private-setter.js42
-rw-r--r--js/src/tests/test262/language/statements/class/elements/set-access-of-missing-private-static-setter.js41
-rw-r--r--js/src/tests/test262/language/statements/class/elements/set-access-of-missing-shadowed-private-setter.js92
-rw-r--r--js/src/tests/test262/language/statements/class/elements/set-access-of-private-method.js43
-rw-r--r--js/src/tests/test262/language/statements/class/elements/set-access-of-shadowed-private-method.js92
-rw-r--r--js/src/tests/test262/language/statements/class/elements/shell.js0
-rw-r--r--js/src/tests/test262/language/statements/class/elements/static-as-valid-instance-field-assigned.js38
-rw-r--r--js/src/tests/test262/language/statements/class/elements/static-as-valid-instance-field.js38
-rw-r--r--js/src/tests/test262/language/statements/class/elements/static-as-valid-static-field-assigned.js30
-rw-r--r--js/src/tests/test262/language/statements/class/elements/static-as-valid-static-field.js30
-rw-r--r--js/src/tests/test262/language/statements/class/elements/static-comp-name-init-err-contains-arguments.js36
-rw-r--r--js/src/tests/test262/language/statements/class/elements/static-comp-name-init-err-contains-super.js29
-rw-r--r--js/src/tests/test262/language/statements/class/elements/static-field-anonymous-function-length.js63
-rw-r--r--js/src/tests/test262/language/statements/class/elements/static-field-anonymous-function-name.js72
-rw-r--r--js/src/tests/test262/language/statements/class/elements/static-field-declaration.js132
-rw-r--r--js/src/tests/test262/language/statements/class/elements/static-field-init-this-inside-arrow-function.js65
-rw-r--r--js/src/tests/test262/language/statements/class/elements/static-field-init-with-this.js69
-rw-r--r--js/src/tests/test262/language/statements/class/elements/static-field-initializer-error.js60
-rw-r--r--js/src/tests/test262/language/statements/class/elements/static-field-redeclaration.js71
-rw-r--r--js/src/tests/test262/language/statements/class/elements/static-fielddefinition-initializer-abrupt-completion.js35
-rw-r--r--js/src/tests/test262/language/statements/class/elements/static-literal-init-err-contains-arguments.js35
-rw-r--r--js/src/tests/test262/language/statements/class/elements/static-literal-init-err-contains-super.js28
-rw-r--r--js/src/tests/test262/language/statements/class/elements/static-private-fields-proxy-default-handler-throws.js30
-rw-r--r--js/src/tests/test262/language/statements/class/elements/static-private-getter-access-on-inner-arrow-function.js46
-rw-r--r--js/src/tests/test262/language/statements/class/elements/static-private-getter-access-on-inner-class.js44
-rw-r--r--js/src/tests/test262/language/statements/class/elements/static-private-getter-access-on-inner-function.js48
-rw-r--r--js/src/tests/test262/language/statements/class/elements/static-private-getter.js57
-rw-r--r--js/src/tests/test262/language/statements/class/elements/static-private-init-err-contains-arguments.js35
-rw-r--r--js/src/tests/test262/language/statements/class/elements/static-private-init-err-contains-super.js28
-rw-r--r--js/src/tests/test262/language/statements/class/elements/static-private-method-access-on-inner-arrow-function.js44
-rw-r--r--js/src/tests/test262/language/statements/class/elements/static-private-method-access-on-inner-function.js46
-rw-r--r--js/src/tests/test262/language/statements/class/elements/static-private-method-and-instance-method-brand-check.js66
-rw-r--r--js/src/tests/test262/language/statements/class/elements/static-private-method-referenced-from-instance-method.js40
-rw-r--r--js/src/tests/test262/language/statements/class/elements/static-private-method-subclass-receiver.js39
-rw-r--r--js/src/tests/test262/language/statements/class/elements/static-private-setter-access-on-inner-arrow-function.js47
-rw-r--r--js/src/tests/test262/language/statements/class/elements/static-private-setter-access-on-inner-class.js46
-rw-r--r--js/src/tests/test262/language/statements/class/elements/static-private-setter-access-on-inner-function.js49
-rw-r--r--js/src/tests/test262/language/statements/class/elements/static-private-setter.js58
-rw-r--r--js/src/tests/test262/language/statements/class/elements/static-string-literal-name-init-err-contains-arguments.js35
-rw-r--r--js/src/tests/test262/language/statements/class/elements/static-string-literal-name-init-err-contains-super.js28
-rw-r--r--js/src/tests/test262/language/statements/class/elements/string-literal-name-init-err-contains-arguments.js35
-rw-r--r--js/src/tests/test262/language/statements/class/elements/string-literal-name-init-err-contains-super.js28
-rw-r--r--js/src/tests/test262/language/statements/class/elements/super-access-from-arrow-func-on-field.js39
-rw-r--r--js/src/tests/test262/language/statements/class/elements/super-access-inside-a-private-getter.js52
-rw-r--r--js/src/tests/test262/language/statements/class/elements/super-access-inside-a-private-method.js52
-rw-r--r--js/src/tests/test262/language/statements/class/elements/super-access-inside-a-private-setter.js52
-rw-r--r--js/src/tests/test262/language/statements/class/elements/super-fielddefinition-initializer-abrupt-completion.js58
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/browser.js0
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/browser.js0
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/class-heritage-array-literal-arrow-heritage.js26
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/class-heritage-array-literal-async-arrow-heritage.js26
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/browser.js0
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-call-expression-private-method-accessor-get.js42
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-call-expression-private-method-accessor-set.js42
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-call-expression-private-method-async-gen.js42
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-call-expression-private-method-async.js42
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-call-expression-private-method-gen.js42
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-call-expression-private-method.js42
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-call-expression-private-no-reference.js42
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-call-expression-privatename.js42
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-member-expression-private-method-accessor-get.js41
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-member-expression-private-method-accessor-set.js41
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-member-expression-private-method-async-gen.js41
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-member-expression-private-method-async.js41
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-member-expression-private-method-gen.js41
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-member-expression-private-method.js41
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-member-expression-private-no-reference.js40
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-member-expression-privatename.js40
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-call-expression-private-method-accessor-get.js39
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-call-expression-private-method-accessor-set.js39
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-call-expression-private-method-async-gen.js39
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-call-expression-private-method-async.js39
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-call-expression-private-method-gen.js39
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-call-expression-private-method.js39
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-call-expression-private-no-reference.js39
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-call-expression-privatename.js39
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-member-expression-private-method-accessor-get.js38
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-member-expression-private-method-accessor-set.js38
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-member-expression-private-method-async-gen.js38
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-member-expression-private-method-async.js38
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-member-expression-private-method-gen.js38
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-member-expression-private-method.js38
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-member-expression-private-no-reference.js37
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-member-expression-privatename.js37
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-call-expression-private-method-accessor-get.js43
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-call-expression-private-method-accessor-set.js43
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-call-expression-private-method-async-gen.js43
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-call-expression-private-method-async.js43
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-call-expression-private-method-gen.js43
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-call-expression-private-method.js43
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-call-expression-private-no-reference.js43
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-call-expression-privatename.js43
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-member-expression-private-method-accessor-get.js42
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-member-expression-private-method-accessor-set.js42
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-member-expression-private-method-async-gen.js42
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-member-expression-private-method-async.js42
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-member-expression-private-method-gen.js42
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-member-expression-private-method.js42
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-member-expression-private-no-reference.js41
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-member-expression-privatename.js41
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-call-expression-private-method-accessor-get.js49
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-call-expression-private-method-accessor-set.js49
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-call-expression-private-method-async-gen.js49
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-call-expression-private-method-async.js49
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-call-expression-private-method-gen.js49
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-call-expression-private-method.js49
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-call-expression-private-no-reference.js49
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-call-expression-privatename.js49
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-member-expression-private-method-accessor-get.js48
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-member-expression-private-method-accessor-set.js48
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-member-expression-private-method-async-gen.js48
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-member-expression-private-method-async.js48
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-member-expression-private-method-gen.js48
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-member-expression-private-method.js48
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-member-expression-private-no-reference.js47
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-member-expression-privatename.js47
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-call-expression-private-method-accessor-get.js43
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-call-expression-private-method-accessor-set.js43
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-call-expression-private-method-async-gen.js43
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-call-expression-private-method-async.js43
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-call-expression-private-method-gen.js43
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-call-expression-private-method.js43
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-call-expression-private-no-reference.js43
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-call-expression-privatename.js43
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-member-expression-private-method-accessor-get.js42
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-member-expression-private-method-accessor-set.js42
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-member-expression-private-method-async-gen.js42
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-member-expression-private-method-async.js42
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-member-expression-private-method-gen.js42
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-member-expression-private-method.js42
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-member-expression-private-no-reference.js41
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-member-expression-privatename.js41
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-call-expression-private-method-accessor-get.js49
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-call-expression-private-method-accessor-set.js49
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-call-expression-private-method-async-gen.js49
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-call-expression-private-method-async.js49
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-call-expression-private-method-gen.js49
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-call-expression-private-method.js49
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-call-expression-private-no-reference.js49
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-call-expression-privatename.js49
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-member-expression-private-method-accessor-get.js48
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-member-expression-private-method-accessor-set.js48
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-member-expression-private-method-async-gen.js48
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-member-expression-private-method-async.js48
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-member-expression-private-method-gen.js48
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-member-expression-private-method.js48
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-member-expression-private-no-reference.js47
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-member-expression-privatename.js47
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/shell.js0
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-class-body-ctor-duplicate.js26
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-ctor-super-no-heritage.js30
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-field-identifier-invalid-ues-error.js71
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-field-identifier-invalid-zwj-error.js71
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-field-identifier-invalid-zwnj-error.js71
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-fields-same-line-error.js34
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-private-environment-on-class-heritage-array-literal.js40
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-private-environment-on-class-heritage-chained-usage.js40
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-private-environment-on-class-heritage-function-expression.js40
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-private-environment-on-class-heritage-obj-literal.js40
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-private-environment-on-class-heritage-recursive.js40
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-private-environment-on-class-heritage.js40
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-private-field-on-object-destructuring.js33
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-private-field-super-access.js36
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-async-gen.js27
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-async.js27
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-gen.js27
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-get-field.js27
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-get-get.js27
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-meth-field.js27
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-meth-get.js27
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-meth-meth.js27
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-meth-set.js27
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-meth-staticfield.js27
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-meth-staticmeth.js27
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-set-field.js27
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-set-set.js27
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-constructor.js26
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-error.js37
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-identifier-invalid-ues.js65
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-identifier-invalid-zwj-error.js66
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-identifier-invalid-zwnj-error.js66
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-in-computed-property-missing.js53
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-whitespace-error-accessor-get-meth.js30
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-whitespace-error-accessor-set-meth.js30
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-whitespace-error-async-gen-meth.js30
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-whitespace-error-async-meth.js30
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-whitespace-error-call-expr.js40
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-whitespace-error-field-init.js30
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-whitespace-error-field.js30
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-whitespace-error-gen-meth.js30
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-whitespace-error-member-expr.js35
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-whitespace-error-meth.case.js30
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-whitespace-error-static-accessor-get-meth.js30
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-whitespace-error-static-accessor-set-meth.js30
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-whitespace-error-static-async-gen-meth.js30
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-whitespace-error-static-async-meth.js30
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-whitespace-error-static-field-init.js30
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-whitespace-error-static-field.js30
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-whitespace-error-static-gen-meth.js30
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-whitespace-error-static-meth.js30
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatenames-same-line-error.js37
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-special-meth-contains-super-async-gen.js28
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-special-meth-contains-super-async.js28
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-special-meth-contains-super-gen.js28
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-special-meth-contains-super-get.js28
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-special-meth-contains-super-method.js28
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-special-meth-contains-super-private-async-gen.js28
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-special-meth-contains-super-private-async.js28
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-special-meth-contains-super-private-gen.js28
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-special-meth-contains-super-private-method.js28
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-special-meth-contains-super-set.js28
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-special-meth-ctor-async-gen.js26
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-special-meth-ctor-async-meth.js26
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-special-meth-ctor-gen.js26
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-special-meth-ctor-get.js26
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-special-meth-ctor-set.js26
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-async-gen-meth-prototype.js26
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-async-gen-meth-super.js28
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-async-meth-prototype.js26
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-async-meth-super.js28
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-gen-meth-prototype.js26
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-gen-meth-super.js28
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-get-meth-prototype.js26
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-get-meth-super.js28
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-meth-prototype.js26
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-meth-super.js28
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-private-async-gen-meth-constructor.js26
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-private-async-gen-meth-super.js28
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-private-async-meth-constructor.js26
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-private-async-meth-super.js28
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-private-gen-meth-constructor.js26
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-private-gen-meth-super.js28
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-private-meth-constructor.js26
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-private-meth-super.js28
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-privatename-constructor.js26
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-set-meth-prototype.js26
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-set-meth-super.js28
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/browser.js0
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/field-init-call-expression-bad-reference.js43
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/field-init-call-expression-this.js43
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/field-init-fn-call-expression-bad-reference.js43
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/field-init-fn-call-expression-this.js43
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/field-init-fn-member-expression-bad-reference.js43
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/field-init-fn-member-expression-this.js43
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/field-init-member-expression-bad-reference.js43
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/field-init-member-expression-this.js43
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/fields-init-heritage-call-expression-bad-reference.js58
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/fields-init-heritage-call-expression-this.js58
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/fields-init-heritage-member-expression-bad-reference.js58
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/fields-init-heritage-member-expression-this.js58
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/method-call-expression-bad-reference.js43
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/method-call-expression-this.js43
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/method-fn-call-expression-bad-reference.js45
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/method-fn-call-expression-this.js45
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/method-fn-member-expression-bad-reference.js45
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/method-fn-member-expression-this.js45
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/method-heritage-call-expression-bad-reference.js59
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/method-heritage-call-expression-this.js59
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/method-heritage-member-expression-bad-reference.js59
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/method-heritage-member-expression-this.js59
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/method-member-expression-bad-reference.js43
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/method-member-expression-this.js43
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/method-outter-call-expression-bad-reference.js59
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/method-outter-call-expression-this.js59
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/method-outter-member-expression-bad-reference.js59
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/method-outter-member-expression-this.js59
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/shell.js0
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/private-async-generator-cannot-escape-token.js26
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/private-async-method-cannot-escape-token.js26
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/private-call-exp-cannot-escape-token.js34
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/private-field-cannot-escape-token.js26
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/private-generator-cannot-escape-token.js26
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/private-member-exp-cannot-escape-token.js34
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/private-method-cannot-escape-token.js26
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/shell.js0
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/super-private-access-invalid.js37
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/shell.js0
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/valid/browser.js0
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-class-body-ctor-no-heritage.js24
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-field-accessor.js27
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-field-classelementname-initializer-alt.js72
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-field-classelementname-initializer.js72
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-field-identifier-alt.js72
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-field-identifier.js72
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-fields-multi-line.js31
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-privatemeth-duplicate-get-set.js23
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-privatemeth-duplicate-meth-nestedclassmeth.js28
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-privatename-classelementname-initializer-alt.js69
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-privatename-classelementname-initializer.js69
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-privatename-identifier.js66
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-privatename-no-initializer-with-method.js34
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-privatenames-multi-line.js34
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-special-prototype-accessor-meth-valid.js58
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-special-prototype-async-gen-meth-valid.js51
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-special-prototype-async-meth-valid.js51
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-special-prototype-gen-meth-valid.js51
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-special-prototype-meth-valid.js51
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-static-ctor-accessor-meth-valid.js32
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-static-ctor-async-gen-meth-valid.js31
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-static-ctor-async-meth-valid.js31
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-static-ctor-gen-meth-valid.js31
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-static-ctor-meth-valid.js31
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-static-private-async-gen-meth-prototype.js22
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-static-private-async-meth-prototype.js22
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-static-private-gen-meth-prototype.js22
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-static-private-meth-prototype.js22
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/valid/shell.js0
-rw-r--r--js/src/tests/test262/language/statements/class/elements/ternary-init-err-contains-arguments.js35
-rw-r--r--js/src/tests/test262/language/statements/class/elements/ternary-init-err-contains-super.js28
-rw-r--r--js/src/tests/test262/language/statements/class/elements/typeof-init-err-contains-arguments.js35
-rw-r--r--js/src/tests/test262/language/statements/class/elements/typeof-init-err-contains-super.js28
-rw-r--r--js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-computed-names.js96
-rw-r--r--js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-computed-symbol-names.js94
-rw-r--r--js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-grammar-privatename-identifier-semantics-stringvalue.js97
-rw-r--r--js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-literal-names-asi.js66
-rw-r--r--js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-literal-names.js85
-rw-r--r--js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-private-field-usage.js37
-rw-r--r--js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-private-method-getter-usage.js37
-rw-r--r--js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-private-method-usage.js37
-rw-r--r--js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-private-names.js59
-rw-r--r--js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-field-identifier-initializer.js75
-rw-r--r--js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-field-identifier.js82
-rw-r--r--js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-private-getter-alt.js116
-rw-r--r--js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-private-getter.js116
-rw-r--r--js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-private-method-alt.js115
-rw-r--r--js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-private-method.js115
-rw-r--r--js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-private-setter-alt.js115
-rw-r--r--js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-private-setter.js115
-rw-r--r--js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-privatename-identifier-alt.js97
-rw-r--r--js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-privatename-identifier-initializer-alt.js91
-rw-r--r--js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-privatename-identifier-initializer.js91
-rw-r--r--js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-privatename-identifier.js97
-rw-r--r--js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-static-async-generator-method-privatename-identifier-alt.js122
-rw-r--r--js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-static-async-generator-method-privatename-identifier.js123
-rw-r--r--js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-static-async-method-privatename-identifier-alt.js122
-rw-r--r--js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-static-async-method-privatename-identifier.js123
-rw-r--r--js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-static-generator-method-privatename-identifier-alt.js112
-rw-r--r--js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-static-generator-method-privatename-identifier.js113
-rw-r--r--js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-static-method-privatename-identifier-alt.js110
-rw-r--r--js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-static-method-privatename-identifier.js110
-rw-r--r--js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-static-privatename-identifier-alt-by-classname.js98
-rw-r--r--js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-static-privatename-identifier-alt.js98
-rw-r--r--js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-static-privatename-identifier-by-classname.js98
-rw-r--r--js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-static-privatename-identifier-initializer-alt-by-classname.js92
-rw-r--r--js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-static-privatename-identifier-initializer-alt.js92
-rw-r--r--js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-static-privatename-identifier-initializer.js92
-rw-r--r--js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-static-privatename-identifier.js98
-rw-r--r--js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-static-private-fields.js59
-rw-r--r--js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-static-private-methods-with-fields.js76
-rw-r--r--js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-static-private-methods.js63
-rw-r--r--js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-string-literal-names.js98
1562 files changed, 122998 insertions, 0 deletions
diff --git a/js/src/tests/test262/language/statements/class/elements/abrupt-completition-on-field-initializer.js b/js/src/tests/test262/language/statements/class/elements/abrupt-completition-on-field-initializer.js
new file mode 100644
index 0000000000..e2ea7199ab
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/abrupt-completition-on-field-initializer.js
@@ -0,0 +1,55 @@
+// Copyright (C) 2019 Caio Lima (Igalia SL). All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: If an initializer returns an abrupt completion, other initializers should not execute
+esid: sec-ecmascript-function-objects-construct-argumentslist-newtarget
+info: |
+ [[Construct]] ( argumentsList, newTarget)
+ ...
+ 8. If kind is "base", then
+ a. Perform OrdinaryCallBindThis(F, calleeContext, thisArgument).
+ b. Let result be InitializeInstanceFields(thisArgument, F).
+ c. If result is an abrupt completion, then
+ i. Remove calleeContext from execution context stack and restore callerContext as the running execution context.
+ ii. Return Completion(result).
+ ...
+
+ ClassTail : ClassHeritage { ClassBody }
+ ...
+ 34. For each item fieldRecord in order from staticFields,
+ a. Perform ? DefineField(F, field).
+ ...
+
+features: [class-fields-public, class-static-fields-public, class]
+---*/
+
+function abruptCompletion() {
+ throw new Test262Error();
+}
+
+let neverExecuted = false;
+
+function sideEffect() {
+ neverExecuted = true;
+}
+
+class C {
+ a = abruptCompletion();
+ b = sideEffect();
+}
+
+assert.throws(Test262Error, function() {
+ let c = new C();
+}, 'field initializer should end with abrupt completion');
+assert.sameValue(neverExecuted, false);
+
+assert.throws(Test262Error, function() {
+ class D {
+ static a = abruptCompletion();
+ static b = sideEffect();
+ }
+}, 'static field initializer should end with abrupt completion');
+assert.sameValue(neverExecuted, false);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-computed-names.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-computed-names.js
new file mode 100644
index 0000000000..c058f478e6
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-computed-names.js
@@ -0,0 +1,107 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/computed-names.case
+// - src/class-elements/productions/cls-decl-after-same-line-gen.template
+/*---
+description: Computed property names (field definitions after a generator in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-public, computed-property-names, generators, class]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement:
+ ...
+ FieldDefinition ;
+
+ FieldDefinition:
+ ClassElementName Initializer_opt
+
+ ClassElementName:
+ PropertyName
+
+---*/
+var x = "b";
+
+
+
+class C {
+ *m() { return 42; } [x] = 42; [10] = "meep"; ["not initialized"];
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "b"),
+ "b doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "b"),
+ "b doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "b", {
+ value: 42,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "x"),
+ "x doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "x"),
+ "x doesn't appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "x"),
+ "x doesn't appear as an own property on C instance"
+);
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "10"),
+ "10 doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "10"),
+ "10 doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "10", {
+ value: "meep",
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "not initialized"),
+ "'not initialized' doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "not initialized"),
+ "'not initialized' doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "not initialized", {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-computed-symbol-names.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-computed-symbol-names.js
new file mode 100644
index 0000000000..173e0ce9df
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-computed-symbol-names.js
@@ -0,0 +1,105 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/computed-symbol-names.case
+// - src/class-elements/productions/cls-decl-after-same-line-gen.template
+/*---
+description: Computed property symbol names (field definitions after a generator in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-public, Symbol, computed-property-names, generators, class]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement:
+ ...
+ FieldDefinition ;
+
+ FieldDefinition:
+ ClassElementName Initializer_opt
+
+ ClassElementName:
+ PropertyName
+
+---*/
+var x = Symbol();
+var y = Symbol();
+
+
+
+class C {
+ *m() { return 42; } [x]; [y] = 42;
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, x),
+ "Symbol x doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, x),
+ "Symbol x doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, x, {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, y),
+ "Symbol y doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, y),
+ "Symbol y doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, y, {
+ value: 42,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "x"),
+ "x doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "x"),
+ "x doesn't appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "x"),
+ "x doesn't appear as an own property on C instance"
+);
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "y"),
+ "y doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "y"),
+ "y doesn't appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "y"),
+ "y doesn't appear as an own property on C instance"
+);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-grammar-privatename-identifier-semantics-stringvalue.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-grammar-privatename-identifier-semantics-stringvalue.js
new file mode 100644
index 0000000000..52c1458c45
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-grammar-privatename-identifier-semantics-stringvalue.js
@@ -0,0 +1,109 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-privatename-identifier-semantics-stringvalue.case
+// - src/class-elements/productions/cls-decl-after-same-line-gen.template
+/*---
+description: PrivateName Static Semantics, StringValue (field definitions after a generator in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-private, generators, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+
+ 1. Return the String value consisting of the sequence of code
+ units corresponding to PrivateName. In determining the sequence
+ any occurrences of \ UnicodeEscapeSequence are first replaced
+ with the code point represented by the UnicodeEscapeSequence
+ and then the code points of the entire PrivateName are converted
+ to code units by UTF16Encoding (10.1.1) each code point.
+
+---*/
+
+
+class C {
+ *m() { return 42; } #\u{6F};
+ #\u2118;
+ #ZW_\u200C_NJ;
+ #ZW_\u200D_J;;
+ o(value) {
+ this.#o = value;
+ return this.#o;
+ }
+ ℘(value) {
+ this.#℘ = value;
+ return this.#℘;
+ }
+ ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS METHOD
+ this.#ZW_‌_NJ = value;
+ return this.#ZW_‌_NJ;
+ }
+ ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS METHOD
+ this.#ZW_‍_J = value;
+ return this.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.o(1), 1);
+assert.sameValue(c.℘(1), 1);
+assert.sameValue(c.ZW_‌_NJ(1), 1);
+assert.sameValue(c.ZW_‍_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-literal-names-asi.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-literal-names-asi.js
new file mode 100644
index 0000000000..a1b21dfe49
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-literal-names-asi.js
@@ -0,0 +1,77 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/literal-names-asi.case
+// - src/class-elements/productions/cls-decl-after-same-line-gen.template
+/*---
+description: Literal property names with ASI (field definitions after a generator in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-public, generators, class]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement:
+ ...
+ FieldDefinition ;
+
+ FieldDefinition:
+ ClassElementName Initializer_opt
+
+ ClassElementName:
+ PropertyName
+
+---*/
+
+
+class C {
+ *m() { return 42; } a
+ b = 42;;
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "a"),
+ "a doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "a"),
+ "a doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "a", {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "b"),
+ "b doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "b"),
+ "b doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "b", {
+ value: 42,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-literal-names.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-literal-names.js
new file mode 100644
index 0000000000..41e2472d2f
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-literal-names.js
@@ -0,0 +1,96 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/literal-names.case
+// - src/class-elements/productions/cls-decl-after-same-line-gen.template
+/*---
+description: Literal property names (field definitions after a generator in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-public, generators, class]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement:
+ ...
+ FieldDefinition ;
+
+ FieldDefinition:
+ ClassElementName Initializer_opt
+
+ ClassElementName:
+ PropertyName
+
+---*/
+const fn = function() {}
+
+
+
+class C {
+ *m() { return 42; } a; b = 42;
+ c = fn;
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "a"),
+ "a doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "a"),
+ "a doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "a", {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "b"),
+ "b doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "b"),
+ "b doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "b", {
+ value: 42,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "c"),
+ "c doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "c"),
+ "c doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "c", {
+ value: fn,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-private-field-usage.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-private-field-usage.js
new file mode 100644
index 0000000000..fc35a281db
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-private-field-usage.js
@@ -0,0 +1,49 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-field-usage.case
+// - src/class-elements/productions/cls-decl-after-same-line-gen.template
+/*---
+description: PrivateName CallExpression usage (private field) (field definitions after a generator in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-private, generators, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ Updated Productions
+
+ CallExpression[Yield, Await]:
+ CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+ SuperCall[?Yield, ?Await]
+ CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+ CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+ CallExpression[?Yield, ?Await].IdentifierName
+ CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+ CallExpression[?Yield, ?Await].PrivateName
+
+---*/
+
+
+class C {
+ *m() { return 42; } #m = 'test262';;
+ method() {
+ return this.#m;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.method(), 'test262');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-private-method-getter-usage.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-private-method-getter-usage.js
new file mode 100644
index 0000000000..fcc9a1ae25
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-private-method-getter-usage.js
@@ -0,0 +1,49 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-method-getter-usage.case
+// - src/class-elements/productions/cls-decl-after-same-line-gen.template
+/*---
+description: PrivateName CallExpression usage (Accesor get method) (field definitions after a generator in the same line)
+esid: prod-FieldDefinition
+features: [class-methods-private, generators, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ Updated Productions
+
+ CallExpression[Yield, Await]:
+ CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+ SuperCall[?Yield, ?Await]
+ CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+ CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+ CallExpression[?Yield, ?Await].IdentifierName
+ CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+ CallExpression[?Yield, ?Await].PrivateName
+
+---*/
+
+
+class C {
+ *m() { return 42; } get #m() { return 'test262'; };
+ method() {
+ return this.#m;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.method(), 'test262');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-private-method-usage.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-private-method-usage.js
new file mode 100644
index 0000000000..bc73bd1d89
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-private-method-usage.js
@@ -0,0 +1,49 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-method-usage.case
+// - src/class-elements/productions/cls-decl-after-same-line-gen.template
+/*---
+description: PrivateName CallExpression usage (private method) (field definitions after a generator in the same line)
+esid: prod-FieldDefinition
+features: [class-methods-private, generators, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ Updated Productions
+
+ CallExpression[Yield, Await]:
+ CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+ SuperCall[?Yield, ?Await]
+ CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+ CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+ CallExpression[?Yield, ?Await].IdentifierName
+ CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+ CallExpression[?Yield, ?Await].PrivateName
+
+---*/
+
+
+class C {
+ *m() { return 42; } #m() { return 'test262'; };
+ method() {
+ return this.#m();
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.method(), 'test262');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-private-names.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-private-names.js
new file mode 100644
index 0000000000..7dd4170fea
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-private-names.js
@@ -0,0 +1,71 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-names.case
+// - src/class-elements/productions/cls-decl-after-same-line-gen.template
+/*---
+description: private names (field definitions after a generator in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-private, generators, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ FieldDefinition ;
+
+ FieldDefinition :
+ ClassElementName Initializer_opt
+
+ ClassElementName :
+ PrivateName
+
+ PrivateName :
+ # IdentifierName
+
+---*/
+
+
+class C {
+ *m() { return 42; } #x; #y;
+ x() {
+ this.#x = 42;
+ return this.#x;
+ }
+ y() {
+ this.#y = 43;
+ return this.#y;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+// Test the private fields do not appear as properties before set to value
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#x"), "test 1");
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 2");
+assert(!Object.prototype.hasOwnProperty.call(c, "#x"), "test 3");
+
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#y"), "test 4");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 5");
+assert(!Object.prototype.hasOwnProperty.call(c, "#y"), "test 6");
+
+// Test if private fields can be sucessfully accessed and set to value
+assert.sameValue(c.x(), 42, "test 7");
+assert.sameValue(c.y(), 43, "test 8");
+
+// Test the private fields do not appear as properties before after set to value
+assert(!Object.prototype.hasOwnProperty.call(c, "#x"), "test 9");
+assert(!Object.prototype.hasOwnProperty.call(c, "#y"), "test 10");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-field-identifier-initializer.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-field-identifier-initializer.js
new file mode 100644
index 0000000000..172ea6f780
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-field-identifier-initializer.js
@@ -0,0 +1,87 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-field-identifier-initializer.case
+// - src/class-elements/productions/cls-decl-after-same-line-gen.template
+/*---
+description: Valid FieldDefinition (field definitions after a generator in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-public, generators, class]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+
+ PropertyName :
+ LiteralPropertyName
+ ComputedPropertyName
+
+ LiteralPropertyName :
+ IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ *m() { return 42; } $ = 1; _ = 1; \u{6F} = 1; \u2118 = 1; ZW_\u200C_NJ = 1; ZW_\u200D_J = 1;
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$, 1);
+assert.sameValue(c._, 1);
+assert.sameValue(c.\u{6F}, 1);
+assert.sameValue(c.\u2118, 1);
+assert.sameValue(c.ZW_\u200C_NJ, 1);
+assert.sameValue(c.ZW_\u200D_J, 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-field-identifier.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-field-identifier.js
new file mode 100644
index 0000000000..cb7c71f67a
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-field-identifier.js
@@ -0,0 +1,94 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-field-identifier.case
+// - src/class-elements/productions/cls-decl-after-same-line-gen.template
+/*---
+description: Valid FieldDefinition (field definitions after a generator in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-public, generators, class]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+
+ PropertyName :
+ LiteralPropertyName
+ ComputedPropertyName
+
+ LiteralPropertyName :
+ IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ *m() { return 42; } $; _; \u{6F}; \u2118; ZW_\u200C_NJ; ZW_\u200D_J;
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+c.$ = 1;
+c._ = 1;
+c.\u{6F} = 1;
+c.\u2118 = 1;
+c.ZW_\u200C_NJ = 1;
+c.ZW_\u200D_J = 1;
+
+assert.sameValue(c.$, 1);
+assert.sameValue(c._, 1);
+assert.sameValue(c.\u{6F}, 1);
+assert.sameValue(c.\u2118, 1);
+assert.sameValue(c.ZW_\u200C_NJ, 1);
+assert.sameValue(c.ZW_\u200D_J, 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-private-getter-alt.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-private-getter-alt.js
new file mode 100644
index 0000000000..696990eecd
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-private-getter-alt.js
@@ -0,0 +1,128 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-getter-alt.case
+// - src/class-elements/productions/cls-decl-after-same-line-gen.template
+/*---
+description: Valid PrivateName as private getter (field definitions after a generator in the same line)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, generators, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ...
+ get ClassElementName ( ){ FunctionBody }
+ ...
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ *m() { return 42; } #$_; #__; #\u{6F}_; #℘_; #ZW_‌_NJ_; #ZW_‍_J_;
+ get #$() {
+ return this.#$_;
+ }
+ get #_() {
+ return this.#__;
+ }
+ get #\u{6F}() {
+ return this.#\u{6F}_;
+ }
+ get #℘() {
+ return this.#℘_;
+ }
+ get #ZW_‌_NJ() {
+ return this.#ZW_‌_NJ_;
+ }
+ get #ZW_‍_J() {
+ return this.#ZW_‍_J_;
+ }
+;
+ $(value) {
+ this.#$_ = value;
+ return this.#$;
+ }
+ _(value) {
+ this.#__ = value;
+ return this.#_;
+ }
+ \u{6F}(value) {
+ this.#\u{6F}_ = value;
+ return this.#\u{6F};
+ }
+ ℘(value) {
+ this.#℘_ = value;
+ return this.#℘;
+ }
+ ZW_‌_NJ(value) {
+ this.#ZW_‌_NJ_ = value;
+ return this.#ZW_‌_NJ;
+ }
+ ZW_‍_J(value) {
+ this.#ZW_‍_J_ = value;
+ return this.#ZW_‍_J;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.℘(1), 1);
+assert.sameValue(c.ZW_‌_NJ(1), 1);
+assert.sameValue(c.ZW_‍_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-private-getter.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-private-getter.js
new file mode 100644
index 0000000000..93a9435e91
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-private-getter.js
@@ -0,0 +1,128 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-getter.case
+// - src/class-elements/productions/cls-decl-after-same-line-gen.template
+/*---
+description: Valid PrivateName as private getter (field definitions after a generator in the same line)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, generators, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ...
+ get ClassElementName ( ){ FunctionBody }
+ ...
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ *m() { return 42; } #$_; #__; #\u{6F}_; #\u2118_; #ZW_\u200C_NJ_; #ZW_\u200D_J_;
+ get #$() {
+ return this.#$_;
+ }
+ get #_() {
+ return this.#__;
+ }
+ get #\u{6F}() {
+ return this.#\u{6F}_;
+ }
+ get #\u2118() {
+ return this.#\u2118_;
+ }
+ get #ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ_;
+ }
+ get #ZW_\u200D_J() {
+ return this.#ZW_\u200D_J_;
+ }
+;
+ $(value) {
+ this.#$_ = value;
+ return this.#$;
+ }
+ _(value) {
+ this.#__ = value;
+ return this.#_;
+ }
+ \u{6F}(value) {
+ this.#\u{6F}_ = value;
+ return this.#\u{6F};
+ }
+ \u2118(value) {
+ this.#\u2118_ = value;
+ return this.#\u2118;
+ }
+ ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ_ = value;
+ return this.#ZW_\u200C_NJ;
+ }
+ ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J_ = value;
+ return this.#ZW_\u200D_J;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.\u2118(1), 1);
+assert.sameValue(c.ZW_\u200C_NJ(1), 1);
+assert.sameValue(c.ZW_\u200D_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-private-method-alt.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-private-method-alt.js
new file mode 100644
index 0000000000..6992d38b0f
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-private-method-alt.js
@@ -0,0 +1,127 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-method-alt.case
+// - src/class-elements/productions/cls-decl-after-same-line-gen.template
+/*---
+description: Valid PrivateName as private method (field definitions after a generator in the same line)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, generators, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ClassElementName ( UniqueFormalParameters ) { FunctionBody }
+ ...
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ *m() { return 42; } #$_; #__; #\u{6F}_; #℘_; #ZW_‌_NJ_; #ZW_‍_J_;
+ #$() {
+ return this.#$_;
+ }
+ #_() {
+ return this.#__;
+ }
+ #\u{6F}() {
+ return this.#\u{6F}_;
+ }
+ #℘() {
+ return this.#℘_;
+ }
+ #ZW_‌_NJ() {
+ return this.#ZW_‌_NJ_;
+ }
+ #ZW_‍_J() {
+ return this.#ZW_‍_J_;
+ }
+;
+ $(value) {
+ this.#$_ = value;
+ return this.#$();
+ }
+ _(value) {
+ this.#__ = value;
+ return this.#_();
+ }
+ \u{6F}(value) {
+ this.#\u{6F}_ = value;
+ return this.#\u{6F}();
+ }
+ ℘(value) {
+ this.#℘_ = value;
+ return this.#℘();
+ }
+ ZW_‌_NJ(value) {
+ this.#ZW_‌_NJ_ = value;
+ return this.#ZW_‌_NJ();
+ }
+ ZW_‍_J(value) {
+ this.#ZW_‍_J_ = value;
+ return this.#ZW_‍_J();
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.℘(1), 1);
+assert.sameValue(c.ZW_‌_NJ(1), 1);
+assert.sameValue(c.ZW_‍_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-private-method.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-private-method.js
new file mode 100644
index 0000000000..8029c97052
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-private-method.js
@@ -0,0 +1,127 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-method.case
+// - src/class-elements/productions/cls-decl-after-same-line-gen.template
+/*---
+description: Valid PrivateName as private method (field definitions after a generator in the same line)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, generators, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ClassElementName ( UniqueFormalParameters ) { FunctionBody }
+ ...
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ *m() { return 42; } #$_; #__; #\u{6F}_; #\u2118_; #ZW_\u200C_NJ_; #ZW_\u200D_J_;
+ #$() {
+ return this.#$_;
+ }
+ #_() {
+ return this.#__;
+ }
+ #\u{6F}() {
+ return this.#\u{6F}_;
+ }
+ #\u2118() {
+ return this.#\u2118_;
+ }
+ #ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ_;
+ }
+ #ZW_\u200D_J() {
+ return this.#ZW_\u200D_J_;
+ }
+;
+ $(value) {
+ this.#$_ = value;
+ return this.#$();
+ }
+ _(value) {
+ this.#__ = value;
+ return this.#_();
+ }
+ \u{6F}(value) {
+ this.#\u{6F}_ = value;
+ return this.#\u{6F}();
+ }
+ \u2118(value) {
+ this.#\u2118_ = value;
+ return this.#\u2118();
+ }
+ ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ_ = value;
+ return this.#ZW_\u200C_NJ();
+ }
+ ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J_ = value;
+ return this.#ZW_\u200D_J();
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.\u2118(1), 1);
+assert.sameValue(c.ZW_\u200C_NJ(1), 1);
+assert.sameValue(c.ZW_\u200D_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-private-setter-alt.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-private-setter-alt.js
new file mode 100644
index 0000000000..dbcdb8e611
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-private-setter-alt.js
@@ -0,0 +1,127 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-setter-alt.case
+// - src/class-elements/productions/cls-decl-after-same-line-gen.template
+/*---
+description: Valid PrivateName as private setter (field definitions after a generator in the same line)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, generators, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ...
+ set ClassElementName ( PropertySetParameterList ) { FunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ *m() { return 42; } #$_; #__; #\u{6F}_; #℘_; #ZW_‌_NJ_; #ZW_‍_J_;
+ set #$(value) {
+ this.#$_ = value;
+ }
+ set #_(value) {
+ this.#__ = value;
+ }
+ set #\u{6F}(value) {
+ this.#\u{6F}_ = value;
+ }
+ set #℘(value) {
+ this.#℘_ = value;
+ }
+ set #ZW_‌_NJ(value) {
+ this.#ZW_‌_NJ_ = value;
+ }
+ set #ZW_‍_J(value) {
+ this.#ZW_‍_J_ = value;
+ }
+;
+ $(value) {
+ this.#$ = value;
+ return this.#$_;
+ }
+ _(value) {
+ this.#_ = value;
+ return this.#__;
+ }
+ \u{6F}(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F}_;
+ }
+ ℘(value) {
+ this.#℘ = value;
+ return this.#℘_;
+ }
+ ZW_‌_NJ(value) {
+ this.#ZW_‌_NJ = value;
+ return this.#ZW_‌_NJ_;
+ }
+ ZW_‍_J(value) {
+ this.#ZW_‍_J = value;
+ return this.#ZW_‍_J_;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.℘(1), 1);
+assert.sameValue(c.ZW_‌_NJ(1), 1);
+assert.sameValue(c.ZW_‍_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-private-setter.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-private-setter.js
new file mode 100644
index 0000000000..978c424473
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-private-setter.js
@@ -0,0 +1,127 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-setter.case
+// - src/class-elements/productions/cls-decl-after-same-line-gen.template
+/*---
+description: Valid PrivateName as private setter (field definitions after a generator in the same line)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, generators, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ...
+ set ClassElementName ( PropertySetParameterList ) { FunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ *m() { return 42; } #$_; #__; #\u{6F}_; #\u2118_; #ZW_\u200C_NJ_; #ZW_\u200D_J_;
+ set #$(value) {
+ this.#$_ = value;
+ }
+ set #_(value) {
+ this.#__ = value;
+ }
+ set #\u{6F}(value) {
+ this.#\u{6F}_ = value;
+ }
+ set #\u2118(value) {
+ this.#\u2118_ = value;
+ }
+ set #ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ_ = value;
+ }
+ set #ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J_ = value;
+ }
+;
+ $(value) {
+ this.#$ = value;
+ return this.#$_;
+ }
+ _(value) {
+ this.#_ = value;
+ return this.#__;
+ }
+ \u{6F}(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F}_;
+ }
+ \u2118(value) {
+ this.#\u2118 = value;
+ return this.#\u2118_;
+ }
+ ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ = value;
+ return this.#ZW_\u200C_NJ_;
+ }
+ ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J = value;
+ return this.#ZW_\u200D_J_;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.\u2118(1), 1);
+assert.sameValue(c.ZW_\u200C_NJ(1), 1);
+assert.sameValue(c.ZW_\u200D_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-privatename-identifier-alt.js
new file mode 100644
index 0000000000..56913af500
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-privatename-identifier-alt.js
@@ -0,0 +1,109 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-after-same-line-gen.template
+/*---
+description: Valid PrivateName (field definitions after a generator in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-private, generators, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ *m() { return 42; } #$; #_; #\u{6F}; #℘; #ZW_‌_NJ; #ZW_‍_J;
+ $(value) {
+ this.#$ = value;
+ return this.#$;
+ }
+ _(value) {
+ this.#_ = value;
+ return this.#_;
+ }
+ \u{6F}(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F};
+ }
+ ℘(value) {
+ this.#℘ = value;
+ return this.#℘;
+ }
+ ZW_‌_NJ(value) {
+ this.#ZW_‌_NJ = value;
+ return this.#ZW_‌_NJ;
+ }
+ ZW_‍_J(value) {
+ this.#ZW_‍_J = value;
+ return this.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.℘(1), 1);
+assert.sameValue(c.ZW_‌_NJ(1), 1);
+assert.sameValue(c.ZW_‍_J(1), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-privatename-identifier-initializer-alt.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-privatename-identifier-initializer-alt.js
new file mode 100644
index 0000000000..531b66c1cd
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-privatename-identifier-initializer-alt.js
@@ -0,0 +1,103 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-privatename-identifier-initializer-alt.case
+// - src/class-elements/productions/cls-decl-after-same-line-gen.template
+/*---
+description: Valid PrivateName (field definitions after a generator in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-private, generators, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ *m() { return 42; } #$ = 1; #_ = 1; #\u{6F} = 1; #℘ = 1; #ZW_‌_NJ = 1; #ZW_‍_J = 1;
+ $() {
+ return this.#$;
+ }
+ _() {
+ return this.#_;
+ }
+ \u{6F}() {
+ return this.#\u{6F};
+ }
+ ℘() {
+ return this.#℘;
+ }
+ ZW_‌_NJ() {
+ return this.#ZW_‌_NJ;
+ }
+ ZW_‍_J() {
+ return this.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(), 1);
+assert.sameValue(c._(), 1);
+assert.sameValue(c.\u{6F}(), 1);
+assert.sameValue(c.℘(), 1);
+assert.sameValue(c.ZW_‌_NJ(), 1);
+assert.sameValue(c.ZW_‍_J(), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-privatename-identifier-initializer.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-privatename-identifier-initializer.js
new file mode 100644
index 0000000000..e46db7f945
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-privatename-identifier-initializer.js
@@ -0,0 +1,103 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-privatename-identifier-initializer.case
+// - src/class-elements/productions/cls-decl-after-same-line-gen.template
+/*---
+description: Valid PrivateName (field definitions after a generator in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-private, generators, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ *m() { return 42; } #$ = 1; #_ = 1; #\u{6F} = 1; #\u2118 = 1; #ZW_\u200C_NJ = 1; #ZW_\u200D_J = 1;
+ $() {
+ return this.#$;
+ }
+ _() {
+ return this.#_;
+ }
+ \u{6F}() {
+ return this.#\u{6F};
+ }
+ \u2118() {
+ return this.#\u2118;
+ }
+ ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ;
+ }
+ ZW_\u200D_J() {
+ return this.#ZW_\u200D_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(), 1);
+assert.sameValue(c._(), 1);
+assert.sameValue(c.\u{6F}(), 1);
+assert.sameValue(c.\u2118(), 1);
+assert.sameValue(c.ZW_\u200C_NJ(), 1);
+assert.sameValue(c.ZW_\u200D_J(), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-privatename-identifier.js
new file mode 100644
index 0000000000..df7ed6d89c
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-privatename-identifier.js
@@ -0,0 +1,109 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-after-same-line-gen.template
+/*---
+description: Valid PrivateName (field definitions after a generator in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-private, generators, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ *m() { return 42; } #$; #_; #\u{6F}; #\u2118; #ZW_\u200C_NJ; #ZW_\u200D_J;
+ $(value) {
+ this.#$ = value;
+ return this.#$;
+ }
+ _(value) {
+ this.#_ = value;
+ return this.#_;
+ }
+ \u{6F}(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F};
+ }
+ \u2118(value) {
+ this.#\u2118 = value;
+ return this.#\u2118;
+ }
+ ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ = value;
+ return this.#ZW_\u200C_NJ;
+ }
+ ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J = value;
+ return this.#ZW_\u200D_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.\u2118(1), 1);
+assert.sameValue(c.ZW_\u200C_NJ(1), 1);
+assert.sameValue(c.ZW_\u200D_J(1), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js
new file mode 100644
index 0000000000..8210868664
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js
@@ -0,0 +1,134 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-async-generator-method-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-after-same-line-gen.template
+/*---
+description: Valid Static AsyncGeneratorMethod PrivateName (field definitions after a generator in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, generators, class, class-fields-public]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ *m() { return 42; } static async * #$(value) {
+ yield * await value;
+ }
+ static async * #_(value) {
+ yield * await value;
+ }
+ static async * #o(value) {
+ yield * await value;
+ }
+ static async * #℘(value) {
+ yield * await value;
+ }
+ static async * #ZW_‌_NJ(value) {
+ yield * await value;
+ }
+ static async * #ZW_‍_J(value) {
+ yield * await value;
+ };
+ static get $() {
+ return this.#$;
+ }
+ static get _() {
+ return this.#_;
+ }
+ static get o() {
+ return this.#o;
+ }
+ static get ℘() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#℘;
+ }
+ static get ZW_‌_NJ() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‌_NJ;
+ }
+ static get ZW_‍_J() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‍_J;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+Promise.all([
+ C.$([1]).next(),
+ C._([1]).next(),
+ C.o([1]).next(),
+ C.℘([1]).next(), // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.ZW_‌_NJ([1]).next(), // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.ZW_‍_J([1]).next(), // DO NOT CHANGE THE NAME OF THIS FIELD
+]).then(results => {
+
+ assert.sameValue(results[0].value, 1);
+ assert.sameValue(results[1].value, 1);
+ assert.sameValue(results[2].value, 1);
+ assert.sameValue(results[3].value, 1);
+ assert.sameValue(results[4].value, 1);
+ assert.sameValue(results[5].value, 1);
+
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-static-async-generator-method-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-static-async-generator-method-privatename-identifier.js
new file mode 100644
index 0000000000..a25cdabbb8
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-static-async-generator-method-privatename-identifier.js
@@ -0,0 +1,135 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-async-generator-method-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-after-same-line-gen.template
+/*---
+description: Valid Static AsyncGeneratorMethod PrivateName (field definitions after a generator in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, generators, class, class-fields-public]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ *m() { return 42; } static async * #$(value) {
+ yield * await value;
+ }
+ static async * #_(value) {
+ yield * await value;
+ }
+ static async * #\u{6F}(value) {
+ yield * await value;
+ }
+ static async * #\u2118(value) {
+ yield * await value;
+ }
+ static async * #ZW_\u200C_NJ(value) {
+ yield * await value;
+ }
+ static async * #ZW_\u200D_J(value) {
+ yield * await value;
+ };
+ static get $() {
+ return this.#$;
+ }
+ static get _() {
+ return this.#_;
+ }
+ static get \u{6F}() {
+ return this.#\u{6F};
+ }
+ static get \u2118() {
+ return this.#\u2118;
+ }
+ static get ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ;
+ }
+ static get ZW_\u200D_J() {
+ return this.#ZW_\u200D_J;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+Promise.all([
+ C.$([1]).next(),
+ C._([1]).next(),
+ C.\u{6F}([1]).next(),
+ C.\u2118([1]).next(),
+ C.ZW_\u200C_NJ([1]).next(),
+ C.ZW_\u200D_J([1]).next(),
+]).then(results => {
+
+ assert.sameValue(results[0].value, 1);
+ assert.sameValue(results[1].value, 1);
+ assert.sameValue(results[2].value, 1);
+ assert.sameValue(results[3].value, 1);
+ assert.sameValue(results[4].value, 1);
+ assert.sameValue(results[5].value, 1);
+
+}).then($DONE, $DONE);
+
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-static-async-method-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-static-async-method-privatename-identifier-alt.js
new file mode 100644
index 0000000000..ee67688f06
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-static-async-method-privatename-identifier-alt.js
@@ -0,0 +1,134 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-async-method-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-after-same-line-gen.template
+/*---
+description: Valid Static AsyncMethod PrivateName (field definitions after a generator in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, generators, class, class-fields-public]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ AsyncMethod
+
+ AsyncMethod :
+ async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ *m() { return 42; } static async #$(value) {
+ return await value;
+ }
+ static async #_(value) {
+ return await value;
+ }
+ static async #o(value) {
+ return await value;
+ }
+ static async #℘(value) {
+ return await value;
+ }
+ static async #ZW_‌_NJ(value) {
+ return await value;
+ }
+ static async #ZW_‍_J(value) {
+ return await value;
+ };
+ static async $(value) {
+ return await this.#$(value);
+ }
+ static async _(value) {
+ return await this.#_(value);
+ }
+ static async o(value) {
+ return await this.#o(value);
+ }
+ static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return await this.#℘(value);
+ }
+ static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return await this.#ZW_‌_NJ(value);
+ }
+ static async ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return await this.#ZW_‍_J(value);
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+Promise.all([
+ C.$(1),
+ C._(1),
+ C.o(1),
+ C.℘(1), // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.ZW_‌_NJ(1), // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.ZW_‍_J(1), // DO NOT CHANGE THE NAME OF THIS FIELD
+]).then(results => {
+
+ assert.sameValue(results[0], 1);
+ assert.sameValue(results[1], 1);
+ assert.sameValue(results[2], 1);
+ assert.sameValue(results[3], 1);
+ assert.sameValue(results[4], 1);
+ assert.sameValue(results[5], 1);
+
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-static-async-method-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-static-async-method-privatename-identifier.js
new file mode 100644
index 0000000000..ab0f8b9975
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-static-async-method-privatename-identifier.js
@@ -0,0 +1,135 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-async-method-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-after-same-line-gen.template
+/*---
+description: Valid Static AsyncMethod PrivateName (field definitions after a generator in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, generators, class, class-fields-public]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ AsyncMethod
+
+ AsyncMethod :
+ async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ *m() { return 42; } static async #$(value) {
+ return await value;
+ }
+ static async #_(value) {
+ return await value;
+ }
+ static async #\u{6F}(value) {
+ return await value;
+ }
+ static async #\u2118(value) {
+ return await value;
+ }
+ static async #ZW_\u200C_NJ(value) {
+ return await value;
+ }
+ static async #ZW_\u200D_J(value) {
+ return await value;
+ };
+ static async $(value) {
+ return await this.#$(value);
+ }
+ static async _(value) {
+ return await this.#_(value);
+ }
+ static async \u{6F}(value) {
+ return await this.#\u{6F}(value);
+ }
+ static async \u2118(value) {
+ return await this.#\u2118(value);
+ }
+ static async ZW_\u200C_NJ(value) {
+ return await this.#ZW_\u200C_NJ(value);
+ }
+ static async ZW_\u200D_J(value) {
+ return await this.#ZW_\u200D_J(value);
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+Promise.all([
+ C.$(1),
+ C._(1),
+ C.\u{6F}(1),
+ C.\u2118(1),
+ C.ZW_\u200C_NJ(1),
+ C.ZW_\u200D_J(1),
+]).then(results => {
+
+ assert.sameValue(results[0], 1);
+ assert.sameValue(results[1], 1);
+ assert.sameValue(results[2], 1);
+ assert.sameValue(results[3], 1);
+ assert.sameValue(results[4], 1);
+ assert.sameValue(results[5], 1);
+
+}).then($DONE, $DONE);
+
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-static-generator-method-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-static-generator-method-privatename-identifier-alt.js
new file mode 100644
index 0000000000..582f3c5241
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-static-generator-method-privatename-identifier-alt.js
@@ -0,0 +1,124 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-generator-method-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-after-same-line-gen.template
+/*---
+description: Valid Static GeneratorMethod PrivateName (field definitions after a generator in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, generators, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ GeneratorMethod
+
+ GeneratorMethod :
+ * ClassElementName ( UniqueFormalParameters ){ GeneratorBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ *m() { return 42; } static * #$(value) {
+ yield * value;
+ }
+ static * #_(value) {
+ yield * value;
+ }
+ static * #o(value) {
+ yield * value;
+ }
+ static * #℘(value) {
+ yield * value;
+ }
+ static * #ZW_‌_NJ(value) {
+ yield * value;
+ }
+ static * #ZW_‍_J(value) {
+ yield * value;
+ };
+ static get $() {
+ return this.#$;
+ }
+ static get _() {
+ return this.#_;
+ }
+ static get o() {
+ return this.#o;
+ }
+ static get ℘() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#℘;
+ }
+ static get ZW_‌_NJ() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‌_NJ;
+ }
+ static get ZW_‍_J() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‍_J;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$([1]).next().value, 1);
+assert.sameValue(C._([1]).next().value, 1);
+assert.sameValue(C.o([1]).next().value, 1);
+assert.sameValue(C.℘([1]).next().value, 1);
+assert.sameValue(C.ZW_‌_NJ([1]).next().value, 1);
+assert.sameValue(C.ZW_‍_J([1]).next().value, 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-static-generator-method-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-static-generator-method-privatename-identifier.js
new file mode 100644
index 0000000000..c9cdec139c
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-static-generator-method-privatename-identifier.js
@@ -0,0 +1,125 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-generator-method-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-after-same-line-gen.template
+/*---
+description: Valid Static GeneratorMethod PrivateName (field definitions after a generator in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, generators, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ GeneratorMethod
+
+ GeneratorMethod :
+ * ClassElementName ( UniqueFormalParameters ){ GeneratorBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ *m() { return 42; } static * #$(value) {
+ yield * value;
+ }
+ static * #_(value) {
+ yield * value;
+ }
+ static * #\u{6F}(value) {
+ yield * value;
+ }
+ static * #\u2118(value) {
+ yield * value;
+ }
+ static * #ZW_\u200C_NJ(value) {
+ yield * value;
+ }
+ static * #ZW_\u200D_J(value) {
+ yield * value;
+ };
+ static get $() {
+ return this.#$;
+ }
+ static get _() {
+ return this.#_;
+ }
+ static get \u{6F}() {
+ return this.#\u{6F};
+ }
+ static get \u2118() {
+ return this.#\u2118;
+ }
+ static get ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ;
+ }
+ static get ZW_\u200D_J() {
+ return this.#ZW_\u200D_J;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$([1]).next().value, 1);
+assert.sameValue(C._([1]).next().value, 1);
+assert.sameValue(C.\u{6F}([1]).next().value, 1);
+assert.sameValue(C.\u2118([1]).next().value, 1);
+assert.sameValue(C.ZW_\u200C_NJ([1]).next().value, 1);
+assert.sameValue(C.ZW_\u200D_J([1]).next().value, 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-static-method-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-static-method-privatename-identifier-alt.js
new file mode 100644
index 0000000000..a8dde27dbf
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-static-method-privatename-identifier-alt.js
@@ -0,0 +1,122 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-method-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-after-same-line-gen.template
+/*---
+description: Valid Static Method PrivateName (field definitions after a generator in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, generators, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ ClassElementName ( UniqueFormalParameters ){ FunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ *m() { return 42; } static #$(value) {
+ return value;
+ }
+ static #_(value) {
+ return value;
+ }
+ static #o(value) {
+ return value;
+ }
+ static #℘(value) {
+ return value;
+ }
+ static #ZW_‌_NJ(value) {
+ return value;
+ }
+ static #ZW_‍_J(value) {
+ return value;
+ };
+ static $(value) {
+ return this.#$(value);
+ }
+ static _(value) {
+ return this.#_(value);
+ }
+ static o(value) {
+ return this.#o(value);
+ }
+ static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#℘(value);
+ }
+ static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‌_NJ(value);
+ }
+ static ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‍_J(value);
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(1), 1);
+assert.sameValue(C._(1), 1);
+assert.sameValue(C.o(1), 1);
+assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+assert.sameValue(C.ZW_‌_NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+assert.sameValue(C.ZW_‍_J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-static-method-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-static-method-privatename-identifier.js
new file mode 100644
index 0000000000..fa198c8a53
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-static-method-privatename-identifier.js
@@ -0,0 +1,122 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-method-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-after-same-line-gen.template
+/*---
+description: Valid Static Method PrivateName (field definitions after a generator in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, generators, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ ClassElementName ( UniqueFormalParameters ){ FunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ *m() { return 42; } static #$(value) {
+ return value;
+ }
+ static #_(value) {
+ return value;
+ }
+ static #\u{6F}(value) {
+ return value;
+ }
+ static #\u2118(value) {
+ return value;
+ }
+ static #ZW_\u200C_NJ(value) {
+ return value;
+ }
+ static #ZW_\u200D_J(value) {
+ return value;
+ };
+ static $(value) {
+ return this.#$(value);
+ }
+ static _(value) {
+ return this.#_(value);
+ }
+ static \u{6F}(value) {
+ return this.#\u{6F}(value);
+ }
+ static \u2118(value) {
+ return this.#\u2118(value);
+ }
+ static ZW_\u200C_NJ(value) {
+ return this.#ZW_\u200C_NJ(value);
+ }
+ static ZW_\u200D_J(value) {
+ return this.#ZW_\u200D_J(value);
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(1), 1);
+assert.sameValue(C._(1), 1);
+assert.sameValue(C.\u{6F}(1), 1);
+assert.sameValue(C.\u2118(1), 1);
+assert.sameValue(C.ZW_\u200C_NJ(1), 1);
+assert.sameValue(C.ZW_\u200D_J(1), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-static-privatename-identifier-alt-by-classname.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-static-privatename-identifier-alt-by-classname.js
new file mode 100644
index 0000000000..9e74a42de8
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-static-privatename-identifier-alt-by-classname.js
@@ -0,0 +1,110 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-alt-by-classname.case
+// - src/class-elements/productions/cls-decl-after-same-line-gen.template
+/*---
+description: Valid Static PrivateName (field definitions after a generator in the same line)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, generators, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ *m() { return 42; } static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_‍_J;
+ static $(value) {
+ C.#$ = value;
+ return C.#$;
+ }
+ static _(value) {
+ C.#_ = value;
+ return C.#_;
+ }
+ static o(value) {
+ C.#\u{6F} = value;
+ return C.#\u{6F};
+ }
+ static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.#℘ = value;
+ return C.#℘;
+ }
+ static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.#ZW_‌_NJ = value;
+ return C.#ZW_‌_NJ;
+ }
+ static ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.#ZW_‍_J = value;
+ return C.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(1), 1);
+assert.sameValue(C._(1), 1);
+assert.sameValue(C.o(1), 1);
+assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+assert.sameValue(C.ZW_‌_NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+assert.sameValue(C.ZW_‍_J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-static-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-static-privatename-identifier-alt.js
new file mode 100644
index 0000000000..cedc2876cd
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-static-privatename-identifier-alt.js
@@ -0,0 +1,110 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-after-same-line-gen.template
+/*---
+description: Valid Static PrivateName (field definitions after a generator in the same line)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, generators, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ *m() { return 42; } static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_‍_J;
+ static $(value) {
+ this.#$ = value;
+ return this.#$;
+ }
+ static _(value) {
+ this.#_ = value;
+ return this.#_;
+ }
+ static o(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F};
+ }
+ static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ this.#℘ = value;
+ return this.#℘;
+ }
+ static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ this.#ZW_‌_NJ = value;
+ return this.#ZW_‌_NJ;
+ }
+ static ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ this.#ZW_‍_J = value;
+ return this.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(1), 1);
+assert.sameValue(C._(1), 1);
+assert.sameValue(C.o(1), 1);
+assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+assert.sameValue(C.ZW_‌_NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+assert.sameValue(C.ZW_‍_J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-static-privatename-identifier-by-classname.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-static-privatename-identifier-by-classname.js
new file mode 100644
index 0000000000..1557b9651e
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-static-privatename-identifier-by-classname.js
@@ -0,0 +1,110 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-by-classname.case
+// - src/class-elements/productions/cls-decl-after-same-line-gen.template
+/*---
+description: Valid Static PrivateName (field definitions after a generator in the same line)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, generators, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ *m() { return 42; } static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J;
+ static $(value) {
+ C.#$ = value;
+ return C.#$;
+ }
+ static _(value) {
+ C.#_ = value;
+ return C.#_;
+ }
+ static \u{6F}(value) {
+ C.#\u{6F} = value;
+ return C.#\u{6F};
+ }
+ static \u2118(value) {
+ C.#\u2118 = value;
+ return C.#\u2118;
+ }
+ static ZW_\u200C_NJ(value) {
+ C.#ZW_\u200C_NJ = value;
+ return C.#ZW_\u200C_NJ;
+ }
+ static ZW_\u200D_J(value) {
+ C.#ZW_\u200D_J = value;
+ return C.#ZW_\u200D_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(1), 1);
+assert.sameValue(C._(1), 1);
+assert.sameValue(C.\u{6F}(1), 1);
+assert.sameValue(C.\u2118(1), 1);
+assert.sameValue(C.ZW_\u200C_NJ(1), 1);
+assert.sameValue(C.ZW_\u200D_J(1), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js
new file mode 100644
index 0000000000..4fd22ea158
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js
@@ -0,0 +1,104 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-initializer-alt-by-classname.case
+// - src/class-elements/productions/cls-decl-after-same-line-gen.template
+/*---
+description: Valid Static PrivateName (field definitions after a generator in the same line)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, generators, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ *m() { return 42; } static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_‍_J = 1;
+ static $() {
+ return C.#$;
+ }
+ static _() {
+ return C.#_;
+ }
+ static \u{6F}() {
+ return C.#\u{6F};
+ }
+ static ℘() {
+ return C.#℘;
+ }
+ static ZW_‌_NJ() {
+ return C.#ZW_‌_NJ;
+ }
+ static ZW_‍_J() {
+ return C.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(), 1);
+assert.sameValue(C._(), 1);
+assert.sameValue(C.\u{6F}(), 1);
+assert.sameValue(C.℘(), 1);
+assert.sameValue(C.ZW_‌_NJ(), 1);
+assert.sameValue(C.ZW_‍_J(), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-static-privatename-identifier-initializer-alt.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-static-privatename-identifier-initializer-alt.js
new file mode 100644
index 0000000000..4771398de9
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-static-privatename-identifier-initializer-alt.js
@@ -0,0 +1,104 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-initializer-alt.case
+// - src/class-elements/productions/cls-decl-after-same-line-gen.template
+/*---
+description: Valid Static PrivateName (field definitions after a generator in the same line)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, generators, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ *m() { return 42; } static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_‍_J = 1;
+ static $() {
+ return this.#$;
+ }
+ static _() {
+ return this.#_;
+ }
+ static \u{6F}() {
+ return this.#\u{6F};
+ }
+ static ℘() {
+ return this.#℘;
+ }
+ static ZW_‌_NJ() {
+ return this.#ZW_‌_NJ;
+ }
+ static ZW_‍_J() {
+ return this.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(), 1);
+assert.sameValue(C._(), 1);
+assert.sameValue(C.\u{6F}(), 1);
+assert.sameValue(C.℘(), 1);
+assert.sameValue(C.ZW_‌_NJ(), 1);
+assert.sameValue(C.ZW_‍_J(), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-static-privatename-identifier-initializer.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-static-privatename-identifier-initializer.js
new file mode 100644
index 0000000000..610964b743
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-static-privatename-identifier-initializer.js
@@ -0,0 +1,104 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-initializer.case
+// - src/class-elements/productions/cls-decl-after-same-line-gen.template
+/*---
+description: Valid Static PrivateName (field definitions after a generator in the same line)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, generators, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ *m() { return 42; } static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #\u2118 = 1; static #ZW_\u200C_NJ = 1; static #ZW_\u200D_J = 1;
+ static $() {
+ return this.#$;
+ }
+ static _() {
+ return this.#_;
+ }
+ static \u{6F}() {
+ return this.#\u{6F};
+ }
+ static \u2118() {
+ return this.#\u2118;
+ }
+ static ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ;
+ }
+ static ZW_\u200D_J() {
+ return this.#ZW_\u200D_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(), 1);
+assert.sameValue(C._(), 1);
+assert.sameValue(C.\u{6F}(), 1);
+assert.sameValue(C.\u2118(), 1);
+assert.sameValue(C.ZW_\u200C_NJ(), 1);
+assert.sameValue(C.ZW_\u200D_J(), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-static-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-static-privatename-identifier.js
new file mode 100644
index 0000000000..f6421e1262
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-rs-static-privatename-identifier.js
@@ -0,0 +1,110 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-after-same-line-gen.template
+/*---
+description: Valid Static PrivateName (field definitions after a generator in the same line)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, generators, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ *m() { return 42; } static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J;
+ static $(value) {
+ this.#$ = value;
+ return this.#$;
+ }
+ static _(value) {
+ this.#_ = value;
+ return this.#_;
+ }
+ static \u{6F}(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F};
+ }
+ static \u2118(value) {
+ this.#\u2118 = value;
+ return this.#\u2118;
+ }
+ static ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ = value;
+ return this.#ZW_\u200C_NJ;
+ }
+ static ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J = value;
+ return this.#ZW_\u200D_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(1), 1);
+assert.sameValue(C._(1), 1);
+assert.sameValue(C.\u{6F}(1), 1);
+assert.sameValue(C.\u2118(1), 1);
+assert.sameValue(C.ZW_\u200C_NJ(1), 1);
+assert.sameValue(C.ZW_\u200D_J(1), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-static-private-fields.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-static-private-fields.js
new file mode 100644
index 0000000000..cde71d4fb1
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-static-private-fields.js
@@ -0,0 +1,71 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/static-private-fields.case
+// - src/class-elements/productions/cls-decl-after-same-line-gen.template
+/*---
+description: static private fields (field definitions after a generator in the same line)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, generators, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ static FieldDefinition ;
+
+ FieldDefinition :
+ ClassElementName Initializer_opt
+
+ ClassElementName :
+ PrivateName
+
+ PrivateName :
+ # IdentifierName
+
+---*/
+
+
+class C {
+ *m() { return 42; } static #x; static #y;
+ static x() {
+ this.#x = 42;
+ return this.#x;
+ }
+ static y() {
+ this.#y = 43;
+ return this.#y;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+// Test the private fields do not appear as properties before set to value
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#x"), "test 1");
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 2");
+assert(!Object.prototype.hasOwnProperty.call(c, "#x"), "test 3");
+
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#y"), "test 4");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 5");
+assert(!Object.prototype.hasOwnProperty.call(c, "#y"), "test 6");
+
+// Test if private fields can be sucessfully accessed and set to value
+assert.sameValue(C.x(), 42, "test 7");
+assert.sameValue(C.y(), 43, "test 8");
+
+// Test the private fields do not appear as properties before after set to value
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 9");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 10");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-static-private-methods-with-fields.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-static-private-methods-with-fields.js
new file mode 100644
index 0000000000..7d8b009597
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-static-private-methods-with-fields.js
@@ -0,0 +1,88 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/static-private-methods-with-fields.case
+// - src/class-elements/productions/cls-decl-after-same-line-gen.template
+/*---
+description: static private methods with fields (field definitions after a generator in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class-static-fields-private, generators, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ static FieldDefinition ;
+
+ FieldDefinition :
+ ClassElementName Initializer_opt
+
+ ClassElementName :
+ PrivateName
+
+ PrivateName :
+ # IdentifierName
+
+---*/
+
+
+class C {
+ *m() { return 42; } static #xVal; static #yVal;
+ static #x(value) {
+ this.#xVal = value;
+ return this.#xVal;
+ }
+ static #y(value) {
+ this.#yVal = value;
+ return this.#yVal;
+ }
+ static x() {
+ return this.#x(42);
+ }
+ static y() {
+ return this.#y(43);
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+// Test the private methods do not appear as properties before set to value
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#x"), "test 1");
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 2");
+assert(!Object.prototype.hasOwnProperty.call(c, "#x"), "test 3");
+
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#y"), "test 4");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 5");
+assert(!Object.prototype.hasOwnProperty.call(c, "#y"), "test 6");
+
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#xVal"), "test 7");
+assert(!Object.prototype.hasOwnProperty.call(C, "#xVal"), "test 8");
+assert(!Object.prototype.hasOwnProperty.call(c, "#xVal"), "test 9");
+
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#yVal"), "test 10");
+assert(!Object.prototype.hasOwnProperty.call(C, "#yVal"), "test 11");
+assert(!Object.prototype.hasOwnProperty.call(c, "#yVal"), "test 12");
+
+// Test if private fields can be sucessfully accessed and set to value
+assert.sameValue(C.x(), 42, "test 13");
+assert.sameValue(C.y(), 43, "test 14");
+
+// Test the private fields do not appear as properties before after set to value
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 15");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 16");
+
+assert(!Object.prototype.hasOwnProperty.call(C, "#xVal"), "test 17");
+assert(!Object.prototype.hasOwnProperty.call(C, "#yVal"), "test 18");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-static-private-methods.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-static-private-methods.js
new file mode 100644
index 0000000000..c9c05cceb5
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-static-private-methods.js
@@ -0,0 +1,75 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/static-private-methods.case
+// - src/class-elements/productions/cls-decl-after-same-line-gen.template
+/*---
+description: static private methods (field definitions after a generator in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, generators, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ static FieldDefinition ;
+
+ FieldDefinition :
+ ClassElementName Initializer_opt
+
+ ClassElementName :
+ PrivateName
+
+ PrivateName :
+ # IdentifierName
+
+---*/
+
+
+class C {
+ *m() { return 42; } ;
+ static #x(value) {
+ return value / 2;
+ }
+ static #y(value) {
+ return value * 2;
+ }
+ static x() {
+ return this.#x(84);
+ }
+ static y() {
+ return this.#y(43);
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+// Test the private methods do not appear as properties before set to value
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#x"), "test 1");
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 2");
+assert(!Object.prototype.hasOwnProperty.call(c, "#x"), "test 3");
+
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#y"), "test 4");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 5");
+assert(!Object.prototype.hasOwnProperty.call(c, "#y"), "test 6");
+
+// Test if private fields can be sucessfully accessed and set to value
+assert.sameValue(C.x(), 42, "test 7");
+assert.sameValue(C.y(), 86, "test 8");
+
+// Test the private fields do not appear as properties before after set to value
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 9");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 10");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-string-literal-names.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-string-literal-names.js
new file mode 100644
index 0000000000..e3b392da02
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-gen-string-literal-names.js
@@ -0,0 +1,109 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/string-literal-names.case
+// - src/class-elements/productions/cls-decl-after-same-line-gen.template
+/*---
+description: String literal names (field definitions after a generator in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-public, generators, class]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement:
+ ...
+ FieldDefinition ;
+
+ FieldDefinition:
+ ClassElementName Initializer_opt
+
+ ClassElementName:
+ PropertyName
+
+---*/
+
+
+class C {
+ *m() { return 42; } 'a'; "b"; 'c' = 39;
+ "d" = 42;
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "a"),
+ "a does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "a"),
+ "a does not appear as an own property on C constructor"
+);
+
+verifyProperty(c, "a", {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "b"),
+ "b does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "b"),
+ "b does not appear as an own property on C constructor"
+);
+
+verifyProperty(c, "b", {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "c"),
+ "c does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "c"),
+ "c does not appear as an own property on C constructor"
+);
+
+verifyProperty(c, "c", {
+ value: 39,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "d"),
+ "d does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "d"),
+ "d does not appear as an own property on C constructor"
+);
+
+verifyProperty(c, "d", {
+ value: 42,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-method-computed-names.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-method-computed-names.js
new file mode 100644
index 0000000000..823d115970
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-method-computed-names.js
@@ -0,0 +1,107 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/computed-names.case
+// - src/class-elements/productions/cls-decl-after-same-line-method.template
+/*---
+description: Computed property names (field definitions after a method in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-public, computed-property-names, class]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement:
+ ...
+ FieldDefinition ;
+
+ FieldDefinition:
+ ClassElementName Initializer_opt
+
+ ClassElementName:
+ PropertyName
+
+---*/
+var x = "b";
+
+
+
+class C {
+ m() { return 42; } [x] = 42; [10] = "meep"; ["not initialized"];
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "b"),
+ "b doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "b"),
+ "b doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "b", {
+ value: 42,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "x"),
+ "x doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "x"),
+ "x doesn't appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "x"),
+ "x doesn't appear as an own property on C instance"
+);
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "10"),
+ "10 doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "10"),
+ "10 doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "10", {
+ value: "meep",
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "not initialized"),
+ "'not initialized' doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "not initialized"),
+ "'not initialized' doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "not initialized", {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-method-computed-symbol-names.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-method-computed-symbol-names.js
new file mode 100644
index 0000000000..807cdea551
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-method-computed-symbol-names.js
@@ -0,0 +1,105 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/computed-symbol-names.case
+// - src/class-elements/productions/cls-decl-after-same-line-method.template
+/*---
+description: Computed property symbol names (field definitions after a method in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-public, Symbol, computed-property-names, class]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement:
+ ...
+ FieldDefinition ;
+
+ FieldDefinition:
+ ClassElementName Initializer_opt
+
+ ClassElementName:
+ PropertyName
+
+---*/
+var x = Symbol();
+var y = Symbol();
+
+
+
+class C {
+ m() { return 42; } [x]; [y] = 42;
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, x),
+ "Symbol x doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, x),
+ "Symbol x doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, x, {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, y),
+ "Symbol y doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, y),
+ "Symbol y doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, y, {
+ value: 42,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "x"),
+ "x doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "x"),
+ "x doesn't appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "x"),
+ "x doesn't appear as an own property on C instance"
+);
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "y"),
+ "y doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "y"),
+ "y doesn't appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "y"),
+ "y doesn't appear as an own property on C instance"
+);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-method-grammar-privatename-identifier-semantics-stringvalue.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-method-grammar-privatename-identifier-semantics-stringvalue.js
new file mode 100644
index 0000000000..0269dc17de
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-method-grammar-privatename-identifier-semantics-stringvalue.js
@@ -0,0 +1,109 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-privatename-identifier-semantics-stringvalue.case
+// - src/class-elements/productions/cls-decl-after-same-line-method.template
+/*---
+description: PrivateName Static Semantics, StringValue (field definitions after a method in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+
+ 1. Return the String value consisting of the sequence of code
+ units corresponding to PrivateName. In determining the sequence
+ any occurrences of \ UnicodeEscapeSequence are first replaced
+ with the code point represented by the UnicodeEscapeSequence
+ and then the code points of the entire PrivateName are converted
+ to code units by UTF16Encoding (10.1.1) each code point.
+
+---*/
+
+
+class C {
+ m() { return 42; } #\u{6F};
+ #\u2118;
+ #ZW_\u200C_NJ;
+ #ZW_\u200D_J;;
+ o(value) {
+ this.#o = value;
+ return this.#o;
+ }
+ ℘(value) {
+ this.#℘ = value;
+ return this.#℘;
+ }
+ ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS METHOD
+ this.#ZW_‌_NJ = value;
+ return this.#ZW_‌_NJ;
+ }
+ ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS METHOD
+ this.#ZW_‍_J = value;
+ return this.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.o(1), 1);
+assert.sameValue(c.℘(1), 1);
+assert.sameValue(c.ZW_‌_NJ(1), 1);
+assert.sameValue(c.ZW_‍_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-method-literal-names-asi.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-method-literal-names-asi.js
new file mode 100644
index 0000000000..20c136ee2d
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-method-literal-names-asi.js
@@ -0,0 +1,77 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/literal-names-asi.case
+// - src/class-elements/productions/cls-decl-after-same-line-method.template
+/*---
+description: Literal property names with ASI (field definitions after a method in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-public, class]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement:
+ ...
+ FieldDefinition ;
+
+ FieldDefinition:
+ ClassElementName Initializer_opt
+
+ ClassElementName:
+ PropertyName
+
+---*/
+
+
+class C {
+ m() { return 42; } a
+ b = 42;;
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "a"),
+ "a doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "a"),
+ "a doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "a", {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "b"),
+ "b doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "b"),
+ "b doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "b", {
+ value: 42,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-method-literal-names.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-method-literal-names.js
new file mode 100644
index 0000000000..13faccf1b9
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-method-literal-names.js
@@ -0,0 +1,96 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/literal-names.case
+// - src/class-elements/productions/cls-decl-after-same-line-method.template
+/*---
+description: Literal property names (field definitions after a method in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-public, class]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement:
+ ...
+ FieldDefinition ;
+
+ FieldDefinition:
+ ClassElementName Initializer_opt
+
+ ClassElementName:
+ PropertyName
+
+---*/
+const fn = function() {}
+
+
+
+class C {
+ m() { return 42; } a; b = 42;
+ c = fn;
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "a"),
+ "a doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "a"),
+ "a doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "a", {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "b"),
+ "b doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "b"),
+ "b doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "b", {
+ value: 42,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "c"),
+ "c doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "c"),
+ "c doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "c", {
+ value: fn,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-method-private-field-usage.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-method-private-field-usage.js
new file mode 100644
index 0000000000..54e661f267
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-method-private-field-usage.js
@@ -0,0 +1,49 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-field-usage.case
+// - src/class-elements/productions/cls-decl-after-same-line-method.template
+/*---
+description: PrivateName CallExpression usage (private field) (field definitions after a method in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ Updated Productions
+
+ CallExpression[Yield, Await]:
+ CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+ SuperCall[?Yield, ?Await]
+ CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+ CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+ CallExpression[?Yield, ?Await].IdentifierName
+ CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+ CallExpression[?Yield, ?Await].PrivateName
+
+---*/
+
+
+class C {
+ m() { return 42; } #m = 'test262';;
+ method() {
+ return this.#m;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.method(), 'test262');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-method-private-method-getter-usage.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-method-private-method-getter-usage.js
new file mode 100644
index 0000000000..5fb9643d51
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-method-private-method-getter-usage.js
@@ -0,0 +1,49 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-method-getter-usage.case
+// - src/class-elements/productions/cls-decl-after-same-line-method.template
+/*---
+description: PrivateName CallExpression usage (Accesor get method) (field definitions after a method in the same line)
+esid: prod-FieldDefinition
+features: [class-methods-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ Updated Productions
+
+ CallExpression[Yield, Await]:
+ CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+ SuperCall[?Yield, ?Await]
+ CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+ CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+ CallExpression[?Yield, ?Await].IdentifierName
+ CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+ CallExpression[?Yield, ?Await].PrivateName
+
+---*/
+
+
+class C {
+ m() { return 42; } get #m() { return 'test262'; };
+ method() {
+ return this.#m;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.method(), 'test262');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-method-private-method-usage.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-method-private-method-usage.js
new file mode 100644
index 0000000000..ed4c12cfed
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-method-private-method-usage.js
@@ -0,0 +1,49 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-method-usage.case
+// - src/class-elements/productions/cls-decl-after-same-line-method.template
+/*---
+description: PrivateName CallExpression usage (private method) (field definitions after a method in the same line)
+esid: prod-FieldDefinition
+features: [class-methods-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ Updated Productions
+
+ CallExpression[Yield, Await]:
+ CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+ SuperCall[?Yield, ?Await]
+ CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+ CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+ CallExpression[?Yield, ?Await].IdentifierName
+ CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+ CallExpression[?Yield, ?Await].PrivateName
+
+---*/
+
+
+class C {
+ m() { return 42; } #m() { return 'test262'; };
+ method() {
+ return this.#m();
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.method(), 'test262');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-method-private-names.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-method-private-names.js
new file mode 100644
index 0000000000..1609214656
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-method-private-names.js
@@ -0,0 +1,71 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-names.case
+// - src/class-elements/productions/cls-decl-after-same-line-method.template
+/*---
+description: private names (field definitions after a method in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ FieldDefinition ;
+
+ FieldDefinition :
+ ClassElementName Initializer_opt
+
+ ClassElementName :
+ PrivateName
+
+ PrivateName :
+ # IdentifierName
+
+---*/
+
+
+class C {
+ m() { return 42; } #x; #y;
+ x() {
+ this.#x = 42;
+ return this.#x;
+ }
+ y() {
+ this.#y = 43;
+ return this.#y;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+// Test the private fields do not appear as properties before set to value
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#x"), "test 1");
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 2");
+assert(!Object.prototype.hasOwnProperty.call(c, "#x"), "test 3");
+
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#y"), "test 4");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 5");
+assert(!Object.prototype.hasOwnProperty.call(c, "#y"), "test 6");
+
+// Test if private fields can be sucessfully accessed and set to value
+assert.sameValue(c.x(), 42, "test 7");
+assert.sameValue(c.y(), 43, "test 8");
+
+// Test the private fields do not appear as properties before after set to value
+assert(!Object.prototype.hasOwnProperty.call(c, "#x"), "test 9");
+assert(!Object.prototype.hasOwnProperty.call(c, "#y"), "test 10");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-field-identifier-initializer.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-field-identifier-initializer.js
new file mode 100644
index 0000000000..94601464dc
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-field-identifier-initializer.js
@@ -0,0 +1,87 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-field-identifier-initializer.case
+// - src/class-elements/productions/cls-decl-after-same-line-method.template
+/*---
+description: Valid FieldDefinition (field definitions after a method in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-public, class]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+
+ PropertyName :
+ LiteralPropertyName
+ ComputedPropertyName
+
+ LiteralPropertyName :
+ IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ m() { return 42; } $ = 1; _ = 1; \u{6F} = 1; \u2118 = 1; ZW_\u200C_NJ = 1; ZW_\u200D_J = 1;
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$, 1);
+assert.sameValue(c._, 1);
+assert.sameValue(c.\u{6F}, 1);
+assert.sameValue(c.\u2118, 1);
+assert.sameValue(c.ZW_\u200C_NJ, 1);
+assert.sameValue(c.ZW_\u200D_J, 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-field-identifier.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-field-identifier.js
new file mode 100644
index 0000000000..68db2471db
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-field-identifier.js
@@ -0,0 +1,94 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-field-identifier.case
+// - src/class-elements/productions/cls-decl-after-same-line-method.template
+/*---
+description: Valid FieldDefinition (field definitions after a method in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-public, class]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+
+ PropertyName :
+ LiteralPropertyName
+ ComputedPropertyName
+
+ LiteralPropertyName :
+ IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ m() { return 42; } $; _; \u{6F}; \u2118; ZW_\u200C_NJ; ZW_\u200D_J;
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+c.$ = 1;
+c._ = 1;
+c.\u{6F} = 1;
+c.\u2118 = 1;
+c.ZW_\u200C_NJ = 1;
+c.ZW_\u200D_J = 1;
+
+assert.sameValue(c.$, 1);
+assert.sameValue(c._, 1);
+assert.sameValue(c.\u{6F}, 1);
+assert.sameValue(c.\u2118, 1);
+assert.sameValue(c.ZW_\u200C_NJ, 1);
+assert.sameValue(c.ZW_\u200D_J, 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-private-getter-alt.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-private-getter-alt.js
new file mode 100644
index 0000000000..862349ac53
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-private-getter-alt.js
@@ -0,0 +1,128 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-getter-alt.case
+// - src/class-elements/productions/cls-decl-after-same-line-method.template
+/*---
+description: Valid PrivateName as private getter (field definitions after a method in the same line)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ...
+ get ClassElementName ( ){ FunctionBody }
+ ...
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ m() { return 42; } #$_; #__; #\u{6F}_; #℘_; #ZW_‌_NJ_; #ZW_‍_J_;
+ get #$() {
+ return this.#$_;
+ }
+ get #_() {
+ return this.#__;
+ }
+ get #\u{6F}() {
+ return this.#\u{6F}_;
+ }
+ get #℘() {
+ return this.#℘_;
+ }
+ get #ZW_‌_NJ() {
+ return this.#ZW_‌_NJ_;
+ }
+ get #ZW_‍_J() {
+ return this.#ZW_‍_J_;
+ }
+;
+ $(value) {
+ this.#$_ = value;
+ return this.#$;
+ }
+ _(value) {
+ this.#__ = value;
+ return this.#_;
+ }
+ \u{6F}(value) {
+ this.#\u{6F}_ = value;
+ return this.#\u{6F};
+ }
+ ℘(value) {
+ this.#℘_ = value;
+ return this.#℘;
+ }
+ ZW_‌_NJ(value) {
+ this.#ZW_‌_NJ_ = value;
+ return this.#ZW_‌_NJ;
+ }
+ ZW_‍_J(value) {
+ this.#ZW_‍_J_ = value;
+ return this.#ZW_‍_J;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.℘(1), 1);
+assert.sameValue(c.ZW_‌_NJ(1), 1);
+assert.sameValue(c.ZW_‍_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-private-getter.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-private-getter.js
new file mode 100644
index 0000000000..c55a585343
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-private-getter.js
@@ -0,0 +1,128 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-getter.case
+// - src/class-elements/productions/cls-decl-after-same-line-method.template
+/*---
+description: Valid PrivateName as private getter (field definitions after a method in the same line)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ...
+ get ClassElementName ( ){ FunctionBody }
+ ...
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ m() { return 42; } #$_; #__; #\u{6F}_; #\u2118_; #ZW_\u200C_NJ_; #ZW_\u200D_J_;
+ get #$() {
+ return this.#$_;
+ }
+ get #_() {
+ return this.#__;
+ }
+ get #\u{6F}() {
+ return this.#\u{6F}_;
+ }
+ get #\u2118() {
+ return this.#\u2118_;
+ }
+ get #ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ_;
+ }
+ get #ZW_\u200D_J() {
+ return this.#ZW_\u200D_J_;
+ }
+;
+ $(value) {
+ this.#$_ = value;
+ return this.#$;
+ }
+ _(value) {
+ this.#__ = value;
+ return this.#_;
+ }
+ \u{6F}(value) {
+ this.#\u{6F}_ = value;
+ return this.#\u{6F};
+ }
+ \u2118(value) {
+ this.#\u2118_ = value;
+ return this.#\u2118;
+ }
+ ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ_ = value;
+ return this.#ZW_\u200C_NJ;
+ }
+ ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J_ = value;
+ return this.#ZW_\u200D_J;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.\u2118(1), 1);
+assert.sameValue(c.ZW_\u200C_NJ(1), 1);
+assert.sameValue(c.ZW_\u200D_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-private-method-alt.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-private-method-alt.js
new file mode 100644
index 0000000000..cc30e5ebdb
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-private-method-alt.js
@@ -0,0 +1,127 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-method-alt.case
+// - src/class-elements/productions/cls-decl-after-same-line-method.template
+/*---
+description: Valid PrivateName as private method (field definitions after a method in the same line)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ClassElementName ( UniqueFormalParameters ) { FunctionBody }
+ ...
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ m() { return 42; } #$_; #__; #\u{6F}_; #℘_; #ZW_‌_NJ_; #ZW_‍_J_;
+ #$() {
+ return this.#$_;
+ }
+ #_() {
+ return this.#__;
+ }
+ #\u{6F}() {
+ return this.#\u{6F}_;
+ }
+ #℘() {
+ return this.#℘_;
+ }
+ #ZW_‌_NJ() {
+ return this.#ZW_‌_NJ_;
+ }
+ #ZW_‍_J() {
+ return this.#ZW_‍_J_;
+ }
+;
+ $(value) {
+ this.#$_ = value;
+ return this.#$();
+ }
+ _(value) {
+ this.#__ = value;
+ return this.#_();
+ }
+ \u{6F}(value) {
+ this.#\u{6F}_ = value;
+ return this.#\u{6F}();
+ }
+ ℘(value) {
+ this.#℘_ = value;
+ return this.#℘();
+ }
+ ZW_‌_NJ(value) {
+ this.#ZW_‌_NJ_ = value;
+ return this.#ZW_‌_NJ();
+ }
+ ZW_‍_J(value) {
+ this.#ZW_‍_J_ = value;
+ return this.#ZW_‍_J();
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.℘(1), 1);
+assert.sameValue(c.ZW_‌_NJ(1), 1);
+assert.sameValue(c.ZW_‍_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-private-method.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-private-method.js
new file mode 100644
index 0000000000..f6f5151869
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-private-method.js
@@ -0,0 +1,127 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-method.case
+// - src/class-elements/productions/cls-decl-after-same-line-method.template
+/*---
+description: Valid PrivateName as private method (field definitions after a method in the same line)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ClassElementName ( UniqueFormalParameters ) { FunctionBody }
+ ...
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ m() { return 42; } #$_; #__; #\u{6F}_; #\u2118_; #ZW_\u200C_NJ_; #ZW_\u200D_J_;
+ #$() {
+ return this.#$_;
+ }
+ #_() {
+ return this.#__;
+ }
+ #\u{6F}() {
+ return this.#\u{6F}_;
+ }
+ #\u2118() {
+ return this.#\u2118_;
+ }
+ #ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ_;
+ }
+ #ZW_\u200D_J() {
+ return this.#ZW_\u200D_J_;
+ }
+;
+ $(value) {
+ this.#$_ = value;
+ return this.#$();
+ }
+ _(value) {
+ this.#__ = value;
+ return this.#_();
+ }
+ \u{6F}(value) {
+ this.#\u{6F}_ = value;
+ return this.#\u{6F}();
+ }
+ \u2118(value) {
+ this.#\u2118_ = value;
+ return this.#\u2118();
+ }
+ ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ_ = value;
+ return this.#ZW_\u200C_NJ();
+ }
+ ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J_ = value;
+ return this.#ZW_\u200D_J();
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.\u2118(1), 1);
+assert.sameValue(c.ZW_\u200C_NJ(1), 1);
+assert.sameValue(c.ZW_\u200D_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-private-setter-alt.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-private-setter-alt.js
new file mode 100644
index 0000000000..e2063f85d5
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-private-setter-alt.js
@@ -0,0 +1,127 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-setter-alt.case
+// - src/class-elements/productions/cls-decl-after-same-line-method.template
+/*---
+description: Valid PrivateName as private setter (field definitions after a method in the same line)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ...
+ set ClassElementName ( PropertySetParameterList ) { FunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ m() { return 42; } #$_; #__; #\u{6F}_; #℘_; #ZW_‌_NJ_; #ZW_‍_J_;
+ set #$(value) {
+ this.#$_ = value;
+ }
+ set #_(value) {
+ this.#__ = value;
+ }
+ set #\u{6F}(value) {
+ this.#\u{6F}_ = value;
+ }
+ set #℘(value) {
+ this.#℘_ = value;
+ }
+ set #ZW_‌_NJ(value) {
+ this.#ZW_‌_NJ_ = value;
+ }
+ set #ZW_‍_J(value) {
+ this.#ZW_‍_J_ = value;
+ }
+;
+ $(value) {
+ this.#$ = value;
+ return this.#$_;
+ }
+ _(value) {
+ this.#_ = value;
+ return this.#__;
+ }
+ \u{6F}(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F}_;
+ }
+ ℘(value) {
+ this.#℘ = value;
+ return this.#℘_;
+ }
+ ZW_‌_NJ(value) {
+ this.#ZW_‌_NJ = value;
+ return this.#ZW_‌_NJ_;
+ }
+ ZW_‍_J(value) {
+ this.#ZW_‍_J = value;
+ return this.#ZW_‍_J_;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.℘(1), 1);
+assert.sameValue(c.ZW_‌_NJ(1), 1);
+assert.sameValue(c.ZW_‍_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-private-setter.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-private-setter.js
new file mode 100644
index 0000000000..809832b036
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-private-setter.js
@@ -0,0 +1,127 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-setter.case
+// - src/class-elements/productions/cls-decl-after-same-line-method.template
+/*---
+description: Valid PrivateName as private setter (field definitions after a method in the same line)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ...
+ set ClassElementName ( PropertySetParameterList ) { FunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ m() { return 42; } #$_; #__; #\u{6F}_; #\u2118_; #ZW_\u200C_NJ_; #ZW_\u200D_J_;
+ set #$(value) {
+ this.#$_ = value;
+ }
+ set #_(value) {
+ this.#__ = value;
+ }
+ set #\u{6F}(value) {
+ this.#\u{6F}_ = value;
+ }
+ set #\u2118(value) {
+ this.#\u2118_ = value;
+ }
+ set #ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ_ = value;
+ }
+ set #ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J_ = value;
+ }
+;
+ $(value) {
+ this.#$ = value;
+ return this.#$_;
+ }
+ _(value) {
+ this.#_ = value;
+ return this.#__;
+ }
+ \u{6F}(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F}_;
+ }
+ \u2118(value) {
+ this.#\u2118 = value;
+ return this.#\u2118_;
+ }
+ ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ = value;
+ return this.#ZW_\u200C_NJ_;
+ }
+ ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J = value;
+ return this.#ZW_\u200D_J_;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.\u2118(1), 1);
+assert.sameValue(c.ZW_\u200C_NJ(1), 1);
+assert.sameValue(c.ZW_\u200D_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-privatename-identifier-alt.js
new file mode 100644
index 0000000000..e483dfc68f
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-privatename-identifier-alt.js
@@ -0,0 +1,109 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-after-same-line-method.template
+/*---
+description: Valid PrivateName (field definitions after a method in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ m() { return 42; } #$; #_; #\u{6F}; #℘; #ZW_‌_NJ; #ZW_‍_J;
+ $(value) {
+ this.#$ = value;
+ return this.#$;
+ }
+ _(value) {
+ this.#_ = value;
+ return this.#_;
+ }
+ \u{6F}(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F};
+ }
+ ℘(value) {
+ this.#℘ = value;
+ return this.#℘;
+ }
+ ZW_‌_NJ(value) {
+ this.#ZW_‌_NJ = value;
+ return this.#ZW_‌_NJ;
+ }
+ ZW_‍_J(value) {
+ this.#ZW_‍_J = value;
+ return this.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.℘(1), 1);
+assert.sameValue(c.ZW_‌_NJ(1), 1);
+assert.sameValue(c.ZW_‍_J(1), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-privatename-identifier-initializer-alt.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-privatename-identifier-initializer-alt.js
new file mode 100644
index 0000000000..f4ad70edab
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-privatename-identifier-initializer-alt.js
@@ -0,0 +1,103 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-privatename-identifier-initializer-alt.case
+// - src/class-elements/productions/cls-decl-after-same-line-method.template
+/*---
+description: Valid PrivateName (field definitions after a method in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ m() { return 42; } #$ = 1; #_ = 1; #\u{6F} = 1; #℘ = 1; #ZW_‌_NJ = 1; #ZW_‍_J = 1;
+ $() {
+ return this.#$;
+ }
+ _() {
+ return this.#_;
+ }
+ \u{6F}() {
+ return this.#\u{6F};
+ }
+ ℘() {
+ return this.#℘;
+ }
+ ZW_‌_NJ() {
+ return this.#ZW_‌_NJ;
+ }
+ ZW_‍_J() {
+ return this.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(), 1);
+assert.sameValue(c._(), 1);
+assert.sameValue(c.\u{6F}(), 1);
+assert.sameValue(c.℘(), 1);
+assert.sameValue(c.ZW_‌_NJ(), 1);
+assert.sameValue(c.ZW_‍_J(), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-privatename-identifier-initializer.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-privatename-identifier-initializer.js
new file mode 100644
index 0000000000..599a9ac8fa
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-privatename-identifier-initializer.js
@@ -0,0 +1,103 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-privatename-identifier-initializer.case
+// - src/class-elements/productions/cls-decl-after-same-line-method.template
+/*---
+description: Valid PrivateName (field definitions after a method in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ m() { return 42; } #$ = 1; #_ = 1; #\u{6F} = 1; #\u2118 = 1; #ZW_\u200C_NJ = 1; #ZW_\u200D_J = 1;
+ $() {
+ return this.#$;
+ }
+ _() {
+ return this.#_;
+ }
+ \u{6F}() {
+ return this.#\u{6F};
+ }
+ \u2118() {
+ return this.#\u2118;
+ }
+ ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ;
+ }
+ ZW_\u200D_J() {
+ return this.#ZW_\u200D_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(), 1);
+assert.sameValue(c._(), 1);
+assert.sameValue(c.\u{6F}(), 1);
+assert.sameValue(c.\u2118(), 1);
+assert.sameValue(c.ZW_\u200C_NJ(), 1);
+assert.sameValue(c.ZW_\u200D_J(), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-privatename-identifier.js
new file mode 100644
index 0000000000..5a08e76397
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-privatename-identifier.js
@@ -0,0 +1,109 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-after-same-line-method.template
+/*---
+description: Valid PrivateName (field definitions after a method in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ m() { return 42; } #$; #_; #\u{6F}; #\u2118; #ZW_\u200C_NJ; #ZW_\u200D_J;
+ $(value) {
+ this.#$ = value;
+ return this.#$;
+ }
+ _(value) {
+ this.#_ = value;
+ return this.#_;
+ }
+ \u{6F}(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F};
+ }
+ \u2118(value) {
+ this.#\u2118 = value;
+ return this.#\u2118;
+ }
+ ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ = value;
+ return this.#ZW_\u200C_NJ;
+ }
+ ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J = value;
+ return this.#ZW_\u200D_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.\u2118(1), 1);
+assert.sameValue(c.ZW_\u200C_NJ(1), 1);
+assert.sameValue(c.ZW_\u200D_J(1), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-static-async-generator-method-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-static-async-generator-method-privatename-identifier-alt.js
new file mode 100644
index 0000000000..197216f455
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-static-async-generator-method-privatename-identifier-alt.js
@@ -0,0 +1,134 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-async-generator-method-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-after-same-line-method.template
+/*---
+description: Valid Static AsyncGeneratorMethod PrivateName (field definitions after a method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ m() { return 42; } static async * #$(value) {
+ yield * await value;
+ }
+ static async * #_(value) {
+ yield * await value;
+ }
+ static async * #o(value) {
+ yield * await value;
+ }
+ static async * #℘(value) {
+ yield * await value;
+ }
+ static async * #ZW_‌_NJ(value) {
+ yield * await value;
+ }
+ static async * #ZW_‍_J(value) {
+ yield * await value;
+ };
+ static get $() {
+ return this.#$;
+ }
+ static get _() {
+ return this.#_;
+ }
+ static get o() {
+ return this.#o;
+ }
+ static get ℘() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#℘;
+ }
+ static get ZW_‌_NJ() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‌_NJ;
+ }
+ static get ZW_‍_J() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‍_J;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+Promise.all([
+ C.$([1]).next(),
+ C._([1]).next(),
+ C.o([1]).next(),
+ C.℘([1]).next(), // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.ZW_‌_NJ([1]).next(), // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.ZW_‍_J([1]).next(), // DO NOT CHANGE THE NAME OF THIS FIELD
+]).then(results => {
+
+ assert.sameValue(results[0].value, 1);
+ assert.sameValue(results[1].value, 1);
+ assert.sameValue(results[2].value, 1);
+ assert.sameValue(results[3].value, 1);
+ assert.sameValue(results[4].value, 1);
+ assert.sameValue(results[5].value, 1);
+
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-static-async-generator-method-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-static-async-generator-method-privatename-identifier.js
new file mode 100644
index 0000000000..a3f00b9df6
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-static-async-generator-method-privatename-identifier.js
@@ -0,0 +1,135 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-async-generator-method-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-after-same-line-method.template
+/*---
+description: Valid Static AsyncGeneratorMethod PrivateName (field definitions after a method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ m() { return 42; } static async * #$(value) {
+ yield * await value;
+ }
+ static async * #_(value) {
+ yield * await value;
+ }
+ static async * #\u{6F}(value) {
+ yield * await value;
+ }
+ static async * #\u2118(value) {
+ yield * await value;
+ }
+ static async * #ZW_\u200C_NJ(value) {
+ yield * await value;
+ }
+ static async * #ZW_\u200D_J(value) {
+ yield * await value;
+ };
+ static get $() {
+ return this.#$;
+ }
+ static get _() {
+ return this.#_;
+ }
+ static get \u{6F}() {
+ return this.#\u{6F};
+ }
+ static get \u2118() {
+ return this.#\u2118;
+ }
+ static get ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ;
+ }
+ static get ZW_\u200D_J() {
+ return this.#ZW_\u200D_J;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+Promise.all([
+ C.$([1]).next(),
+ C._([1]).next(),
+ C.\u{6F}([1]).next(),
+ C.\u2118([1]).next(),
+ C.ZW_\u200C_NJ([1]).next(),
+ C.ZW_\u200D_J([1]).next(),
+]).then(results => {
+
+ assert.sameValue(results[0].value, 1);
+ assert.sameValue(results[1].value, 1);
+ assert.sameValue(results[2].value, 1);
+ assert.sameValue(results[3].value, 1);
+ assert.sameValue(results[4].value, 1);
+ assert.sameValue(results[5].value, 1);
+
+}).then($DONE, $DONE);
+
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-static-async-method-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-static-async-method-privatename-identifier-alt.js
new file mode 100644
index 0000000000..6becb08bc5
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-static-async-method-privatename-identifier-alt.js
@@ -0,0 +1,134 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-async-method-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-after-same-line-method.template
+/*---
+description: Valid Static AsyncMethod PrivateName (field definitions after a method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ AsyncMethod
+
+ AsyncMethod :
+ async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ m() { return 42; } static async #$(value) {
+ return await value;
+ }
+ static async #_(value) {
+ return await value;
+ }
+ static async #o(value) {
+ return await value;
+ }
+ static async #℘(value) {
+ return await value;
+ }
+ static async #ZW_‌_NJ(value) {
+ return await value;
+ }
+ static async #ZW_‍_J(value) {
+ return await value;
+ };
+ static async $(value) {
+ return await this.#$(value);
+ }
+ static async _(value) {
+ return await this.#_(value);
+ }
+ static async o(value) {
+ return await this.#o(value);
+ }
+ static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return await this.#℘(value);
+ }
+ static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return await this.#ZW_‌_NJ(value);
+ }
+ static async ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return await this.#ZW_‍_J(value);
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+Promise.all([
+ C.$(1),
+ C._(1),
+ C.o(1),
+ C.℘(1), // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.ZW_‌_NJ(1), // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.ZW_‍_J(1), // DO NOT CHANGE THE NAME OF THIS FIELD
+]).then(results => {
+
+ assert.sameValue(results[0], 1);
+ assert.sameValue(results[1], 1);
+ assert.sameValue(results[2], 1);
+ assert.sameValue(results[3], 1);
+ assert.sameValue(results[4], 1);
+ assert.sameValue(results[5], 1);
+
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-static-async-method-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-static-async-method-privatename-identifier.js
new file mode 100644
index 0000000000..456f7860e3
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-static-async-method-privatename-identifier.js
@@ -0,0 +1,135 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-async-method-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-after-same-line-method.template
+/*---
+description: Valid Static AsyncMethod PrivateName (field definitions after a method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ AsyncMethod
+
+ AsyncMethod :
+ async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ m() { return 42; } static async #$(value) {
+ return await value;
+ }
+ static async #_(value) {
+ return await value;
+ }
+ static async #\u{6F}(value) {
+ return await value;
+ }
+ static async #\u2118(value) {
+ return await value;
+ }
+ static async #ZW_\u200C_NJ(value) {
+ return await value;
+ }
+ static async #ZW_\u200D_J(value) {
+ return await value;
+ };
+ static async $(value) {
+ return await this.#$(value);
+ }
+ static async _(value) {
+ return await this.#_(value);
+ }
+ static async \u{6F}(value) {
+ return await this.#\u{6F}(value);
+ }
+ static async \u2118(value) {
+ return await this.#\u2118(value);
+ }
+ static async ZW_\u200C_NJ(value) {
+ return await this.#ZW_\u200C_NJ(value);
+ }
+ static async ZW_\u200D_J(value) {
+ return await this.#ZW_\u200D_J(value);
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+Promise.all([
+ C.$(1),
+ C._(1),
+ C.\u{6F}(1),
+ C.\u2118(1),
+ C.ZW_\u200C_NJ(1),
+ C.ZW_\u200D_J(1),
+]).then(results => {
+
+ assert.sameValue(results[0], 1);
+ assert.sameValue(results[1], 1);
+ assert.sameValue(results[2], 1);
+ assert.sameValue(results[3], 1);
+ assert.sameValue(results[4], 1);
+ assert.sameValue(results[5], 1);
+
+}).then($DONE, $DONE);
+
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-static-generator-method-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-static-generator-method-privatename-identifier-alt.js
new file mode 100644
index 0000000000..f9616e0a3c
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-static-generator-method-privatename-identifier-alt.js
@@ -0,0 +1,124 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-generator-method-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-after-same-line-method.template
+/*---
+description: Valid Static GeneratorMethod PrivateName (field definitions after a method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ GeneratorMethod
+
+ GeneratorMethod :
+ * ClassElementName ( UniqueFormalParameters ){ GeneratorBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ m() { return 42; } static * #$(value) {
+ yield * value;
+ }
+ static * #_(value) {
+ yield * value;
+ }
+ static * #o(value) {
+ yield * value;
+ }
+ static * #℘(value) {
+ yield * value;
+ }
+ static * #ZW_‌_NJ(value) {
+ yield * value;
+ }
+ static * #ZW_‍_J(value) {
+ yield * value;
+ };
+ static get $() {
+ return this.#$;
+ }
+ static get _() {
+ return this.#_;
+ }
+ static get o() {
+ return this.#o;
+ }
+ static get ℘() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#℘;
+ }
+ static get ZW_‌_NJ() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‌_NJ;
+ }
+ static get ZW_‍_J() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‍_J;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$([1]).next().value, 1);
+assert.sameValue(C._([1]).next().value, 1);
+assert.sameValue(C.o([1]).next().value, 1);
+assert.sameValue(C.℘([1]).next().value, 1);
+assert.sameValue(C.ZW_‌_NJ([1]).next().value, 1);
+assert.sameValue(C.ZW_‍_J([1]).next().value, 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-static-generator-method-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-static-generator-method-privatename-identifier.js
new file mode 100644
index 0000000000..658f1ab968
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-static-generator-method-privatename-identifier.js
@@ -0,0 +1,125 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-generator-method-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-after-same-line-method.template
+/*---
+description: Valid Static GeneratorMethod PrivateName (field definitions after a method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ GeneratorMethod
+
+ GeneratorMethod :
+ * ClassElementName ( UniqueFormalParameters ){ GeneratorBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ m() { return 42; } static * #$(value) {
+ yield * value;
+ }
+ static * #_(value) {
+ yield * value;
+ }
+ static * #\u{6F}(value) {
+ yield * value;
+ }
+ static * #\u2118(value) {
+ yield * value;
+ }
+ static * #ZW_\u200C_NJ(value) {
+ yield * value;
+ }
+ static * #ZW_\u200D_J(value) {
+ yield * value;
+ };
+ static get $() {
+ return this.#$;
+ }
+ static get _() {
+ return this.#_;
+ }
+ static get \u{6F}() {
+ return this.#\u{6F};
+ }
+ static get \u2118() {
+ return this.#\u2118;
+ }
+ static get ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ;
+ }
+ static get ZW_\u200D_J() {
+ return this.#ZW_\u200D_J;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$([1]).next().value, 1);
+assert.sameValue(C._([1]).next().value, 1);
+assert.sameValue(C.\u{6F}([1]).next().value, 1);
+assert.sameValue(C.\u2118([1]).next().value, 1);
+assert.sameValue(C.ZW_\u200C_NJ([1]).next().value, 1);
+assert.sameValue(C.ZW_\u200D_J([1]).next().value, 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-static-method-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-static-method-privatename-identifier-alt.js
new file mode 100644
index 0000000000..6de252c327
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-static-method-privatename-identifier-alt.js
@@ -0,0 +1,122 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-method-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-after-same-line-method.template
+/*---
+description: Valid Static Method PrivateName (field definitions after a method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ ClassElementName ( UniqueFormalParameters ){ FunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ m() { return 42; } static #$(value) {
+ return value;
+ }
+ static #_(value) {
+ return value;
+ }
+ static #o(value) {
+ return value;
+ }
+ static #℘(value) {
+ return value;
+ }
+ static #ZW_‌_NJ(value) {
+ return value;
+ }
+ static #ZW_‍_J(value) {
+ return value;
+ };
+ static $(value) {
+ return this.#$(value);
+ }
+ static _(value) {
+ return this.#_(value);
+ }
+ static o(value) {
+ return this.#o(value);
+ }
+ static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#℘(value);
+ }
+ static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‌_NJ(value);
+ }
+ static ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‍_J(value);
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(1), 1);
+assert.sameValue(C._(1), 1);
+assert.sameValue(C.o(1), 1);
+assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+assert.sameValue(C.ZW_‌_NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+assert.sameValue(C.ZW_‍_J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-static-method-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-static-method-privatename-identifier.js
new file mode 100644
index 0000000000..58092cfd01
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-static-method-privatename-identifier.js
@@ -0,0 +1,122 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-method-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-after-same-line-method.template
+/*---
+description: Valid Static Method PrivateName (field definitions after a method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ ClassElementName ( UniqueFormalParameters ){ FunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ m() { return 42; } static #$(value) {
+ return value;
+ }
+ static #_(value) {
+ return value;
+ }
+ static #\u{6F}(value) {
+ return value;
+ }
+ static #\u2118(value) {
+ return value;
+ }
+ static #ZW_\u200C_NJ(value) {
+ return value;
+ }
+ static #ZW_\u200D_J(value) {
+ return value;
+ };
+ static $(value) {
+ return this.#$(value);
+ }
+ static _(value) {
+ return this.#_(value);
+ }
+ static \u{6F}(value) {
+ return this.#\u{6F}(value);
+ }
+ static \u2118(value) {
+ return this.#\u2118(value);
+ }
+ static ZW_\u200C_NJ(value) {
+ return this.#ZW_\u200C_NJ(value);
+ }
+ static ZW_\u200D_J(value) {
+ return this.#ZW_\u200D_J(value);
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(1), 1);
+assert.sameValue(C._(1), 1);
+assert.sameValue(C.\u{6F}(1), 1);
+assert.sameValue(C.\u2118(1), 1);
+assert.sameValue(C.ZW_\u200C_NJ(1), 1);
+assert.sameValue(C.ZW_\u200D_J(1), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-static-privatename-identifier-alt-by-classname.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-static-privatename-identifier-alt-by-classname.js
new file mode 100644
index 0000000000..9f258beec7
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-static-privatename-identifier-alt-by-classname.js
@@ -0,0 +1,110 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-alt-by-classname.case
+// - src/class-elements/productions/cls-decl-after-same-line-method.template
+/*---
+description: Valid Static PrivateName (field definitions after a method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ m() { return 42; } static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_‍_J;
+ static $(value) {
+ C.#$ = value;
+ return C.#$;
+ }
+ static _(value) {
+ C.#_ = value;
+ return C.#_;
+ }
+ static o(value) {
+ C.#\u{6F} = value;
+ return C.#\u{6F};
+ }
+ static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.#℘ = value;
+ return C.#℘;
+ }
+ static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.#ZW_‌_NJ = value;
+ return C.#ZW_‌_NJ;
+ }
+ static ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.#ZW_‍_J = value;
+ return C.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(1), 1);
+assert.sameValue(C._(1), 1);
+assert.sameValue(C.o(1), 1);
+assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+assert.sameValue(C.ZW_‌_NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+assert.sameValue(C.ZW_‍_J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-static-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-static-privatename-identifier-alt.js
new file mode 100644
index 0000000000..25f4ca7c49
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-static-privatename-identifier-alt.js
@@ -0,0 +1,110 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-after-same-line-method.template
+/*---
+description: Valid Static PrivateName (field definitions after a method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ m() { return 42; } static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_‍_J;
+ static $(value) {
+ this.#$ = value;
+ return this.#$;
+ }
+ static _(value) {
+ this.#_ = value;
+ return this.#_;
+ }
+ static o(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F};
+ }
+ static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ this.#℘ = value;
+ return this.#℘;
+ }
+ static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ this.#ZW_‌_NJ = value;
+ return this.#ZW_‌_NJ;
+ }
+ static ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ this.#ZW_‍_J = value;
+ return this.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(1), 1);
+assert.sameValue(C._(1), 1);
+assert.sameValue(C.o(1), 1);
+assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+assert.sameValue(C.ZW_‌_NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+assert.sameValue(C.ZW_‍_J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-static-privatename-identifier-by-classname.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-static-privatename-identifier-by-classname.js
new file mode 100644
index 0000000000..f7319852b3
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-static-privatename-identifier-by-classname.js
@@ -0,0 +1,110 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-by-classname.case
+// - src/class-elements/productions/cls-decl-after-same-line-method.template
+/*---
+description: Valid Static PrivateName (field definitions after a method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ m() { return 42; } static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J;
+ static $(value) {
+ C.#$ = value;
+ return C.#$;
+ }
+ static _(value) {
+ C.#_ = value;
+ return C.#_;
+ }
+ static \u{6F}(value) {
+ C.#\u{6F} = value;
+ return C.#\u{6F};
+ }
+ static \u2118(value) {
+ C.#\u2118 = value;
+ return C.#\u2118;
+ }
+ static ZW_\u200C_NJ(value) {
+ C.#ZW_\u200C_NJ = value;
+ return C.#ZW_\u200C_NJ;
+ }
+ static ZW_\u200D_J(value) {
+ C.#ZW_\u200D_J = value;
+ return C.#ZW_\u200D_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(1), 1);
+assert.sameValue(C._(1), 1);
+assert.sameValue(C.\u{6F}(1), 1);
+assert.sameValue(C.\u2118(1), 1);
+assert.sameValue(C.ZW_\u200C_NJ(1), 1);
+assert.sameValue(C.ZW_\u200D_J(1), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-static-privatename-identifier-initializer-alt-by-classname.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-static-privatename-identifier-initializer-alt-by-classname.js
new file mode 100644
index 0000000000..ade77c12db
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-static-privatename-identifier-initializer-alt-by-classname.js
@@ -0,0 +1,104 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-initializer-alt-by-classname.case
+// - src/class-elements/productions/cls-decl-after-same-line-method.template
+/*---
+description: Valid Static PrivateName (field definitions after a method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ m() { return 42; } static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_‍_J = 1;
+ static $() {
+ return C.#$;
+ }
+ static _() {
+ return C.#_;
+ }
+ static \u{6F}() {
+ return C.#\u{6F};
+ }
+ static ℘() {
+ return C.#℘;
+ }
+ static ZW_‌_NJ() {
+ return C.#ZW_‌_NJ;
+ }
+ static ZW_‍_J() {
+ return C.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(), 1);
+assert.sameValue(C._(), 1);
+assert.sameValue(C.\u{6F}(), 1);
+assert.sameValue(C.℘(), 1);
+assert.sameValue(C.ZW_‌_NJ(), 1);
+assert.sameValue(C.ZW_‍_J(), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-static-privatename-identifier-initializer-alt.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-static-privatename-identifier-initializer-alt.js
new file mode 100644
index 0000000000..bd7086ce7c
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-static-privatename-identifier-initializer-alt.js
@@ -0,0 +1,104 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-initializer-alt.case
+// - src/class-elements/productions/cls-decl-after-same-line-method.template
+/*---
+description: Valid Static PrivateName (field definitions after a method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ m() { return 42; } static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_‍_J = 1;
+ static $() {
+ return this.#$;
+ }
+ static _() {
+ return this.#_;
+ }
+ static \u{6F}() {
+ return this.#\u{6F};
+ }
+ static ℘() {
+ return this.#℘;
+ }
+ static ZW_‌_NJ() {
+ return this.#ZW_‌_NJ;
+ }
+ static ZW_‍_J() {
+ return this.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(), 1);
+assert.sameValue(C._(), 1);
+assert.sameValue(C.\u{6F}(), 1);
+assert.sameValue(C.℘(), 1);
+assert.sameValue(C.ZW_‌_NJ(), 1);
+assert.sameValue(C.ZW_‍_J(), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-static-privatename-identifier-initializer.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-static-privatename-identifier-initializer.js
new file mode 100644
index 0000000000..9a22b5740a
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-static-privatename-identifier-initializer.js
@@ -0,0 +1,104 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-initializer.case
+// - src/class-elements/productions/cls-decl-after-same-line-method.template
+/*---
+description: Valid Static PrivateName (field definitions after a method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ m() { return 42; } static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #\u2118 = 1; static #ZW_\u200C_NJ = 1; static #ZW_\u200D_J = 1;
+ static $() {
+ return this.#$;
+ }
+ static _() {
+ return this.#_;
+ }
+ static \u{6F}() {
+ return this.#\u{6F};
+ }
+ static \u2118() {
+ return this.#\u2118;
+ }
+ static ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ;
+ }
+ static ZW_\u200D_J() {
+ return this.#ZW_\u200D_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(), 1);
+assert.sameValue(C._(), 1);
+assert.sameValue(C.\u{6F}(), 1);
+assert.sameValue(C.\u2118(), 1);
+assert.sameValue(C.ZW_\u200C_NJ(), 1);
+assert.sameValue(C.ZW_\u200D_J(), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-static-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-static-privatename-identifier.js
new file mode 100644
index 0000000000..4b3895a898
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-method-rs-static-privatename-identifier.js
@@ -0,0 +1,110 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-after-same-line-method.template
+/*---
+description: Valid Static PrivateName (field definitions after a method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ m() { return 42; } static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J;
+ static $(value) {
+ this.#$ = value;
+ return this.#$;
+ }
+ static _(value) {
+ this.#_ = value;
+ return this.#_;
+ }
+ static \u{6F}(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F};
+ }
+ static \u2118(value) {
+ this.#\u2118 = value;
+ return this.#\u2118;
+ }
+ static ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ = value;
+ return this.#ZW_\u200C_NJ;
+ }
+ static ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J = value;
+ return this.#ZW_\u200D_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(1), 1);
+assert.sameValue(C._(1), 1);
+assert.sameValue(C.\u{6F}(1), 1);
+assert.sameValue(C.\u2118(1), 1);
+assert.sameValue(C.ZW_\u200C_NJ(1), 1);
+assert.sameValue(C.ZW_\u200D_J(1), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-method-static-private-fields.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-method-static-private-fields.js
new file mode 100644
index 0000000000..345a9a82fe
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-method-static-private-fields.js
@@ -0,0 +1,71 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/static-private-fields.case
+// - src/class-elements/productions/cls-decl-after-same-line-method.template
+/*---
+description: static private fields (field definitions after a method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ static FieldDefinition ;
+
+ FieldDefinition :
+ ClassElementName Initializer_opt
+
+ ClassElementName :
+ PrivateName
+
+ PrivateName :
+ # IdentifierName
+
+---*/
+
+
+class C {
+ m() { return 42; } static #x; static #y;
+ static x() {
+ this.#x = 42;
+ return this.#x;
+ }
+ static y() {
+ this.#y = 43;
+ return this.#y;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+// Test the private fields do not appear as properties before set to value
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#x"), "test 1");
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 2");
+assert(!Object.prototype.hasOwnProperty.call(c, "#x"), "test 3");
+
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#y"), "test 4");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 5");
+assert(!Object.prototype.hasOwnProperty.call(c, "#y"), "test 6");
+
+// Test if private fields can be sucessfully accessed and set to value
+assert.sameValue(C.x(), 42, "test 7");
+assert.sameValue(C.y(), 43, "test 8");
+
+// Test the private fields do not appear as properties before after set to value
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 9");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 10");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-method-static-private-methods-with-fields.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-method-static-private-methods-with-fields.js
new file mode 100644
index 0000000000..e4fd601e4c
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-method-static-private-methods-with-fields.js
@@ -0,0 +1,88 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/static-private-methods-with-fields.case
+// - src/class-elements/productions/cls-decl-after-same-line-method.template
+/*---
+description: static private methods with fields (field definitions after a method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class-static-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ static FieldDefinition ;
+
+ FieldDefinition :
+ ClassElementName Initializer_opt
+
+ ClassElementName :
+ PrivateName
+
+ PrivateName :
+ # IdentifierName
+
+---*/
+
+
+class C {
+ m() { return 42; } static #xVal; static #yVal;
+ static #x(value) {
+ this.#xVal = value;
+ return this.#xVal;
+ }
+ static #y(value) {
+ this.#yVal = value;
+ return this.#yVal;
+ }
+ static x() {
+ return this.#x(42);
+ }
+ static y() {
+ return this.#y(43);
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+// Test the private methods do not appear as properties before set to value
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#x"), "test 1");
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 2");
+assert(!Object.prototype.hasOwnProperty.call(c, "#x"), "test 3");
+
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#y"), "test 4");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 5");
+assert(!Object.prototype.hasOwnProperty.call(c, "#y"), "test 6");
+
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#xVal"), "test 7");
+assert(!Object.prototype.hasOwnProperty.call(C, "#xVal"), "test 8");
+assert(!Object.prototype.hasOwnProperty.call(c, "#xVal"), "test 9");
+
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#yVal"), "test 10");
+assert(!Object.prototype.hasOwnProperty.call(C, "#yVal"), "test 11");
+assert(!Object.prototype.hasOwnProperty.call(c, "#yVal"), "test 12");
+
+// Test if private fields can be sucessfully accessed and set to value
+assert.sameValue(C.x(), 42, "test 13");
+assert.sameValue(C.y(), 43, "test 14");
+
+// Test the private fields do not appear as properties before after set to value
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 15");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 16");
+
+assert(!Object.prototype.hasOwnProperty.call(C, "#xVal"), "test 17");
+assert(!Object.prototype.hasOwnProperty.call(C, "#yVal"), "test 18");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-method-static-private-methods.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-method-static-private-methods.js
new file mode 100644
index 0000000000..270229feb7
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-method-static-private-methods.js
@@ -0,0 +1,75 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/static-private-methods.case
+// - src/class-elements/productions/cls-decl-after-same-line-method.template
+/*---
+description: static private methods (field definitions after a method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ static FieldDefinition ;
+
+ FieldDefinition :
+ ClassElementName Initializer_opt
+
+ ClassElementName :
+ PrivateName
+
+ PrivateName :
+ # IdentifierName
+
+---*/
+
+
+class C {
+ m() { return 42; } ;
+ static #x(value) {
+ return value / 2;
+ }
+ static #y(value) {
+ return value * 2;
+ }
+ static x() {
+ return this.#x(84);
+ }
+ static y() {
+ return this.#y(43);
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+// Test the private methods do not appear as properties before set to value
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#x"), "test 1");
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 2");
+assert(!Object.prototype.hasOwnProperty.call(c, "#x"), "test 3");
+
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#y"), "test 4");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 5");
+assert(!Object.prototype.hasOwnProperty.call(c, "#y"), "test 6");
+
+// Test if private fields can be sucessfully accessed and set to value
+assert.sameValue(C.x(), 42, "test 7");
+assert.sameValue(C.y(), 86, "test 8");
+
+// Test the private fields do not appear as properties before after set to value
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 9");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 10");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-method-string-literal-names.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-method-string-literal-names.js
new file mode 100644
index 0000000000..237438afb9
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-method-string-literal-names.js
@@ -0,0 +1,109 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/string-literal-names.case
+// - src/class-elements/productions/cls-decl-after-same-line-method.template
+/*---
+description: String literal names (field definitions after a method in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-public, class]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement:
+ ...
+ FieldDefinition ;
+
+ FieldDefinition:
+ ClassElementName Initializer_opt
+
+ ClassElementName:
+ PropertyName
+
+---*/
+
+
+class C {
+ m() { return 42; } 'a'; "b"; 'c' = 39;
+ "d" = 42;
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "a"),
+ "a does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "a"),
+ "a does not appear as an own property on C constructor"
+);
+
+verifyProperty(c, "a", {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "b"),
+ "b does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "b"),
+ "b does not appear as an own property on C constructor"
+);
+
+verifyProperty(c, "b", {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "c"),
+ "c does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "c"),
+ "c does not appear as an own property on C constructor"
+);
+
+verifyProperty(c, "c", {
+ value: 39,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "d"),
+ "d does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "d"),
+ "d does not appear as an own property on C constructor"
+);
+
+verifyProperty(c, "d", {
+ value: 42,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-computed-names.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-computed-names.js
new file mode 100644
index 0000000000..b35242c6b8
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-computed-names.js
@@ -0,0 +1,123 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/computed-names.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-async-gen.template
+/*---
+description: Computed property names (field definitions after a static async generator in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-public, computed-property-names, class, async-iteration]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement:
+ ...
+ FieldDefinition ;
+
+ FieldDefinition:
+ ClassElementName Initializer_opt
+
+ ClassElementName:
+ PropertyName
+
+---*/
+var x = "b";
+
+
+
+class C {
+ static async *m() { return 42; } [x] = 42; [10] = "meep"; ["not initialized"];
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+C.m().next().then(function(v) {
+ assert.sameValue(v.value, 42);
+ assert.sameValue(v.done, true);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "b"),
+ "b doesn't appear as an own property on C prototype"
+ );
+ assert(
+ !Object.prototype.hasOwnProperty.call(C, "b"),
+ "b doesn't appear as an own property on C constructor"
+ );
+
+ verifyProperty(c, "b", {
+ value: 42,
+ enumerable: true,
+ writable: true,
+ configurable: true
+ });
+
+ assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "x"),
+ "x doesn't appear as an own property on C prototype"
+ );
+ assert(
+ !Object.prototype.hasOwnProperty.call(C, "x"),
+ "x doesn't appear as an own property on C constructor"
+ );
+ assert(
+ !Object.prototype.hasOwnProperty.call(c, "x"),
+ "x doesn't appear as an own property on C instance"
+ );
+
+ assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "10"),
+ "10 doesn't appear as an own property on C prototype"
+ );
+ assert(
+ !Object.prototype.hasOwnProperty.call(C, "10"),
+ "10 doesn't appear as an own property on C constructor"
+ );
+
+ verifyProperty(c, "10", {
+ value: "meep",
+ enumerable: true,
+ writable: true,
+ configurable: true
+ });
+
+ assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "not initialized"),
+ "'not initialized' doesn't appear as an own property on C prototype"
+ );
+ assert(
+ !Object.prototype.hasOwnProperty.call(C, "not initialized"),
+ "'not initialized' doesn't appear as an own property on C constructor"
+ );
+
+ verifyProperty(c, "not initialized", {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+ });
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-computed-symbol-names.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-computed-symbol-names.js
new file mode 100644
index 0000000000..aae8b31c6a
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-computed-symbol-names.js
@@ -0,0 +1,121 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/computed-symbol-names.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-async-gen.template
+/*---
+description: Computed property symbol names (field definitions after a static async generator in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-public, Symbol, computed-property-names, class, async-iteration]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement:
+ ...
+ FieldDefinition ;
+
+ FieldDefinition:
+ ClassElementName Initializer_opt
+
+ ClassElementName:
+ PropertyName
+
+---*/
+var x = Symbol();
+var y = Symbol();
+
+
+
+class C {
+ static async *m() { return 42; } [x]; [y] = 42;
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+C.m().next().then(function(v) {
+ assert.sameValue(v.value, 42);
+ assert.sameValue(v.done, true);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, x),
+ "Symbol x doesn't appear as an own property on C prototype"
+ );
+ assert(
+ !Object.prototype.hasOwnProperty.call(C, x),
+ "Symbol x doesn't appear as an own property on C constructor"
+ );
+
+ verifyProperty(c, x, {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+ });
+
+ assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, y),
+ "Symbol y doesn't appear as an own property on C prototype"
+ );
+ assert(
+ !Object.prototype.hasOwnProperty.call(C, y),
+ "Symbol y doesn't appear as an own property on C constructor"
+ );
+
+ verifyProperty(c, y, {
+ value: 42,
+ enumerable: true,
+ writable: true,
+ configurable: true
+ });
+
+ assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "x"),
+ "x doesn't appear as an own property on C prototype"
+ );
+ assert(
+ !Object.prototype.hasOwnProperty.call(C, "x"),
+ "x doesn't appear as an own property on C constructor"
+ );
+ assert(
+ !Object.prototype.hasOwnProperty.call(c, "x"),
+ "x doesn't appear as an own property on C instance"
+ );
+
+ assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "y"),
+ "y doesn't appear as an own property on C prototype"
+ );
+ assert(
+ !Object.prototype.hasOwnProperty.call(C, "y"),
+ "y doesn't appear as an own property on C constructor"
+ );
+ assert(
+ !Object.prototype.hasOwnProperty.call(c, "y"),
+ "y doesn't appear as an own property on C instance"
+ );
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-grammar-privatename-identifier-semantics-stringvalue.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-grammar-privatename-identifier-semantics-stringvalue.js
new file mode 100644
index 0000000000..03f68e5c2d
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-grammar-privatename-identifier-semantics-stringvalue.js
@@ -0,0 +1,125 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-privatename-identifier-semantics-stringvalue.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-async-gen.template
+/*---
+description: PrivateName Static Semantics, StringValue (field definitions after a static async generator in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public, async-iteration]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+
+ 1. Return the String value consisting of the sequence of code
+ units corresponding to PrivateName. In determining the sequence
+ any occurrences of \ UnicodeEscapeSequence are first replaced
+ with the code point represented by the UnicodeEscapeSequence
+ and then the code points of the entire PrivateName are converted
+ to code units by UTF16Encoding (10.1.1) each code point.
+
+---*/
+
+
+class C {
+ static async *m() { return 42; } #\u{6F};
+ #\u2118;
+ #ZW_\u200C_NJ;
+ #ZW_\u200D_J;;
+ o(value) {
+ this.#o = value;
+ return this.#o;
+ }
+ ℘(value) {
+ this.#℘ = value;
+ return this.#℘;
+ }
+ ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS METHOD
+ this.#ZW_‌_NJ = value;
+ return this.#ZW_‌_NJ;
+ }
+ ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS METHOD
+ this.#ZW_‍_J = value;
+ return this.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+C.m().next().then(function(v) {
+ assert.sameValue(v.value, 42);
+ assert.sameValue(v.done, true);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(c.o(1), 1);
+ assert.sameValue(c.℘(1), 1);
+ assert.sameValue(c.ZW_‌_NJ(1), 1);
+ assert.sameValue(c.ZW_‍_J(1), 1);
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-literal-names-asi.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-literal-names-asi.js
new file mode 100644
index 0000000000..65b1d89ceb
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-literal-names-asi.js
@@ -0,0 +1,93 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/literal-names-asi.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-async-gen.template
+/*---
+description: Literal property names with ASI (field definitions after a static async generator in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-public, class, async-iteration]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement:
+ ...
+ FieldDefinition ;
+
+ FieldDefinition:
+ ClassElementName Initializer_opt
+
+ ClassElementName:
+ PropertyName
+
+---*/
+
+
+class C {
+ static async *m() { return 42; } a
+ b = 42;;
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+C.m().next().then(function(v) {
+ assert.sameValue(v.value, 42);
+ assert.sameValue(v.done, true);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "a"),
+ "a doesn't appear as an own property on C prototype"
+ );
+ assert(
+ !Object.prototype.hasOwnProperty.call(C, "a"),
+ "a doesn't appear as an own property on C constructor"
+ );
+
+ verifyProperty(c, "a", {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+ });
+
+ assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "b"),
+ "b doesn't appear as an own property on C prototype"
+ );
+ assert(
+ !Object.prototype.hasOwnProperty.call(C, "b"),
+ "b doesn't appear as an own property on C constructor"
+ );
+
+ verifyProperty(c, "b", {
+ value: 42,
+ enumerable: true,
+ writable: true,
+ configurable: true
+ });
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-literal-names.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-literal-names.js
new file mode 100644
index 0000000000..d7b166f66b
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-literal-names.js
@@ -0,0 +1,112 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/literal-names.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-async-gen.template
+/*---
+description: Literal property names (field definitions after a static async generator in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-public, class, async-iteration]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement:
+ ...
+ FieldDefinition ;
+
+ FieldDefinition:
+ ClassElementName Initializer_opt
+
+ ClassElementName:
+ PropertyName
+
+---*/
+const fn = function() {}
+
+
+
+class C {
+ static async *m() { return 42; } a; b = 42;
+ c = fn;
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+C.m().next().then(function(v) {
+ assert.sameValue(v.value, 42);
+ assert.sameValue(v.done, true);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "a"),
+ "a doesn't appear as an own property on C prototype"
+ );
+ assert(
+ !Object.prototype.hasOwnProperty.call(C, "a"),
+ "a doesn't appear as an own property on C constructor"
+ );
+
+ verifyProperty(c, "a", {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+ });
+
+ assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "b"),
+ "b doesn't appear as an own property on C prototype"
+ );
+ assert(
+ !Object.prototype.hasOwnProperty.call(C, "b"),
+ "b doesn't appear as an own property on C constructor"
+ );
+
+ verifyProperty(c, "b", {
+ value: 42,
+ enumerable: true,
+ writable: true,
+ configurable: true
+ });
+
+ assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "c"),
+ "c doesn't appear as an own property on C prototype"
+ );
+ assert(
+ !Object.prototype.hasOwnProperty.call(C, "c"),
+ "c doesn't appear as an own property on C constructor"
+ );
+
+ verifyProperty(c, "c", {
+ value: fn,
+ enumerable: true,
+ writable: true,
+ configurable: true
+ });
+
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-private-field-usage.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-private-field-usage.js
new file mode 100644
index 0000000000..b0c07e816e
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-private-field-usage.js
@@ -0,0 +1,65 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-field-usage.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-async-gen.template
+/*---
+description: PrivateName CallExpression usage (private field) (field definitions after a static async generator in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public, async-iteration]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ Updated Productions
+
+ CallExpression[Yield, Await]:
+ CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+ SuperCall[?Yield, ?Await]
+ CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+ CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+ CallExpression[?Yield, ?Await].IdentifierName
+ CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+ CallExpression[?Yield, ?Await].PrivateName
+
+---*/
+
+
+class C {
+ static async *m() { return 42; } #m = 'test262';;
+ method() {
+ return this.#m;
+ }
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+C.m().next().then(function(v) {
+ assert.sameValue(v.value, 42);
+ assert.sameValue(v.done, true);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(c.method(), 'test262');
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-private-method-getter-usage.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-private-method-getter-usage.js
new file mode 100644
index 0000000000..5cd30a34b2
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-private-method-getter-usage.js
@@ -0,0 +1,65 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-method-getter-usage.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-async-gen.template
+/*---
+description: PrivateName CallExpression usage (Accesor get method) (field definitions after a static async generator in the same line)
+esid: prod-FieldDefinition
+features: [class-methods-private, class, class-fields-public, async-iteration]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ Updated Productions
+
+ CallExpression[Yield, Await]:
+ CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+ SuperCall[?Yield, ?Await]
+ CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+ CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+ CallExpression[?Yield, ?Await].IdentifierName
+ CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+ CallExpression[?Yield, ?Await].PrivateName
+
+---*/
+
+
+class C {
+ static async *m() { return 42; } get #m() { return 'test262'; };
+ method() {
+ return this.#m;
+ }
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+C.m().next().then(function(v) {
+ assert.sameValue(v.value, 42);
+ assert.sameValue(v.done, true);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(c.method(), 'test262');
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-private-method-usage.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-private-method-usage.js
new file mode 100644
index 0000000000..0d89868a9c
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-private-method-usage.js
@@ -0,0 +1,65 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-method-usage.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-async-gen.template
+/*---
+description: PrivateName CallExpression usage (private method) (field definitions after a static async generator in the same line)
+esid: prod-FieldDefinition
+features: [class-methods-private, class, class-fields-public, async-iteration]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ Updated Productions
+
+ CallExpression[Yield, Await]:
+ CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+ SuperCall[?Yield, ?Await]
+ CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+ CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+ CallExpression[?Yield, ?Await].IdentifierName
+ CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+ CallExpression[?Yield, ?Await].PrivateName
+
+---*/
+
+
+class C {
+ static async *m() { return 42; } #m() { return 'test262'; };
+ method() {
+ return this.#m();
+ }
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+C.m().next().then(function(v) {
+ assert.sameValue(v.value, 42);
+ assert.sameValue(v.done, true);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(c.method(), 'test262');
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-private-names.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-private-names.js
new file mode 100644
index 0000000000..e26beb8ed4
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-private-names.js
@@ -0,0 +1,87 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-names.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-async-gen.template
+/*---
+description: private names (field definitions after a static async generator in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public, async-iteration]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ FieldDefinition ;
+
+ FieldDefinition :
+ ClassElementName Initializer_opt
+
+ ClassElementName :
+ PrivateName
+
+ PrivateName :
+ # IdentifierName
+
+---*/
+
+
+class C {
+ static async *m() { return 42; } #x; #y;
+ x() {
+ this.#x = 42;
+ return this.#x;
+ }
+ y() {
+ this.#y = 43;
+ return this.#y;
+ }
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+C.m().next().then(function(v) {
+ assert.sameValue(v.value, 42);
+ assert.sameValue(v.done, true);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ // Test the private fields do not appear as properties before set to value
+ assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#x"), "test 1");
+ assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 2");
+ assert(!Object.prototype.hasOwnProperty.call(c, "#x"), "test 3");
+
+ assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#y"), "test 4");
+ assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 5");
+ assert(!Object.prototype.hasOwnProperty.call(c, "#y"), "test 6");
+
+ // Test if private fields can be sucessfully accessed and set to value
+ assert.sameValue(c.x(), 42, "test 7");
+ assert.sameValue(c.y(), 43, "test 8");
+
+ // Test the private fields do not appear as properties before after set to value
+ assert(!Object.prototype.hasOwnProperty.call(c, "#x"), "test 9");
+ assert(!Object.prototype.hasOwnProperty.call(c, "#y"), "test 10");
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-field-identifier-initializer.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-field-identifier-initializer.js
new file mode 100644
index 0000000000..4c96073070
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-field-identifier-initializer.js
@@ -0,0 +1,103 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-field-identifier-initializer.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-async-gen.template
+/*---
+description: Valid FieldDefinition (field definitions after a static async generator in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-public, class, async-iteration]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+
+ PropertyName :
+ LiteralPropertyName
+ ComputedPropertyName
+
+ LiteralPropertyName :
+ IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static async *m() { return 42; } $ = 1; _ = 1; \u{6F} = 1; \u2118 = 1; ZW_\u200C_NJ = 1; ZW_\u200D_J = 1;
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+C.m().next().then(function(v) {
+ assert.sameValue(v.value, 42);
+ assert.sameValue(v.done, true);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(c.$, 1);
+ assert.sameValue(c._, 1);
+ assert.sameValue(c.\u{6F}, 1);
+ assert.sameValue(c.\u2118, 1);
+ assert.sameValue(c.ZW_\u200C_NJ, 1);
+ assert.sameValue(c.ZW_\u200D_J, 1);
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-field-identifier.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-field-identifier.js
new file mode 100644
index 0000000000..00efefb715
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-field-identifier.js
@@ -0,0 +1,110 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-field-identifier.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-async-gen.template
+/*---
+description: Valid FieldDefinition (field definitions after a static async generator in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-public, class, async-iteration]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+
+ PropertyName :
+ LiteralPropertyName
+ ComputedPropertyName
+
+ LiteralPropertyName :
+ IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static async *m() { return 42; } $; _; \u{6F}; \u2118; ZW_\u200C_NJ; ZW_\u200D_J;
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+C.m().next().then(function(v) {
+ assert.sameValue(v.value, 42);
+ assert.sameValue(v.done, true);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ c.$ = 1;
+ c._ = 1;
+ c.\u{6F} = 1;
+ c.\u2118 = 1;
+ c.ZW_\u200C_NJ = 1;
+ c.ZW_\u200D_J = 1;
+
+ assert.sameValue(c.$, 1);
+ assert.sameValue(c._, 1);
+ assert.sameValue(c.\u{6F}, 1);
+ assert.sameValue(c.\u2118, 1);
+ assert.sameValue(c.ZW_\u200C_NJ, 1);
+ assert.sameValue(c.ZW_\u200D_J, 1);
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-private-getter-alt.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-private-getter-alt.js
new file mode 100644
index 0000000000..fb12e01736
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-private-getter-alt.js
@@ -0,0 +1,144 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-getter-alt.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-async-gen.template
+/*---
+description: Valid PrivateName as private getter (field definitions after a static async generator in the same line)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public, async-iteration]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ...
+ get ClassElementName ( ){ FunctionBody }
+ ...
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static async *m() { return 42; } #$_; #__; #\u{6F}_; #℘_; #ZW_‌_NJ_; #ZW_‍_J_;
+ get #$() {
+ return this.#$_;
+ }
+ get #_() {
+ return this.#__;
+ }
+ get #\u{6F}() {
+ return this.#\u{6F}_;
+ }
+ get #℘() {
+ return this.#℘_;
+ }
+ get #ZW_‌_NJ() {
+ return this.#ZW_‌_NJ_;
+ }
+ get #ZW_‍_J() {
+ return this.#ZW_‍_J_;
+ }
+;
+ $(value) {
+ this.#$_ = value;
+ return this.#$;
+ }
+ _(value) {
+ this.#__ = value;
+ return this.#_;
+ }
+ \u{6F}(value) {
+ this.#\u{6F}_ = value;
+ return this.#\u{6F};
+ }
+ ℘(value) {
+ this.#℘_ = value;
+ return this.#℘;
+ }
+ ZW_‌_NJ(value) {
+ this.#ZW_‌_NJ_ = value;
+ return this.#ZW_‌_NJ;
+ }
+ ZW_‍_J(value) {
+ this.#ZW_‍_J_ = value;
+ return this.#ZW_‍_J;
+ }
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+C.m().next().then(function(v) {
+ assert.sameValue(v.value, 42);
+ assert.sameValue(v.done, true);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(c.$(1), 1);
+ assert.sameValue(c._(1), 1);
+ assert.sameValue(c.\u{6F}(1), 1);
+ assert.sameValue(c.℘(1), 1);
+ assert.sameValue(c.ZW_‌_NJ(1), 1);
+ assert.sameValue(c.ZW_‍_J(1), 1);
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-private-getter.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-private-getter.js
new file mode 100644
index 0000000000..87bd8dd98d
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-private-getter.js
@@ -0,0 +1,144 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-getter.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-async-gen.template
+/*---
+description: Valid PrivateName as private getter (field definitions after a static async generator in the same line)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public, async-iteration]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ...
+ get ClassElementName ( ){ FunctionBody }
+ ...
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static async *m() { return 42; } #$_; #__; #\u{6F}_; #\u2118_; #ZW_\u200C_NJ_; #ZW_\u200D_J_;
+ get #$() {
+ return this.#$_;
+ }
+ get #_() {
+ return this.#__;
+ }
+ get #\u{6F}() {
+ return this.#\u{6F}_;
+ }
+ get #\u2118() {
+ return this.#\u2118_;
+ }
+ get #ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ_;
+ }
+ get #ZW_\u200D_J() {
+ return this.#ZW_\u200D_J_;
+ }
+;
+ $(value) {
+ this.#$_ = value;
+ return this.#$;
+ }
+ _(value) {
+ this.#__ = value;
+ return this.#_;
+ }
+ \u{6F}(value) {
+ this.#\u{6F}_ = value;
+ return this.#\u{6F};
+ }
+ \u2118(value) {
+ this.#\u2118_ = value;
+ return this.#\u2118;
+ }
+ ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ_ = value;
+ return this.#ZW_\u200C_NJ;
+ }
+ ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J_ = value;
+ return this.#ZW_\u200D_J;
+ }
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+C.m().next().then(function(v) {
+ assert.sameValue(v.value, 42);
+ assert.sameValue(v.done, true);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(c.$(1), 1);
+ assert.sameValue(c._(1), 1);
+ assert.sameValue(c.\u{6F}(1), 1);
+ assert.sameValue(c.\u2118(1), 1);
+ assert.sameValue(c.ZW_\u200C_NJ(1), 1);
+ assert.sameValue(c.ZW_\u200D_J(1), 1);
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-private-method-alt.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-private-method-alt.js
new file mode 100644
index 0000000000..bd308a9e5b
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-private-method-alt.js
@@ -0,0 +1,143 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-method-alt.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-async-gen.template
+/*---
+description: Valid PrivateName as private method (field definitions after a static async generator in the same line)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public, async-iteration]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ClassElementName ( UniqueFormalParameters ) { FunctionBody }
+ ...
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static async *m() { return 42; } #$_; #__; #\u{6F}_; #℘_; #ZW_‌_NJ_; #ZW_‍_J_;
+ #$() {
+ return this.#$_;
+ }
+ #_() {
+ return this.#__;
+ }
+ #\u{6F}() {
+ return this.#\u{6F}_;
+ }
+ #℘() {
+ return this.#℘_;
+ }
+ #ZW_‌_NJ() {
+ return this.#ZW_‌_NJ_;
+ }
+ #ZW_‍_J() {
+ return this.#ZW_‍_J_;
+ }
+;
+ $(value) {
+ this.#$_ = value;
+ return this.#$();
+ }
+ _(value) {
+ this.#__ = value;
+ return this.#_();
+ }
+ \u{6F}(value) {
+ this.#\u{6F}_ = value;
+ return this.#\u{6F}();
+ }
+ ℘(value) {
+ this.#℘_ = value;
+ return this.#℘();
+ }
+ ZW_‌_NJ(value) {
+ this.#ZW_‌_NJ_ = value;
+ return this.#ZW_‌_NJ();
+ }
+ ZW_‍_J(value) {
+ this.#ZW_‍_J_ = value;
+ return this.#ZW_‍_J();
+ }
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+C.m().next().then(function(v) {
+ assert.sameValue(v.value, 42);
+ assert.sameValue(v.done, true);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(c.$(1), 1);
+ assert.sameValue(c._(1), 1);
+ assert.sameValue(c.\u{6F}(1), 1);
+ assert.sameValue(c.℘(1), 1);
+ assert.sameValue(c.ZW_‌_NJ(1), 1);
+ assert.sameValue(c.ZW_‍_J(1), 1);
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-private-method.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-private-method.js
new file mode 100644
index 0000000000..0da6b2f5c9
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-private-method.js
@@ -0,0 +1,143 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-method.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-async-gen.template
+/*---
+description: Valid PrivateName as private method (field definitions after a static async generator in the same line)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public, async-iteration]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ClassElementName ( UniqueFormalParameters ) { FunctionBody }
+ ...
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static async *m() { return 42; } #$_; #__; #\u{6F}_; #\u2118_; #ZW_\u200C_NJ_; #ZW_\u200D_J_;
+ #$() {
+ return this.#$_;
+ }
+ #_() {
+ return this.#__;
+ }
+ #\u{6F}() {
+ return this.#\u{6F}_;
+ }
+ #\u2118() {
+ return this.#\u2118_;
+ }
+ #ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ_;
+ }
+ #ZW_\u200D_J() {
+ return this.#ZW_\u200D_J_;
+ }
+;
+ $(value) {
+ this.#$_ = value;
+ return this.#$();
+ }
+ _(value) {
+ this.#__ = value;
+ return this.#_();
+ }
+ \u{6F}(value) {
+ this.#\u{6F}_ = value;
+ return this.#\u{6F}();
+ }
+ \u2118(value) {
+ this.#\u2118_ = value;
+ return this.#\u2118();
+ }
+ ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ_ = value;
+ return this.#ZW_\u200C_NJ();
+ }
+ ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J_ = value;
+ return this.#ZW_\u200D_J();
+ }
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+C.m().next().then(function(v) {
+ assert.sameValue(v.value, 42);
+ assert.sameValue(v.done, true);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(c.$(1), 1);
+ assert.sameValue(c._(1), 1);
+ assert.sameValue(c.\u{6F}(1), 1);
+ assert.sameValue(c.\u2118(1), 1);
+ assert.sameValue(c.ZW_\u200C_NJ(1), 1);
+ assert.sameValue(c.ZW_\u200D_J(1), 1);
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-private-setter-alt.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-private-setter-alt.js
new file mode 100644
index 0000000000..5a836942f5
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-private-setter-alt.js
@@ -0,0 +1,143 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-setter-alt.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-async-gen.template
+/*---
+description: Valid PrivateName as private setter (field definitions after a static async generator in the same line)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public, async-iteration]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ...
+ set ClassElementName ( PropertySetParameterList ) { FunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static async *m() { return 42; } #$_; #__; #\u{6F}_; #℘_; #ZW_‌_NJ_; #ZW_‍_J_;
+ set #$(value) {
+ this.#$_ = value;
+ }
+ set #_(value) {
+ this.#__ = value;
+ }
+ set #\u{6F}(value) {
+ this.#\u{6F}_ = value;
+ }
+ set #℘(value) {
+ this.#℘_ = value;
+ }
+ set #ZW_‌_NJ(value) {
+ this.#ZW_‌_NJ_ = value;
+ }
+ set #ZW_‍_J(value) {
+ this.#ZW_‍_J_ = value;
+ }
+;
+ $(value) {
+ this.#$ = value;
+ return this.#$_;
+ }
+ _(value) {
+ this.#_ = value;
+ return this.#__;
+ }
+ \u{6F}(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F}_;
+ }
+ ℘(value) {
+ this.#℘ = value;
+ return this.#℘_;
+ }
+ ZW_‌_NJ(value) {
+ this.#ZW_‌_NJ = value;
+ return this.#ZW_‌_NJ_;
+ }
+ ZW_‍_J(value) {
+ this.#ZW_‍_J = value;
+ return this.#ZW_‍_J_;
+ }
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+C.m().next().then(function(v) {
+ assert.sameValue(v.value, 42);
+ assert.sameValue(v.done, true);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(c.$(1), 1);
+ assert.sameValue(c._(1), 1);
+ assert.sameValue(c.\u{6F}(1), 1);
+ assert.sameValue(c.℘(1), 1);
+ assert.sameValue(c.ZW_‌_NJ(1), 1);
+ assert.sameValue(c.ZW_‍_J(1), 1);
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-private-setter.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-private-setter.js
new file mode 100644
index 0000000000..fed08f1199
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-private-setter.js
@@ -0,0 +1,143 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-setter.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-async-gen.template
+/*---
+description: Valid PrivateName as private setter (field definitions after a static async generator in the same line)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public, async-iteration]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ...
+ set ClassElementName ( PropertySetParameterList ) { FunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static async *m() { return 42; } #$_; #__; #\u{6F}_; #\u2118_; #ZW_\u200C_NJ_; #ZW_\u200D_J_;
+ set #$(value) {
+ this.#$_ = value;
+ }
+ set #_(value) {
+ this.#__ = value;
+ }
+ set #\u{6F}(value) {
+ this.#\u{6F}_ = value;
+ }
+ set #\u2118(value) {
+ this.#\u2118_ = value;
+ }
+ set #ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ_ = value;
+ }
+ set #ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J_ = value;
+ }
+;
+ $(value) {
+ this.#$ = value;
+ return this.#$_;
+ }
+ _(value) {
+ this.#_ = value;
+ return this.#__;
+ }
+ \u{6F}(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F}_;
+ }
+ \u2118(value) {
+ this.#\u2118 = value;
+ return this.#\u2118_;
+ }
+ ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ = value;
+ return this.#ZW_\u200C_NJ_;
+ }
+ ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J = value;
+ return this.#ZW_\u200D_J_;
+ }
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+C.m().next().then(function(v) {
+ assert.sameValue(v.value, 42);
+ assert.sameValue(v.done, true);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(c.$(1), 1);
+ assert.sameValue(c._(1), 1);
+ assert.sameValue(c.\u{6F}(1), 1);
+ assert.sameValue(c.\u2118(1), 1);
+ assert.sameValue(c.ZW_\u200C_NJ(1), 1);
+ assert.sameValue(c.ZW_\u200D_J(1), 1);
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-privatename-identifier-alt.js
new file mode 100644
index 0000000000..66df105495
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-privatename-identifier-alt.js
@@ -0,0 +1,125 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-async-gen.template
+/*---
+description: Valid PrivateName (field definitions after a static async generator in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public, async-iteration]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static async *m() { return 42; } #$; #_; #\u{6F}; #℘; #ZW_‌_NJ; #ZW_‍_J;
+ $(value) {
+ this.#$ = value;
+ return this.#$;
+ }
+ _(value) {
+ this.#_ = value;
+ return this.#_;
+ }
+ \u{6F}(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F};
+ }
+ ℘(value) {
+ this.#℘ = value;
+ return this.#℘;
+ }
+ ZW_‌_NJ(value) {
+ this.#ZW_‌_NJ = value;
+ return this.#ZW_‌_NJ;
+ }
+ ZW_‍_J(value) {
+ this.#ZW_‍_J = value;
+ return this.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+C.m().next().then(function(v) {
+ assert.sameValue(v.value, 42);
+ assert.sameValue(v.done, true);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(c.$(1), 1);
+ assert.sameValue(c._(1), 1);
+ assert.sameValue(c.\u{6F}(1), 1);
+ assert.sameValue(c.℘(1), 1);
+ assert.sameValue(c.ZW_‌_NJ(1), 1);
+ assert.sameValue(c.ZW_‍_J(1), 1);
+
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-privatename-identifier-initializer-alt.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-privatename-identifier-initializer-alt.js
new file mode 100644
index 0000000000..7f9f67af2e
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-privatename-identifier-initializer-alt.js
@@ -0,0 +1,119 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-privatename-identifier-initializer-alt.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-async-gen.template
+/*---
+description: Valid PrivateName (field definitions after a static async generator in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public, async-iteration]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static async *m() { return 42; } #$ = 1; #_ = 1; #\u{6F} = 1; #℘ = 1; #ZW_‌_NJ = 1; #ZW_‍_J = 1;
+ $() {
+ return this.#$;
+ }
+ _() {
+ return this.#_;
+ }
+ \u{6F}() {
+ return this.#\u{6F};
+ }
+ ℘() {
+ return this.#℘;
+ }
+ ZW_‌_NJ() {
+ return this.#ZW_‌_NJ;
+ }
+ ZW_‍_J() {
+ return this.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+C.m().next().then(function(v) {
+ assert.sameValue(v.value, 42);
+ assert.sameValue(v.done, true);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(c.$(), 1);
+ assert.sameValue(c._(), 1);
+ assert.sameValue(c.\u{6F}(), 1);
+ assert.sameValue(c.℘(), 1);
+ assert.sameValue(c.ZW_‌_NJ(), 1);
+ assert.sameValue(c.ZW_‍_J(), 1);
+
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-privatename-identifier-initializer.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-privatename-identifier-initializer.js
new file mode 100644
index 0000000000..7c288c4d25
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-privatename-identifier-initializer.js
@@ -0,0 +1,119 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-privatename-identifier-initializer.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-async-gen.template
+/*---
+description: Valid PrivateName (field definitions after a static async generator in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public, async-iteration]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static async *m() { return 42; } #$ = 1; #_ = 1; #\u{6F} = 1; #\u2118 = 1; #ZW_\u200C_NJ = 1; #ZW_\u200D_J = 1;
+ $() {
+ return this.#$;
+ }
+ _() {
+ return this.#_;
+ }
+ \u{6F}() {
+ return this.#\u{6F};
+ }
+ \u2118() {
+ return this.#\u2118;
+ }
+ ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ;
+ }
+ ZW_\u200D_J() {
+ return this.#ZW_\u200D_J;
+ }
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+C.m().next().then(function(v) {
+ assert.sameValue(v.value, 42);
+ assert.sameValue(v.done, true);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(c.$(), 1);
+ assert.sameValue(c._(), 1);
+ assert.sameValue(c.\u{6F}(), 1);
+ assert.sameValue(c.\u2118(), 1);
+ assert.sameValue(c.ZW_\u200C_NJ(), 1);
+ assert.sameValue(c.ZW_\u200D_J(), 1);
+
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-privatename-identifier.js
new file mode 100644
index 0000000000..2444782434
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-privatename-identifier.js
@@ -0,0 +1,125 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-async-gen.template
+/*---
+description: Valid PrivateName (field definitions after a static async generator in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public, async-iteration]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static async *m() { return 42; } #$; #_; #\u{6F}; #\u2118; #ZW_\u200C_NJ; #ZW_\u200D_J;
+ $(value) {
+ this.#$ = value;
+ return this.#$;
+ }
+ _(value) {
+ this.#_ = value;
+ return this.#_;
+ }
+ \u{6F}(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F};
+ }
+ \u2118(value) {
+ this.#\u2118 = value;
+ return this.#\u2118;
+ }
+ ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ = value;
+ return this.#ZW_\u200C_NJ;
+ }
+ ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J = value;
+ return this.#ZW_\u200D_J;
+ }
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+C.m().next().then(function(v) {
+ assert.sameValue(v.value, 42);
+ assert.sameValue(v.done, true);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(c.$(1), 1);
+ assert.sameValue(c._(1), 1);
+ assert.sameValue(c.\u{6F}(1), 1);
+ assert.sameValue(c.\u2118(1), 1);
+ assert.sameValue(c.ZW_\u200C_NJ(1), 1);
+ assert.sameValue(c.ZW_\u200D_J(1), 1);
+
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-static-async-generator-method-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-static-async-generator-method-privatename-identifier-alt.js
new file mode 100644
index 0000000000..41d3335fbe
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-static-async-generator-method-privatename-identifier-alt.js
@@ -0,0 +1,151 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-async-generator-method-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-async-gen.template
+/*---
+description: Valid Static AsyncGeneratorMethod PrivateName (field definitions after a static async generator in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public, async-iteration]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static async *m() { return 42; } static async * #$(value) {
+ yield * await value;
+ }
+ static async * #_(value) {
+ yield * await value;
+ }
+ static async * #o(value) {
+ yield * await value;
+ }
+ static async * #℘(value) {
+ yield * await value;
+ }
+ static async * #ZW_‌_NJ(value) {
+ yield * await value;
+ }
+ static async * #ZW_‍_J(value) {
+ yield * await value;
+ };
+ static get $() {
+ return this.#$;
+ }
+ static get _() {
+ return this.#_;
+ }
+ static get o() {
+ return this.#o;
+ }
+ static get ℘() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#℘;
+ }
+ static get ZW_‌_NJ() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‌_NJ;
+ }
+ static get ZW_‍_J() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‍_J;
+ }
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+C.m().next().then(function(v) {
+ assert.sameValue(v.value, 42);
+ assert.sameValue(v.done, true);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ Promise.all([
+ C.$([1]).next(),
+ C._([1]).next(),
+ C.o([1]).next(),
+ C.℘([1]).next(), // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.ZW_‌_NJ([1]).next(), // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.ZW_‍_J([1]).next(), // DO NOT CHANGE THE NAME OF THIS FIELD
+ ]).then(results => {
+
+ assert.sameValue(results[0].value, 1);
+ assert.sameValue(results[1].value, 1);
+ assert.sameValue(results[2].value, 1);
+ assert.sameValue(results[3].value, 1);
+ assert.sameValue(results[4].value, 1);
+ assert.sameValue(results[5].value, 1);
+
+ }).then($DONE, $DONE);
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-static-async-generator-method-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-static-async-generator-method-privatename-identifier.js
new file mode 100644
index 0000000000..b9b0312fcd
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-static-async-generator-method-privatename-identifier.js
@@ -0,0 +1,152 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-async-generator-method-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-async-gen.template
+/*---
+description: Valid Static AsyncGeneratorMethod PrivateName (field definitions after a static async generator in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public, async-iteration]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static async *m() { return 42; } static async * #$(value) {
+ yield * await value;
+ }
+ static async * #_(value) {
+ yield * await value;
+ }
+ static async * #\u{6F}(value) {
+ yield * await value;
+ }
+ static async * #\u2118(value) {
+ yield * await value;
+ }
+ static async * #ZW_\u200C_NJ(value) {
+ yield * await value;
+ }
+ static async * #ZW_\u200D_J(value) {
+ yield * await value;
+ };
+ static get $() {
+ return this.#$;
+ }
+ static get _() {
+ return this.#_;
+ }
+ static get \u{6F}() {
+ return this.#\u{6F};
+ }
+ static get \u2118() {
+ return this.#\u2118;
+ }
+ static get ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ;
+ }
+ static get ZW_\u200D_J() {
+ return this.#ZW_\u200D_J;
+ }
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+C.m().next().then(function(v) {
+ assert.sameValue(v.value, 42);
+ assert.sameValue(v.done, true);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ Promise.all([
+ C.$([1]).next(),
+ C._([1]).next(),
+ C.\u{6F}([1]).next(),
+ C.\u2118([1]).next(),
+ C.ZW_\u200C_NJ([1]).next(),
+ C.ZW_\u200D_J([1]).next(),
+ ]).then(results => {
+
+ assert.sameValue(results[0].value, 1);
+ assert.sameValue(results[1].value, 1);
+ assert.sameValue(results[2].value, 1);
+ assert.sameValue(results[3].value, 1);
+ assert.sameValue(results[4].value, 1);
+ assert.sameValue(results[5].value, 1);
+
+ }).then($DONE, $DONE);
+
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-static-async-method-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-static-async-method-privatename-identifier-alt.js
new file mode 100644
index 0000000000..c8393918b5
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-static-async-method-privatename-identifier-alt.js
@@ -0,0 +1,151 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-async-method-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-async-gen.template
+/*---
+description: Valid Static AsyncMethod PrivateName (field definitions after a static async generator in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public, async-iteration]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ AsyncMethod
+
+ AsyncMethod :
+ async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static async *m() { return 42; } static async #$(value) {
+ return await value;
+ }
+ static async #_(value) {
+ return await value;
+ }
+ static async #o(value) {
+ return await value;
+ }
+ static async #℘(value) {
+ return await value;
+ }
+ static async #ZW_‌_NJ(value) {
+ return await value;
+ }
+ static async #ZW_‍_J(value) {
+ return await value;
+ };
+ static async $(value) {
+ return await this.#$(value);
+ }
+ static async _(value) {
+ return await this.#_(value);
+ }
+ static async o(value) {
+ return await this.#o(value);
+ }
+ static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return await this.#℘(value);
+ }
+ static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return await this.#ZW_‌_NJ(value);
+ }
+ static async ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return await this.#ZW_‍_J(value);
+ }
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+C.m().next().then(function(v) {
+ assert.sameValue(v.value, 42);
+ assert.sameValue(v.done, true);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ Promise.all([
+ C.$(1),
+ C._(1),
+ C.o(1),
+ C.℘(1), // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.ZW_‌_NJ(1), // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.ZW_‍_J(1), // DO NOT CHANGE THE NAME OF THIS FIELD
+ ]).then(results => {
+
+ assert.sameValue(results[0], 1);
+ assert.sameValue(results[1], 1);
+ assert.sameValue(results[2], 1);
+ assert.sameValue(results[3], 1);
+ assert.sameValue(results[4], 1);
+ assert.sameValue(results[5], 1);
+
+ }).then($DONE, $DONE);
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-static-async-method-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-static-async-method-privatename-identifier.js
new file mode 100644
index 0000000000..9d5dda52d9
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-static-async-method-privatename-identifier.js
@@ -0,0 +1,152 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-async-method-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-async-gen.template
+/*---
+description: Valid Static AsyncMethod PrivateName (field definitions after a static async generator in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public, async-iteration]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ AsyncMethod
+
+ AsyncMethod :
+ async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static async *m() { return 42; } static async #$(value) {
+ return await value;
+ }
+ static async #_(value) {
+ return await value;
+ }
+ static async #\u{6F}(value) {
+ return await value;
+ }
+ static async #\u2118(value) {
+ return await value;
+ }
+ static async #ZW_\u200C_NJ(value) {
+ return await value;
+ }
+ static async #ZW_\u200D_J(value) {
+ return await value;
+ };
+ static async $(value) {
+ return await this.#$(value);
+ }
+ static async _(value) {
+ return await this.#_(value);
+ }
+ static async \u{6F}(value) {
+ return await this.#\u{6F}(value);
+ }
+ static async \u2118(value) {
+ return await this.#\u2118(value);
+ }
+ static async ZW_\u200C_NJ(value) {
+ return await this.#ZW_\u200C_NJ(value);
+ }
+ static async ZW_\u200D_J(value) {
+ return await this.#ZW_\u200D_J(value);
+ }
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+C.m().next().then(function(v) {
+ assert.sameValue(v.value, 42);
+ assert.sameValue(v.done, true);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ Promise.all([
+ C.$(1),
+ C._(1),
+ C.\u{6F}(1),
+ C.\u2118(1),
+ C.ZW_\u200C_NJ(1),
+ C.ZW_\u200D_J(1),
+ ]).then(results => {
+
+ assert.sameValue(results[0], 1);
+ assert.sameValue(results[1], 1);
+ assert.sameValue(results[2], 1);
+ assert.sameValue(results[3], 1);
+ assert.sameValue(results[4], 1);
+ assert.sameValue(results[5], 1);
+
+ }).then($DONE, $DONE);
+
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-static-generator-method-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-static-generator-method-privatename-identifier-alt.js
new file mode 100644
index 0000000000..761cece4b6
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-static-generator-method-privatename-identifier-alt.js
@@ -0,0 +1,140 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-generator-method-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-async-gen.template
+/*---
+description: Valid Static GeneratorMethod PrivateName (field definitions after a static async generator in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public, async-iteration]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ GeneratorMethod
+
+ GeneratorMethod :
+ * ClassElementName ( UniqueFormalParameters ){ GeneratorBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static async *m() { return 42; } static * #$(value) {
+ yield * value;
+ }
+ static * #_(value) {
+ yield * value;
+ }
+ static * #o(value) {
+ yield * value;
+ }
+ static * #℘(value) {
+ yield * value;
+ }
+ static * #ZW_‌_NJ(value) {
+ yield * value;
+ }
+ static * #ZW_‍_J(value) {
+ yield * value;
+ };
+ static get $() {
+ return this.#$;
+ }
+ static get _() {
+ return this.#_;
+ }
+ static get o() {
+ return this.#o;
+ }
+ static get ℘() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#℘;
+ }
+ static get ZW_‌_NJ() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‌_NJ;
+ }
+ static get ZW_‍_J() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‍_J;
+ }
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+C.m().next().then(function(v) {
+ assert.sameValue(v.value, 42);
+ assert.sameValue(v.done, true);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(C.$([1]).next().value, 1);
+ assert.sameValue(C._([1]).next().value, 1);
+ assert.sameValue(C.o([1]).next().value, 1);
+ assert.sameValue(C.℘([1]).next().value, 1);
+ assert.sameValue(C.ZW_‌_NJ([1]).next().value, 1);
+ assert.sameValue(C.ZW_‍_J([1]).next().value, 1);
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-static-generator-method-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-static-generator-method-privatename-identifier.js
new file mode 100644
index 0000000000..3ea2b56719
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-static-generator-method-privatename-identifier.js
@@ -0,0 +1,141 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-generator-method-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-async-gen.template
+/*---
+description: Valid Static GeneratorMethod PrivateName (field definitions after a static async generator in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public, async-iteration]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ GeneratorMethod
+
+ GeneratorMethod :
+ * ClassElementName ( UniqueFormalParameters ){ GeneratorBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static async *m() { return 42; } static * #$(value) {
+ yield * value;
+ }
+ static * #_(value) {
+ yield * value;
+ }
+ static * #\u{6F}(value) {
+ yield * value;
+ }
+ static * #\u2118(value) {
+ yield * value;
+ }
+ static * #ZW_\u200C_NJ(value) {
+ yield * value;
+ }
+ static * #ZW_\u200D_J(value) {
+ yield * value;
+ };
+ static get $() {
+ return this.#$;
+ }
+ static get _() {
+ return this.#_;
+ }
+ static get \u{6F}() {
+ return this.#\u{6F};
+ }
+ static get \u2118() {
+ return this.#\u2118;
+ }
+ static get ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ;
+ }
+ static get ZW_\u200D_J() {
+ return this.#ZW_\u200D_J;
+ }
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+C.m().next().then(function(v) {
+ assert.sameValue(v.value, 42);
+ assert.sameValue(v.done, true);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(C.$([1]).next().value, 1);
+ assert.sameValue(C._([1]).next().value, 1);
+ assert.sameValue(C.\u{6F}([1]).next().value, 1);
+ assert.sameValue(C.\u2118([1]).next().value, 1);
+ assert.sameValue(C.ZW_\u200C_NJ([1]).next().value, 1);
+ assert.sameValue(C.ZW_\u200D_J([1]).next().value, 1);
+
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-static-method-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-static-method-privatename-identifier-alt.js
new file mode 100644
index 0000000000..91f9274f4b
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-static-method-privatename-identifier-alt.js
@@ -0,0 +1,138 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-method-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-async-gen.template
+/*---
+description: Valid Static Method PrivateName (field definitions after a static async generator in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public, async-iteration]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ ClassElementName ( UniqueFormalParameters ){ FunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static async *m() { return 42; } static #$(value) {
+ return value;
+ }
+ static #_(value) {
+ return value;
+ }
+ static #o(value) {
+ return value;
+ }
+ static #℘(value) {
+ return value;
+ }
+ static #ZW_‌_NJ(value) {
+ return value;
+ }
+ static #ZW_‍_J(value) {
+ return value;
+ };
+ static $(value) {
+ return this.#$(value);
+ }
+ static _(value) {
+ return this.#_(value);
+ }
+ static o(value) {
+ return this.#o(value);
+ }
+ static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#℘(value);
+ }
+ static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‌_NJ(value);
+ }
+ static ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‍_J(value);
+ }
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+C.m().next().then(function(v) {
+ assert.sameValue(v.value, 42);
+ assert.sameValue(v.done, true);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(C.$(1), 1);
+ assert.sameValue(C._(1), 1);
+ assert.sameValue(C.o(1), 1);
+ assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+ assert.sameValue(C.ZW_‌_NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+ assert.sameValue(C.ZW_‍_J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-static-method-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-static-method-privatename-identifier.js
new file mode 100644
index 0000000000..a7bf117c42
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-static-method-privatename-identifier.js
@@ -0,0 +1,138 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-method-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-async-gen.template
+/*---
+description: Valid Static Method PrivateName (field definitions after a static async generator in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public, async-iteration]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ ClassElementName ( UniqueFormalParameters ){ FunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static async *m() { return 42; } static #$(value) {
+ return value;
+ }
+ static #_(value) {
+ return value;
+ }
+ static #\u{6F}(value) {
+ return value;
+ }
+ static #\u2118(value) {
+ return value;
+ }
+ static #ZW_\u200C_NJ(value) {
+ return value;
+ }
+ static #ZW_\u200D_J(value) {
+ return value;
+ };
+ static $(value) {
+ return this.#$(value);
+ }
+ static _(value) {
+ return this.#_(value);
+ }
+ static \u{6F}(value) {
+ return this.#\u{6F}(value);
+ }
+ static \u2118(value) {
+ return this.#\u2118(value);
+ }
+ static ZW_\u200C_NJ(value) {
+ return this.#ZW_\u200C_NJ(value);
+ }
+ static ZW_\u200D_J(value) {
+ return this.#ZW_\u200D_J(value);
+ }
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+C.m().next().then(function(v) {
+ assert.sameValue(v.value, 42);
+ assert.sameValue(v.done, true);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(C.$(1), 1);
+ assert.sameValue(C._(1), 1);
+ assert.sameValue(C.\u{6F}(1), 1);
+ assert.sameValue(C.\u2118(1), 1);
+ assert.sameValue(C.ZW_\u200C_NJ(1), 1);
+ assert.sameValue(C.ZW_\u200D_J(1), 1);
+
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-static-privatename-identifier-alt-by-classname.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-static-privatename-identifier-alt-by-classname.js
new file mode 100644
index 0000000000..0f77e9e8eb
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-static-privatename-identifier-alt-by-classname.js
@@ -0,0 +1,126 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-alt-by-classname.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-async-gen.template
+/*---
+description: Valid Static PrivateName (field definitions after a static async generator in the same line)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public, async-iteration]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static async *m() { return 42; } static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_‍_J;
+ static $(value) {
+ C.#$ = value;
+ return C.#$;
+ }
+ static _(value) {
+ C.#_ = value;
+ return C.#_;
+ }
+ static o(value) {
+ C.#\u{6F} = value;
+ return C.#\u{6F};
+ }
+ static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.#℘ = value;
+ return C.#℘;
+ }
+ static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.#ZW_‌_NJ = value;
+ return C.#ZW_‌_NJ;
+ }
+ static ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.#ZW_‍_J = value;
+ return C.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+C.m().next().then(function(v) {
+ assert.sameValue(v.value, 42);
+ assert.sameValue(v.done, true);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(C.$(1), 1);
+ assert.sameValue(C._(1), 1);
+ assert.sameValue(C.o(1), 1);
+ assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+ assert.sameValue(C.ZW_‌_NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+ assert.sameValue(C.ZW_‍_J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-static-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-static-privatename-identifier-alt.js
new file mode 100644
index 0000000000..ae45b1641c
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-static-privatename-identifier-alt.js
@@ -0,0 +1,126 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-async-gen.template
+/*---
+description: Valid Static PrivateName (field definitions after a static async generator in the same line)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public, async-iteration]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static async *m() { return 42; } static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_‍_J;
+ static $(value) {
+ this.#$ = value;
+ return this.#$;
+ }
+ static _(value) {
+ this.#_ = value;
+ return this.#_;
+ }
+ static o(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F};
+ }
+ static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ this.#℘ = value;
+ return this.#℘;
+ }
+ static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ this.#ZW_‌_NJ = value;
+ return this.#ZW_‌_NJ;
+ }
+ static ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ this.#ZW_‍_J = value;
+ return this.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+C.m().next().then(function(v) {
+ assert.sameValue(v.value, 42);
+ assert.sameValue(v.done, true);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(C.$(1), 1);
+ assert.sameValue(C._(1), 1);
+ assert.sameValue(C.o(1), 1);
+ assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+ assert.sameValue(C.ZW_‌_NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+ assert.sameValue(C.ZW_‍_J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-static-privatename-identifier-by-classname.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-static-privatename-identifier-by-classname.js
new file mode 100644
index 0000000000..5f13adfca2
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-static-privatename-identifier-by-classname.js
@@ -0,0 +1,126 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-by-classname.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-async-gen.template
+/*---
+description: Valid Static PrivateName (field definitions after a static async generator in the same line)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public, async-iteration]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static async *m() { return 42; } static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J;
+ static $(value) {
+ C.#$ = value;
+ return C.#$;
+ }
+ static _(value) {
+ C.#_ = value;
+ return C.#_;
+ }
+ static \u{6F}(value) {
+ C.#\u{6F} = value;
+ return C.#\u{6F};
+ }
+ static \u2118(value) {
+ C.#\u2118 = value;
+ return C.#\u2118;
+ }
+ static ZW_\u200C_NJ(value) {
+ C.#ZW_\u200C_NJ = value;
+ return C.#ZW_\u200C_NJ;
+ }
+ static ZW_\u200D_J(value) {
+ C.#ZW_\u200D_J = value;
+ return C.#ZW_\u200D_J;
+ }
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+C.m().next().then(function(v) {
+ assert.sameValue(v.value, 42);
+ assert.sameValue(v.done, true);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(C.$(1), 1);
+ assert.sameValue(C._(1), 1);
+ assert.sameValue(C.\u{6F}(1), 1);
+ assert.sameValue(C.\u2118(1), 1);
+ assert.sameValue(C.ZW_\u200C_NJ(1), 1);
+ assert.sameValue(C.ZW_\u200D_J(1), 1);
+
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js
new file mode 100644
index 0000000000..c7f4af9477
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js
@@ -0,0 +1,120 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-initializer-alt-by-classname.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-async-gen.template
+/*---
+description: Valid Static PrivateName (field definitions after a static async generator in the same line)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public, async-iteration]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static async *m() { return 42; } static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_‍_J = 1;
+ static $() {
+ return C.#$;
+ }
+ static _() {
+ return C.#_;
+ }
+ static \u{6F}() {
+ return C.#\u{6F};
+ }
+ static ℘() {
+ return C.#℘;
+ }
+ static ZW_‌_NJ() {
+ return C.#ZW_‌_NJ;
+ }
+ static ZW_‍_J() {
+ return C.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+C.m().next().then(function(v) {
+ assert.sameValue(v.value, 42);
+ assert.sameValue(v.done, true);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(C.$(), 1);
+ assert.sameValue(C._(), 1);
+ assert.sameValue(C.\u{6F}(), 1);
+ assert.sameValue(C.℘(), 1);
+ assert.sameValue(C.ZW_‌_NJ(), 1);
+ assert.sameValue(C.ZW_‍_J(), 1);
+
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-static-privatename-identifier-initializer-alt.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-static-privatename-identifier-initializer-alt.js
new file mode 100644
index 0000000000..0a2c38a716
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-static-privatename-identifier-initializer-alt.js
@@ -0,0 +1,120 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-initializer-alt.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-async-gen.template
+/*---
+description: Valid Static PrivateName (field definitions after a static async generator in the same line)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public, async-iteration]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static async *m() { return 42; } static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_‍_J = 1;
+ static $() {
+ return this.#$;
+ }
+ static _() {
+ return this.#_;
+ }
+ static \u{6F}() {
+ return this.#\u{6F};
+ }
+ static ℘() {
+ return this.#℘;
+ }
+ static ZW_‌_NJ() {
+ return this.#ZW_‌_NJ;
+ }
+ static ZW_‍_J() {
+ return this.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+C.m().next().then(function(v) {
+ assert.sameValue(v.value, 42);
+ assert.sameValue(v.done, true);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(C.$(), 1);
+ assert.sameValue(C._(), 1);
+ assert.sameValue(C.\u{6F}(), 1);
+ assert.sameValue(C.℘(), 1);
+ assert.sameValue(C.ZW_‌_NJ(), 1);
+ assert.sameValue(C.ZW_‍_J(), 1);
+
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-static-privatename-identifier-initializer.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-static-privatename-identifier-initializer.js
new file mode 100644
index 0000000000..aa7d3bac77
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-static-privatename-identifier-initializer.js
@@ -0,0 +1,120 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-initializer.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-async-gen.template
+/*---
+description: Valid Static PrivateName (field definitions after a static async generator in the same line)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public, async-iteration]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static async *m() { return 42; } static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #\u2118 = 1; static #ZW_\u200C_NJ = 1; static #ZW_\u200D_J = 1;
+ static $() {
+ return this.#$;
+ }
+ static _() {
+ return this.#_;
+ }
+ static \u{6F}() {
+ return this.#\u{6F};
+ }
+ static \u2118() {
+ return this.#\u2118;
+ }
+ static ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ;
+ }
+ static ZW_\u200D_J() {
+ return this.#ZW_\u200D_J;
+ }
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+C.m().next().then(function(v) {
+ assert.sameValue(v.value, 42);
+ assert.sameValue(v.done, true);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(C.$(), 1);
+ assert.sameValue(C._(), 1);
+ assert.sameValue(C.\u{6F}(), 1);
+ assert.sameValue(C.\u2118(), 1);
+ assert.sameValue(C.ZW_\u200C_NJ(), 1);
+ assert.sameValue(C.ZW_\u200D_J(), 1);
+
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-static-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-static-privatename-identifier.js
new file mode 100644
index 0000000000..18b3ba5665
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-rs-static-privatename-identifier.js
@@ -0,0 +1,126 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-async-gen.template
+/*---
+description: Valid Static PrivateName (field definitions after a static async generator in the same line)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public, async-iteration]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static async *m() { return 42; } static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J;
+ static $(value) {
+ this.#$ = value;
+ return this.#$;
+ }
+ static _(value) {
+ this.#_ = value;
+ return this.#_;
+ }
+ static \u{6F}(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F};
+ }
+ static \u2118(value) {
+ this.#\u2118 = value;
+ return this.#\u2118;
+ }
+ static ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ = value;
+ return this.#ZW_\u200C_NJ;
+ }
+ static ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J = value;
+ return this.#ZW_\u200D_J;
+ }
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+C.m().next().then(function(v) {
+ assert.sameValue(v.value, 42);
+ assert.sameValue(v.done, true);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(C.$(1), 1);
+ assert.sameValue(C._(1), 1);
+ assert.sameValue(C.\u{6F}(1), 1);
+ assert.sameValue(C.\u2118(1), 1);
+ assert.sameValue(C.ZW_\u200C_NJ(1), 1);
+ assert.sameValue(C.ZW_\u200D_J(1), 1);
+
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-static-private-fields.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-static-private-fields.js
new file mode 100644
index 0000000000..bd3e1e0cee
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-static-private-fields.js
@@ -0,0 +1,87 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/static-private-fields.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-async-gen.template
+/*---
+description: static private fields (field definitions after a static async generator in the same line)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public, async-iteration]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ static FieldDefinition ;
+
+ FieldDefinition :
+ ClassElementName Initializer_opt
+
+ ClassElementName :
+ PrivateName
+
+ PrivateName :
+ # IdentifierName
+
+---*/
+
+
+class C {
+ static async *m() { return 42; } static #x; static #y;
+ static x() {
+ this.#x = 42;
+ return this.#x;
+ }
+ static y() {
+ this.#y = 43;
+ return this.#y;
+ }
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+C.m().next().then(function(v) {
+ assert.sameValue(v.value, 42);
+ assert.sameValue(v.done, true);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ // Test the private fields do not appear as properties before set to value
+ assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#x"), "test 1");
+ assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 2");
+ assert(!Object.prototype.hasOwnProperty.call(c, "#x"), "test 3");
+
+ assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#y"), "test 4");
+ assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 5");
+ assert(!Object.prototype.hasOwnProperty.call(c, "#y"), "test 6");
+
+ // Test if private fields can be sucessfully accessed and set to value
+ assert.sameValue(C.x(), 42, "test 7");
+ assert.sameValue(C.y(), 43, "test 8");
+
+ // Test the private fields do not appear as properties before after set to value
+ assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 9");
+ assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 10");
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-static-private-methods-with-fields.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-static-private-methods-with-fields.js
new file mode 100644
index 0000000000..e246f8b47e
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-static-private-methods-with-fields.js
@@ -0,0 +1,104 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/static-private-methods-with-fields.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-async-gen.template
+/*---
+description: static private methods with fields (field definitions after a static async generator in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class-static-fields-private, class, class-fields-public, async-iteration]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ static FieldDefinition ;
+
+ FieldDefinition :
+ ClassElementName Initializer_opt
+
+ ClassElementName :
+ PrivateName
+
+ PrivateName :
+ # IdentifierName
+
+---*/
+
+
+class C {
+ static async *m() { return 42; } static #xVal; static #yVal;
+ static #x(value) {
+ this.#xVal = value;
+ return this.#xVal;
+ }
+ static #y(value) {
+ this.#yVal = value;
+ return this.#yVal;
+ }
+ static x() {
+ return this.#x(42);
+ }
+ static y() {
+ return this.#y(43);
+ }
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+C.m().next().then(function(v) {
+ assert.sameValue(v.value, 42);
+ assert.sameValue(v.done, true);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ // Test the private methods do not appear as properties before set to value
+ assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#x"), "test 1");
+ assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 2");
+ assert(!Object.prototype.hasOwnProperty.call(c, "#x"), "test 3");
+
+ assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#y"), "test 4");
+ assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 5");
+ assert(!Object.prototype.hasOwnProperty.call(c, "#y"), "test 6");
+
+ assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#xVal"), "test 7");
+ assert(!Object.prototype.hasOwnProperty.call(C, "#xVal"), "test 8");
+ assert(!Object.prototype.hasOwnProperty.call(c, "#xVal"), "test 9");
+
+ assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#yVal"), "test 10");
+ assert(!Object.prototype.hasOwnProperty.call(C, "#yVal"), "test 11");
+ assert(!Object.prototype.hasOwnProperty.call(c, "#yVal"), "test 12");
+
+ // Test if private fields can be sucessfully accessed and set to value
+ assert.sameValue(C.x(), 42, "test 13");
+ assert.sameValue(C.y(), 43, "test 14");
+
+ // Test the private fields do not appear as properties before after set to value
+ assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 15");
+ assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 16");
+
+ assert(!Object.prototype.hasOwnProperty.call(C, "#xVal"), "test 17");
+ assert(!Object.prototype.hasOwnProperty.call(C, "#yVal"), "test 18");
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-static-private-methods.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-static-private-methods.js
new file mode 100644
index 0000000000..68d55b4ea7
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-static-private-methods.js
@@ -0,0 +1,91 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/static-private-methods.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-async-gen.template
+/*---
+description: static private methods (field definitions after a static async generator in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public, async-iteration]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ static FieldDefinition ;
+
+ FieldDefinition :
+ ClassElementName Initializer_opt
+
+ ClassElementName :
+ PrivateName
+
+ PrivateName :
+ # IdentifierName
+
+---*/
+
+
+class C {
+ static async *m() { return 42; } ;
+ static #x(value) {
+ return value / 2;
+ }
+ static #y(value) {
+ return value * 2;
+ }
+ static x() {
+ return this.#x(84);
+ }
+ static y() {
+ return this.#y(43);
+ }
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+C.m().next().then(function(v) {
+ assert.sameValue(v.value, 42);
+ assert.sameValue(v.done, true);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ // Test the private methods do not appear as properties before set to value
+ assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#x"), "test 1");
+ assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 2");
+ assert(!Object.prototype.hasOwnProperty.call(c, "#x"), "test 3");
+
+ assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#y"), "test 4");
+ assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 5");
+ assert(!Object.prototype.hasOwnProperty.call(c, "#y"), "test 6");
+
+ // Test if private fields can be sucessfully accessed and set to value
+ assert.sameValue(C.x(), 42, "test 7");
+ assert.sameValue(C.y(), 86, "test 8");
+
+ // Test the private fields do not appear as properties before after set to value
+ assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 9");
+ assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 10");
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-string-literal-names.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-string-literal-names.js
new file mode 100644
index 0000000000..ec25462639
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-gen-string-literal-names.js
@@ -0,0 +1,125 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/string-literal-names.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-async-gen.template
+/*---
+description: String literal names (field definitions after a static async generator in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-public, class, async-iteration]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement:
+ ...
+ FieldDefinition ;
+
+ FieldDefinition:
+ ClassElementName Initializer_opt
+
+ ClassElementName:
+ PropertyName
+
+---*/
+
+
+class C {
+ static async *m() { return 42; } 'a'; "b"; 'c' = 39;
+ "d" = 42;
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+C.m().next().then(function(v) {
+ assert.sameValue(v.value, 42);
+ assert.sameValue(v.done, true);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "a"),
+ "a does not appear as an own property on C prototype"
+ );
+ assert(
+ !Object.prototype.hasOwnProperty.call(C, "a"),
+ "a does not appear as an own property on C constructor"
+ );
+
+ verifyProperty(c, "a", {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+ });
+
+ assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "b"),
+ "b does not appear as an own property on C prototype"
+ );
+ assert(
+ !Object.prototype.hasOwnProperty.call(C, "b"),
+ "b does not appear as an own property on C constructor"
+ );
+
+ verifyProperty(c, "b", {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+ });
+
+ assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "c"),
+ "c does not appear as an own property on C prototype"
+ );
+ assert(
+ !Object.prototype.hasOwnProperty.call(C, "c"),
+ "c does not appear as an own property on C constructor"
+ );
+
+ verifyProperty(c, "c", {
+ value: 39,
+ enumerable: true,
+ writable: true,
+ configurable: true
+ });
+
+ assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "d"),
+ "d does not appear as an own property on C prototype"
+ );
+ assert(
+ !Object.prototype.hasOwnProperty.call(C, "d"),
+ "d does not appear as an own property on C constructor"
+ );
+
+ verifyProperty(c, "d", {
+ value: 42,
+ enumerable: true,
+ writable: true,
+ configurable: true
+ });
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-computed-names.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-computed-names.js
new file mode 100644
index 0000000000..45d08b8f74
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-computed-names.js
@@ -0,0 +1,122 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/computed-names.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-async-method.template
+/*---
+description: Computed property names (field definitions after a static async method in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-public, computed-property-names, class, async-functions]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement:
+ ...
+ FieldDefinition ;
+
+ FieldDefinition:
+ ClassElementName Initializer_opt
+
+ ClassElementName:
+ PropertyName
+
+---*/
+var x = "b";
+
+
+
+class C {
+ static async m() { return 42; } [x] = 42; [10] = "meep"; ["not initialized"];
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+C.m().then(function(v) {
+ assert.sameValue(v, 42);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "b"),
+ "b doesn't appear as an own property on C prototype"
+ );
+ assert(
+ !Object.prototype.hasOwnProperty.call(C, "b"),
+ "b doesn't appear as an own property on C constructor"
+ );
+
+ verifyProperty(c, "b", {
+ value: 42,
+ enumerable: true,
+ writable: true,
+ configurable: true
+ });
+
+ assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "x"),
+ "x doesn't appear as an own property on C prototype"
+ );
+ assert(
+ !Object.prototype.hasOwnProperty.call(C, "x"),
+ "x doesn't appear as an own property on C constructor"
+ );
+ assert(
+ !Object.prototype.hasOwnProperty.call(c, "x"),
+ "x doesn't appear as an own property on C instance"
+ );
+
+ assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "10"),
+ "10 doesn't appear as an own property on C prototype"
+ );
+ assert(
+ !Object.prototype.hasOwnProperty.call(C, "10"),
+ "10 doesn't appear as an own property on C constructor"
+ );
+
+ verifyProperty(c, "10", {
+ value: "meep",
+ enumerable: true,
+ writable: true,
+ configurable: true
+ });
+
+ assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "not initialized"),
+ "'not initialized' doesn't appear as an own property on C prototype"
+ );
+ assert(
+ !Object.prototype.hasOwnProperty.call(C, "not initialized"),
+ "'not initialized' doesn't appear as an own property on C constructor"
+ );
+
+ verifyProperty(c, "not initialized", {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+ });
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-computed-symbol-names.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-computed-symbol-names.js
new file mode 100644
index 0000000000..84f0a9d350
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-computed-symbol-names.js
@@ -0,0 +1,120 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/computed-symbol-names.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-async-method.template
+/*---
+description: Computed property symbol names (field definitions after a static async method in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-public, Symbol, computed-property-names, class, async-functions]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement:
+ ...
+ FieldDefinition ;
+
+ FieldDefinition:
+ ClassElementName Initializer_opt
+
+ ClassElementName:
+ PropertyName
+
+---*/
+var x = Symbol();
+var y = Symbol();
+
+
+
+class C {
+ static async m() { return 42; } [x]; [y] = 42;
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+C.m().then(function(v) {
+ assert.sameValue(v, 42);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, x),
+ "Symbol x doesn't appear as an own property on C prototype"
+ );
+ assert(
+ !Object.prototype.hasOwnProperty.call(C, x),
+ "Symbol x doesn't appear as an own property on C constructor"
+ );
+
+ verifyProperty(c, x, {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+ });
+
+ assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, y),
+ "Symbol y doesn't appear as an own property on C prototype"
+ );
+ assert(
+ !Object.prototype.hasOwnProperty.call(C, y),
+ "Symbol y doesn't appear as an own property on C constructor"
+ );
+
+ verifyProperty(c, y, {
+ value: 42,
+ enumerable: true,
+ writable: true,
+ configurable: true
+ });
+
+ assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "x"),
+ "x doesn't appear as an own property on C prototype"
+ );
+ assert(
+ !Object.prototype.hasOwnProperty.call(C, "x"),
+ "x doesn't appear as an own property on C constructor"
+ );
+ assert(
+ !Object.prototype.hasOwnProperty.call(c, "x"),
+ "x doesn't appear as an own property on C instance"
+ );
+
+ assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "y"),
+ "y doesn't appear as an own property on C prototype"
+ );
+ assert(
+ !Object.prototype.hasOwnProperty.call(C, "y"),
+ "y doesn't appear as an own property on C constructor"
+ );
+ assert(
+ !Object.prototype.hasOwnProperty.call(c, "y"),
+ "y doesn't appear as an own property on C instance"
+ );
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-grammar-privatename-identifier-semantics-stringvalue.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-grammar-privatename-identifier-semantics-stringvalue.js
new file mode 100644
index 0000000000..44434bf5cf
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-grammar-privatename-identifier-semantics-stringvalue.js
@@ -0,0 +1,124 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-privatename-identifier-semantics-stringvalue.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-async-method.template
+/*---
+description: PrivateName Static Semantics, StringValue (field definitions after a static async method in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public, async-functions]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+
+ 1. Return the String value consisting of the sequence of code
+ units corresponding to PrivateName. In determining the sequence
+ any occurrences of \ UnicodeEscapeSequence are first replaced
+ with the code point represented by the UnicodeEscapeSequence
+ and then the code points of the entire PrivateName are converted
+ to code units by UTF16Encoding (10.1.1) each code point.
+
+---*/
+
+
+class C {
+ static async m() { return 42; } #\u{6F};
+ #\u2118;
+ #ZW_\u200C_NJ;
+ #ZW_\u200D_J;;
+ o(value) {
+ this.#o = value;
+ return this.#o;
+ }
+ ℘(value) {
+ this.#℘ = value;
+ return this.#℘;
+ }
+ ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS METHOD
+ this.#ZW_‌_NJ = value;
+ return this.#ZW_‌_NJ;
+ }
+ ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS METHOD
+ this.#ZW_‍_J = value;
+ return this.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+C.m().then(function(v) {
+ assert.sameValue(v, 42);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(c.o(1), 1);
+ assert.sameValue(c.℘(1), 1);
+ assert.sameValue(c.ZW_‌_NJ(1), 1);
+ assert.sameValue(c.ZW_‍_J(1), 1);
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-literal-names-asi.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-literal-names-asi.js
new file mode 100644
index 0000000000..b8b32df078
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-literal-names-asi.js
@@ -0,0 +1,92 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/literal-names-asi.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-async-method.template
+/*---
+description: Literal property names with ASI (field definitions after a static async method in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-public, class, async-functions]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement:
+ ...
+ FieldDefinition ;
+
+ FieldDefinition:
+ ClassElementName Initializer_opt
+
+ ClassElementName:
+ PropertyName
+
+---*/
+
+
+class C {
+ static async m() { return 42; } a
+ b = 42;;
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+C.m().then(function(v) {
+ assert.sameValue(v, 42);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "a"),
+ "a doesn't appear as an own property on C prototype"
+ );
+ assert(
+ !Object.prototype.hasOwnProperty.call(C, "a"),
+ "a doesn't appear as an own property on C constructor"
+ );
+
+ verifyProperty(c, "a", {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+ });
+
+ assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "b"),
+ "b doesn't appear as an own property on C prototype"
+ );
+ assert(
+ !Object.prototype.hasOwnProperty.call(C, "b"),
+ "b doesn't appear as an own property on C constructor"
+ );
+
+ verifyProperty(c, "b", {
+ value: 42,
+ enumerable: true,
+ writable: true,
+ configurable: true
+ });
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-literal-names.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-literal-names.js
new file mode 100644
index 0000000000..c3e17e41e3
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-literal-names.js
@@ -0,0 +1,111 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/literal-names.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-async-method.template
+/*---
+description: Literal property names (field definitions after a static async method in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-public, class, async-functions]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement:
+ ...
+ FieldDefinition ;
+
+ FieldDefinition:
+ ClassElementName Initializer_opt
+
+ ClassElementName:
+ PropertyName
+
+---*/
+const fn = function() {}
+
+
+
+class C {
+ static async m() { return 42; } a; b = 42;
+ c = fn;
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+C.m().then(function(v) {
+ assert.sameValue(v, 42);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "a"),
+ "a doesn't appear as an own property on C prototype"
+ );
+ assert(
+ !Object.prototype.hasOwnProperty.call(C, "a"),
+ "a doesn't appear as an own property on C constructor"
+ );
+
+ verifyProperty(c, "a", {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+ });
+
+ assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "b"),
+ "b doesn't appear as an own property on C prototype"
+ );
+ assert(
+ !Object.prototype.hasOwnProperty.call(C, "b"),
+ "b doesn't appear as an own property on C constructor"
+ );
+
+ verifyProperty(c, "b", {
+ value: 42,
+ enumerable: true,
+ writable: true,
+ configurable: true
+ });
+
+ assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "c"),
+ "c doesn't appear as an own property on C prototype"
+ );
+ assert(
+ !Object.prototype.hasOwnProperty.call(C, "c"),
+ "c doesn't appear as an own property on C constructor"
+ );
+
+ verifyProperty(c, "c", {
+ value: fn,
+ enumerable: true,
+ writable: true,
+ configurable: true
+ });
+
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-private-field-usage.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-private-field-usage.js
new file mode 100644
index 0000000000..d03f6c1397
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-private-field-usage.js
@@ -0,0 +1,64 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-field-usage.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-async-method.template
+/*---
+description: PrivateName CallExpression usage (private field) (field definitions after a static async method in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public, async-functions]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ Updated Productions
+
+ CallExpression[Yield, Await]:
+ CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+ SuperCall[?Yield, ?Await]
+ CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+ CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+ CallExpression[?Yield, ?Await].IdentifierName
+ CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+ CallExpression[?Yield, ?Await].PrivateName
+
+---*/
+
+
+class C {
+ static async m() { return 42; } #m = 'test262';;
+ method() {
+ return this.#m;
+ }
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+C.m().then(function(v) {
+ assert.sameValue(v, 42);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(c.method(), 'test262');
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-private-method-getter-usage.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-private-method-getter-usage.js
new file mode 100644
index 0000000000..6aebe67a3a
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-private-method-getter-usage.js
@@ -0,0 +1,64 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-method-getter-usage.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-async-method.template
+/*---
+description: PrivateName CallExpression usage (Accesor get method) (field definitions after a static async method in the same line)
+esid: prod-FieldDefinition
+features: [class-methods-private, class, class-fields-public, async-functions]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ Updated Productions
+
+ CallExpression[Yield, Await]:
+ CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+ SuperCall[?Yield, ?Await]
+ CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+ CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+ CallExpression[?Yield, ?Await].IdentifierName
+ CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+ CallExpression[?Yield, ?Await].PrivateName
+
+---*/
+
+
+class C {
+ static async m() { return 42; } get #m() { return 'test262'; };
+ method() {
+ return this.#m;
+ }
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+C.m().then(function(v) {
+ assert.sameValue(v, 42);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(c.method(), 'test262');
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-private-method-usage.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-private-method-usage.js
new file mode 100644
index 0000000000..06af954028
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-private-method-usage.js
@@ -0,0 +1,64 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-method-usage.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-async-method.template
+/*---
+description: PrivateName CallExpression usage (private method) (field definitions after a static async method in the same line)
+esid: prod-FieldDefinition
+features: [class-methods-private, class, class-fields-public, async-functions]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ Updated Productions
+
+ CallExpression[Yield, Await]:
+ CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+ SuperCall[?Yield, ?Await]
+ CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+ CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+ CallExpression[?Yield, ?Await].IdentifierName
+ CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+ CallExpression[?Yield, ?Await].PrivateName
+
+---*/
+
+
+class C {
+ static async m() { return 42; } #m() { return 'test262'; };
+ method() {
+ return this.#m();
+ }
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+C.m().then(function(v) {
+ assert.sameValue(v, 42);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(c.method(), 'test262');
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-private-names.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-private-names.js
new file mode 100644
index 0000000000..c708d97643
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-private-names.js
@@ -0,0 +1,86 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-names.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-async-method.template
+/*---
+description: private names (field definitions after a static async method in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public, async-functions]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ FieldDefinition ;
+
+ FieldDefinition :
+ ClassElementName Initializer_opt
+
+ ClassElementName :
+ PrivateName
+
+ PrivateName :
+ # IdentifierName
+
+---*/
+
+
+class C {
+ static async m() { return 42; } #x; #y;
+ x() {
+ this.#x = 42;
+ return this.#x;
+ }
+ y() {
+ this.#y = 43;
+ return this.#y;
+ }
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+C.m().then(function(v) {
+ assert.sameValue(v, 42);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ // Test the private fields do not appear as properties before set to value
+ assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#x"), "test 1");
+ assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 2");
+ assert(!Object.prototype.hasOwnProperty.call(c, "#x"), "test 3");
+
+ assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#y"), "test 4");
+ assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 5");
+ assert(!Object.prototype.hasOwnProperty.call(c, "#y"), "test 6");
+
+ // Test if private fields can be sucessfully accessed and set to value
+ assert.sameValue(c.x(), 42, "test 7");
+ assert.sameValue(c.y(), 43, "test 8");
+
+ // Test the private fields do not appear as properties before after set to value
+ assert(!Object.prototype.hasOwnProperty.call(c, "#x"), "test 9");
+ assert(!Object.prototype.hasOwnProperty.call(c, "#y"), "test 10");
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-field-identifier-initializer.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-field-identifier-initializer.js
new file mode 100644
index 0000000000..0478e82a3e
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-field-identifier-initializer.js
@@ -0,0 +1,102 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-field-identifier-initializer.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-async-method.template
+/*---
+description: Valid FieldDefinition (field definitions after a static async method in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-public, class, async-functions]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+
+ PropertyName :
+ LiteralPropertyName
+ ComputedPropertyName
+
+ LiteralPropertyName :
+ IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static async m() { return 42; } $ = 1; _ = 1; \u{6F} = 1; \u2118 = 1; ZW_\u200C_NJ = 1; ZW_\u200D_J = 1;
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+C.m().then(function(v) {
+ assert.sameValue(v, 42);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(c.$, 1);
+ assert.sameValue(c._, 1);
+ assert.sameValue(c.\u{6F}, 1);
+ assert.sameValue(c.\u2118, 1);
+ assert.sameValue(c.ZW_\u200C_NJ, 1);
+ assert.sameValue(c.ZW_\u200D_J, 1);
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-field-identifier.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-field-identifier.js
new file mode 100644
index 0000000000..acc2fc42e6
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-field-identifier.js
@@ -0,0 +1,109 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-field-identifier.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-async-method.template
+/*---
+description: Valid FieldDefinition (field definitions after a static async method in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-public, class, async-functions]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+
+ PropertyName :
+ LiteralPropertyName
+ ComputedPropertyName
+
+ LiteralPropertyName :
+ IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static async m() { return 42; } $; _; \u{6F}; \u2118; ZW_\u200C_NJ; ZW_\u200D_J;
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+C.m().then(function(v) {
+ assert.sameValue(v, 42);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ c.$ = 1;
+ c._ = 1;
+ c.\u{6F} = 1;
+ c.\u2118 = 1;
+ c.ZW_\u200C_NJ = 1;
+ c.ZW_\u200D_J = 1;
+
+ assert.sameValue(c.$, 1);
+ assert.sameValue(c._, 1);
+ assert.sameValue(c.\u{6F}, 1);
+ assert.sameValue(c.\u2118, 1);
+ assert.sameValue(c.ZW_\u200C_NJ, 1);
+ assert.sameValue(c.ZW_\u200D_J, 1);
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-private-getter-alt.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-private-getter-alt.js
new file mode 100644
index 0000000000..b6099085f5
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-private-getter-alt.js
@@ -0,0 +1,143 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-getter-alt.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-async-method.template
+/*---
+description: Valid PrivateName as private getter (field definitions after a static async method in the same line)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public, async-functions]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ...
+ get ClassElementName ( ){ FunctionBody }
+ ...
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static async m() { return 42; } #$_; #__; #\u{6F}_; #℘_; #ZW_‌_NJ_; #ZW_‍_J_;
+ get #$() {
+ return this.#$_;
+ }
+ get #_() {
+ return this.#__;
+ }
+ get #\u{6F}() {
+ return this.#\u{6F}_;
+ }
+ get #℘() {
+ return this.#℘_;
+ }
+ get #ZW_‌_NJ() {
+ return this.#ZW_‌_NJ_;
+ }
+ get #ZW_‍_J() {
+ return this.#ZW_‍_J_;
+ }
+;
+ $(value) {
+ this.#$_ = value;
+ return this.#$;
+ }
+ _(value) {
+ this.#__ = value;
+ return this.#_;
+ }
+ \u{6F}(value) {
+ this.#\u{6F}_ = value;
+ return this.#\u{6F};
+ }
+ ℘(value) {
+ this.#℘_ = value;
+ return this.#℘;
+ }
+ ZW_‌_NJ(value) {
+ this.#ZW_‌_NJ_ = value;
+ return this.#ZW_‌_NJ;
+ }
+ ZW_‍_J(value) {
+ this.#ZW_‍_J_ = value;
+ return this.#ZW_‍_J;
+ }
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+C.m().then(function(v) {
+ assert.sameValue(v, 42);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(c.$(1), 1);
+ assert.sameValue(c._(1), 1);
+ assert.sameValue(c.\u{6F}(1), 1);
+ assert.sameValue(c.℘(1), 1);
+ assert.sameValue(c.ZW_‌_NJ(1), 1);
+ assert.sameValue(c.ZW_‍_J(1), 1);
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-private-getter.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-private-getter.js
new file mode 100644
index 0000000000..98f74abd65
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-private-getter.js
@@ -0,0 +1,143 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-getter.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-async-method.template
+/*---
+description: Valid PrivateName as private getter (field definitions after a static async method in the same line)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public, async-functions]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ...
+ get ClassElementName ( ){ FunctionBody }
+ ...
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static async m() { return 42; } #$_; #__; #\u{6F}_; #\u2118_; #ZW_\u200C_NJ_; #ZW_\u200D_J_;
+ get #$() {
+ return this.#$_;
+ }
+ get #_() {
+ return this.#__;
+ }
+ get #\u{6F}() {
+ return this.#\u{6F}_;
+ }
+ get #\u2118() {
+ return this.#\u2118_;
+ }
+ get #ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ_;
+ }
+ get #ZW_\u200D_J() {
+ return this.#ZW_\u200D_J_;
+ }
+;
+ $(value) {
+ this.#$_ = value;
+ return this.#$;
+ }
+ _(value) {
+ this.#__ = value;
+ return this.#_;
+ }
+ \u{6F}(value) {
+ this.#\u{6F}_ = value;
+ return this.#\u{6F};
+ }
+ \u2118(value) {
+ this.#\u2118_ = value;
+ return this.#\u2118;
+ }
+ ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ_ = value;
+ return this.#ZW_\u200C_NJ;
+ }
+ ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J_ = value;
+ return this.#ZW_\u200D_J;
+ }
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+C.m().then(function(v) {
+ assert.sameValue(v, 42);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(c.$(1), 1);
+ assert.sameValue(c._(1), 1);
+ assert.sameValue(c.\u{6F}(1), 1);
+ assert.sameValue(c.\u2118(1), 1);
+ assert.sameValue(c.ZW_\u200C_NJ(1), 1);
+ assert.sameValue(c.ZW_\u200D_J(1), 1);
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-private-method-alt.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-private-method-alt.js
new file mode 100644
index 0000000000..9487c5a922
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-private-method-alt.js
@@ -0,0 +1,142 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-method-alt.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-async-method.template
+/*---
+description: Valid PrivateName as private method (field definitions after a static async method in the same line)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public, async-functions]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ClassElementName ( UniqueFormalParameters ) { FunctionBody }
+ ...
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static async m() { return 42; } #$_; #__; #\u{6F}_; #℘_; #ZW_‌_NJ_; #ZW_‍_J_;
+ #$() {
+ return this.#$_;
+ }
+ #_() {
+ return this.#__;
+ }
+ #\u{6F}() {
+ return this.#\u{6F}_;
+ }
+ #℘() {
+ return this.#℘_;
+ }
+ #ZW_‌_NJ() {
+ return this.#ZW_‌_NJ_;
+ }
+ #ZW_‍_J() {
+ return this.#ZW_‍_J_;
+ }
+;
+ $(value) {
+ this.#$_ = value;
+ return this.#$();
+ }
+ _(value) {
+ this.#__ = value;
+ return this.#_();
+ }
+ \u{6F}(value) {
+ this.#\u{6F}_ = value;
+ return this.#\u{6F}();
+ }
+ ℘(value) {
+ this.#℘_ = value;
+ return this.#℘();
+ }
+ ZW_‌_NJ(value) {
+ this.#ZW_‌_NJ_ = value;
+ return this.#ZW_‌_NJ();
+ }
+ ZW_‍_J(value) {
+ this.#ZW_‍_J_ = value;
+ return this.#ZW_‍_J();
+ }
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+C.m().then(function(v) {
+ assert.sameValue(v, 42);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(c.$(1), 1);
+ assert.sameValue(c._(1), 1);
+ assert.sameValue(c.\u{6F}(1), 1);
+ assert.sameValue(c.℘(1), 1);
+ assert.sameValue(c.ZW_‌_NJ(1), 1);
+ assert.sameValue(c.ZW_‍_J(1), 1);
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-private-method.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-private-method.js
new file mode 100644
index 0000000000..79d032d5fa
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-private-method.js
@@ -0,0 +1,142 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-method.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-async-method.template
+/*---
+description: Valid PrivateName as private method (field definitions after a static async method in the same line)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public, async-functions]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ClassElementName ( UniqueFormalParameters ) { FunctionBody }
+ ...
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static async m() { return 42; } #$_; #__; #\u{6F}_; #\u2118_; #ZW_\u200C_NJ_; #ZW_\u200D_J_;
+ #$() {
+ return this.#$_;
+ }
+ #_() {
+ return this.#__;
+ }
+ #\u{6F}() {
+ return this.#\u{6F}_;
+ }
+ #\u2118() {
+ return this.#\u2118_;
+ }
+ #ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ_;
+ }
+ #ZW_\u200D_J() {
+ return this.#ZW_\u200D_J_;
+ }
+;
+ $(value) {
+ this.#$_ = value;
+ return this.#$();
+ }
+ _(value) {
+ this.#__ = value;
+ return this.#_();
+ }
+ \u{6F}(value) {
+ this.#\u{6F}_ = value;
+ return this.#\u{6F}();
+ }
+ \u2118(value) {
+ this.#\u2118_ = value;
+ return this.#\u2118();
+ }
+ ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ_ = value;
+ return this.#ZW_\u200C_NJ();
+ }
+ ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J_ = value;
+ return this.#ZW_\u200D_J();
+ }
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+C.m().then(function(v) {
+ assert.sameValue(v, 42);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(c.$(1), 1);
+ assert.sameValue(c._(1), 1);
+ assert.sameValue(c.\u{6F}(1), 1);
+ assert.sameValue(c.\u2118(1), 1);
+ assert.sameValue(c.ZW_\u200C_NJ(1), 1);
+ assert.sameValue(c.ZW_\u200D_J(1), 1);
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-private-setter-alt.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-private-setter-alt.js
new file mode 100644
index 0000000000..6b74c9edd0
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-private-setter-alt.js
@@ -0,0 +1,142 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-setter-alt.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-async-method.template
+/*---
+description: Valid PrivateName as private setter (field definitions after a static async method in the same line)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public, async-functions]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ...
+ set ClassElementName ( PropertySetParameterList ) { FunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static async m() { return 42; } #$_; #__; #\u{6F}_; #℘_; #ZW_‌_NJ_; #ZW_‍_J_;
+ set #$(value) {
+ this.#$_ = value;
+ }
+ set #_(value) {
+ this.#__ = value;
+ }
+ set #\u{6F}(value) {
+ this.#\u{6F}_ = value;
+ }
+ set #℘(value) {
+ this.#℘_ = value;
+ }
+ set #ZW_‌_NJ(value) {
+ this.#ZW_‌_NJ_ = value;
+ }
+ set #ZW_‍_J(value) {
+ this.#ZW_‍_J_ = value;
+ }
+;
+ $(value) {
+ this.#$ = value;
+ return this.#$_;
+ }
+ _(value) {
+ this.#_ = value;
+ return this.#__;
+ }
+ \u{6F}(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F}_;
+ }
+ ℘(value) {
+ this.#℘ = value;
+ return this.#℘_;
+ }
+ ZW_‌_NJ(value) {
+ this.#ZW_‌_NJ = value;
+ return this.#ZW_‌_NJ_;
+ }
+ ZW_‍_J(value) {
+ this.#ZW_‍_J = value;
+ return this.#ZW_‍_J_;
+ }
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+C.m().then(function(v) {
+ assert.sameValue(v, 42);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(c.$(1), 1);
+ assert.sameValue(c._(1), 1);
+ assert.sameValue(c.\u{6F}(1), 1);
+ assert.sameValue(c.℘(1), 1);
+ assert.sameValue(c.ZW_‌_NJ(1), 1);
+ assert.sameValue(c.ZW_‍_J(1), 1);
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-private-setter.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-private-setter.js
new file mode 100644
index 0000000000..c5bf8ab5e8
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-private-setter.js
@@ -0,0 +1,142 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-setter.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-async-method.template
+/*---
+description: Valid PrivateName as private setter (field definitions after a static async method in the same line)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public, async-functions]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ...
+ set ClassElementName ( PropertySetParameterList ) { FunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static async m() { return 42; } #$_; #__; #\u{6F}_; #\u2118_; #ZW_\u200C_NJ_; #ZW_\u200D_J_;
+ set #$(value) {
+ this.#$_ = value;
+ }
+ set #_(value) {
+ this.#__ = value;
+ }
+ set #\u{6F}(value) {
+ this.#\u{6F}_ = value;
+ }
+ set #\u2118(value) {
+ this.#\u2118_ = value;
+ }
+ set #ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ_ = value;
+ }
+ set #ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J_ = value;
+ }
+;
+ $(value) {
+ this.#$ = value;
+ return this.#$_;
+ }
+ _(value) {
+ this.#_ = value;
+ return this.#__;
+ }
+ \u{6F}(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F}_;
+ }
+ \u2118(value) {
+ this.#\u2118 = value;
+ return this.#\u2118_;
+ }
+ ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ = value;
+ return this.#ZW_\u200C_NJ_;
+ }
+ ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J = value;
+ return this.#ZW_\u200D_J_;
+ }
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+C.m().then(function(v) {
+ assert.sameValue(v, 42);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(c.$(1), 1);
+ assert.sameValue(c._(1), 1);
+ assert.sameValue(c.\u{6F}(1), 1);
+ assert.sameValue(c.\u2118(1), 1);
+ assert.sameValue(c.ZW_\u200C_NJ(1), 1);
+ assert.sameValue(c.ZW_\u200D_J(1), 1);
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-privatename-identifier-alt.js
new file mode 100644
index 0000000000..05154e2948
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-privatename-identifier-alt.js
@@ -0,0 +1,124 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-async-method.template
+/*---
+description: Valid PrivateName (field definitions after a static async method in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public, async-functions]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static async m() { return 42; } #$; #_; #\u{6F}; #℘; #ZW_‌_NJ; #ZW_‍_J;
+ $(value) {
+ this.#$ = value;
+ return this.#$;
+ }
+ _(value) {
+ this.#_ = value;
+ return this.#_;
+ }
+ \u{6F}(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F};
+ }
+ ℘(value) {
+ this.#℘ = value;
+ return this.#℘;
+ }
+ ZW_‌_NJ(value) {
+ this.#ZW_‌_NJ = value;
+ return this.#ZW_‌_NJ;
+ }
+ ZW_‍_J(value) {
+ this.#ZW_‍_J = value;
+ return this.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+C.m().then(function(v) {
+ assert.sameValue(v, 42);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(c.$(1), 1);
+ assert.sameValue(c._(1), 1);
+ assert.sameValue(c.\u{6F}(1), 1);
+ assert.sameValue(c.℘(1), 1);
+ assert.sameValue(c.ZW_‌_NJ(1), 1);
+ assert.sameValue(c.ZW_‍_J(1), 1);
+
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-privatename-identifier-initializer-alt.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-privatename-identifier-initializer-alt.js
new file mode 100644
index 0000000000..fa461c0ec8
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-privatename-identifier-initializer-alt.js
@@ -0,0 +1,118 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-privatename-identifier-initializer-alt.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-async-method.template
+/*---
+description: Valid PrivateName (field definitions after a static async method in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public, async-functions]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static async m() { return 42; } #$ = 1; #_ = 1; #\u{6F} = 1; #℘ = 1; #ZW_‌_NJ = 1; #ZW_‍_J = 1;
+ $() {
+ return this.#$;
+ }
+ _() {
+ return this.#_;
+ }
+ \u{6F}() {
+ return this.#\u{6F};
+ }
+ ℘() {
+ return this.#℘;
+ }
+ ZW_‌_NJ() {
+ return this.#ZW_‌_NJ;
+ }
+ ZW_‍_J() {
+ return this.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+C.m().then(function(v) {
+ assert.sameValue(v, 42);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(c.$(), 1);
+ assert.sameValue(c._(), 1);
+ assert.sameValue(c.\u{6F}(), 1);
+ assert.sameValue(c.℘(), 1);
+ assert.sameValue(c.ZW_‌_NJ(), 1);
+ assert.sameValue(c.ZW_‍_J(), 1);
+
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-privatename-identifier-initializer.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-privatename-identifier-initializer.js
new file mode 100644
index 0000000000..ebe0f2042e
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-privatename-identifier-initializer.js
@@ -0,0 +1,118 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-privatename-identifier-initializer.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-async-method.template
+/*---
+description: Valid PrivateName (field definitions after a static async method in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public, async-functions]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static async m() { return 42; } #$ = 1; #_ = 1; #\u{6F} = 1; #\u2118 = 1; #ZW_\u200C_NJ = 1; #ZW_\u200D_J = 1;
+ $() {
+ return this.#$;
+ }
+ _() {
+ return this.#_;
+ }
+ \u{6F}() {
+ return this.#\u{6F};
+ }
+ \u2118() {
+ return this.#\u2118;
+ }
+ ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ;
+ }
+ ZW_\u200D_J() {
+ return this.#ZW_\u200D_J;
+ }
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+C.m().then(function(v) {
+ assert.sameValue(v, 42);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(c.$(), 1);
+ assert.sameValue(c._(), 1);
+ assert.sameValue(c.\u{6F}(), 1);
+ assert.sameValue(c.\u2118(), 1);
+ assert.sameValue(c.ZW_\u200C_NJ(), 1);
+ assert.sameValue(c.ZW_\u200D_J(), 1);
+
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-privatename-identifier.js
new file mode 100644
index 0000000000..85bd1d5f6d
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-privatename-identifier.js
@@ -0,0 +1,124 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-async-method.template
+/*---
+description: Valid PrivateName (field definitions after a static async method in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public, async-functions]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static async m() { return 42; } #$; #_; #\u{6F}; #\u2118; #ZW_\u200C_NJ; #ZW_\u200D_J;
+ $(value) {
+ this.#$ = value;
+ return this.#$;
+ }
+ _(value) {
+ this.#_ = value;
+ return this.#_;
+ }
+ \u{6F}(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F};
+ }
+ \u2118(value) {
+ this.#\u2118 = value;
+ return this.#\u2118;
+ }
+ ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ = value;
+ return this.#ZW_\u200C_NJ;
+ }
+ ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J = value;
+ return this.#ZW_\u200D_J;
+ }
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+C.m().then(function(v) {
+ assert.sameValue(v, 42);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(c.$(1), 1);
+ assert.sameValue(c._(1), 1);
+ assert.sameValue(c.\u{6F}(1), 1);
+ assert.sameValue(c.\u2118(1), 1);
+ assert.sameValue(c.ZW_\u200C_NJ(1), 1);
+ assert.sameValue(c.ZW_\u200D_J(1), 1);
+
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-static-async-generator-method-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-static-async-generator-method-privatename-identifier-alt.js
new file mode 100644
index 0000000000..bdd718f6cc
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-static-async-generator-method-privatename-identifier-alt.js
@@ -0,0 +1,150 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-async-generator-method-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-async-method.template
+/*---
+description: Valid Static AsyncGeneratorMethod PrivateName (field definitions after a static async method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public, async-functions]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static async m() { return 42; } static async * #$(value) {
+ yield * await value;
+ }
+ static async * #_(value) {
+ yield * await value;
+ }
+ static async * #o(value) {
+ yield * await value;
+ }
+ static async * #℘(value) {
+ yield * await value;
+ }
+ static async * #ZW_‌_NJ(value) {
+ yield * await value;
+ }
+ static async * #ZW_‍_J(value) {
+ yield * await value;
+ };
+ static get $() {
+ return this.#$;
+ }
+ static get _() {
+ return this.#_;
+ }
+ static get o() {
+ return this.#o;
+ }
+ static get ℘() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#℘;
+ }
+ static get ZW_‌_NJ() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‌_NJ;
+ }
+ static get ZW_‍_J() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‍_J;
+ }
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+C.m().then(function(v) {
+ assert.sameValue(v, 42);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ Promise.all([
+ C.$([1]).next(),
+ C._([1]).next(),
+ C.o([1]).next(),
+ C.℘([1]).next(), // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.ZW_‌_NJ([1]).next(), // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.ZW_‍_J([1]).next(), // DO NOT CHANGE THE NAME OF THIS FIELD
+ ]).then(results => {
+
+ assert.sameValue(results[0].value, 1);
+ assert.sameValue(results[1].value, 1);
+ assert.sameValue(results[2].value, 1);
+ assert.sameValue(results[3].value, 1);
+ assert.sameValue(results[4].value, 1);
+ assert.sameValue(results[5].value, 1);
+
+ }).then($DONE, $DONE);
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-static-async-generator-method-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-static-async-generator-method-privatename-identifier.js
new file mode 100644
index 0000000000..d72ce12993
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-static-async-generator-method-privatename-identifier.js
@@ -0,0 +1,151 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-async-generator-method-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-async-method.template
+/*---
+description: Valid Static AsyncGeneratorMethod PrivateName (field definitions after a static async method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public, async-functions]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static async m() { return 42; } static async * #$(value) {
+ yield * await value;
+ }
+ static async * #_(value) {
+ yield * await value;
+ }
+ static async * #\u{6F}(value) {
+ yield * await value;
+ }
+ static async * #\u2118(value) {
+ yield * await value;
+ }
+ static async * #ZW_\u200C_NJ(value) {
+ yield * await value;
+ }
+ static async * #ZW_\u200D_J(value) {
+ yield * await value;
+ };
+ static get $() {
+ return this.#$;
+ }
+ static get _() {
+ return this.#_;
+ }
+ static get \u{6F}() {
+ return this.#\u{6F};
+ }
+ static get \u2118() {
+ return this.#\u2118;
+ }
+ static get ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ;
+ }
+ static get ZW_\u200D_J() {
+ return this.#ZW_\u200D_J;
+ }
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+C.m().then(function(v) {
+ assert.sameValue(v, 42);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ Promise.all([
+ C.$([1]).next(),
+ C._([1]).next(),
+ C.\u{6F}([1]).next(),
+ C.\u2118([1]).next(),
+ C.ZW_\u200C_NJ([1]).next(),
+ C.ZW_\u200D_J([1]).next(),
+ ]).then(results => {
+
+ assert.sameValue(results[0].value, 1);
+ assert.sameValue(results[1].value, 1);
+ assert.sameValue(results[2].value, 1);
+ assert.sameValue(results[3].value, 1);
+ assert.sameValue(results[4].value, 1);
+ assert.sameValue(results[5].value, 1);
+
+ }).then($DONE, $DONE);
+
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-static-async-method-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-static-async-method-privatename-identifier-alt.js
new file mode 100644
index 0000000000..344c1f439b
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-static-async-method-privatename-identifier-alt.js
@@ -0,0 +1,150 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-async-method-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-async-method.template
+/*---
+description: Valid Static AsyncMethod PrivateName (field definitions after a static async method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public, async-functions]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ AsyncMethod
+
+ AsyncMethod :
+ async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static async m() { return 42; } static async #$(value) {
+ return await value;
+ }
+ static async #_(value) {
+ return await value;
+ }
+ static async #o(value) {
+ return await value;
+ }
+ static async #℘(value) {
+ return await value;
+ }
+ static async #ZW_‌_NJ(value) {
+ return await value;
+ }
+ static async #ZW_‍_J(value) {
+ return await value;
+ };
+ static async $(value) {
+ return await this.#$(value);
+ }
+ static async _(value) {
+ return await this.#_(value);
+ }
+ static async o(value) {
+ return await this.#o(value);
+ }
+ static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return await this.#℘(value);
+ }
+ static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return await this.#ZW_‌_NJ(value);
+ }
+ static async ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return await this.#ZW_‍_J(value);
+ }
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+C.m().then(function(v) {
+ assert.sameValue(v, 42);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ Promise.all([
+ C.$(1),
+ C._(1),
+ C.o(1),
+ C.℘(1), // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.ZW_‌_NJ(1), // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.ZW_‍_J(1), // DO NOT CHANGE THE NAME OF THIS FIELD
+ ]).then(results => {
+
+ assert.sameValue(results[0], 1);
+ assert.sameValue(results[1], 1);
+ assert.sameValue(results[2], 1);
+ assert.sameValue(results[3], 1);
+ assert.sameValue(results[4], 1);
+ assert.sameValue(results[5], 1);
+
+ }).then($DONE, $DONE);
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-static-async-method-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-static-async-method-privatename-identifier.js
new file mode 100644
index 0000000000..d2aedfae37
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-static-async-method-privatename-identifier.js
@@ -0,0 +1,151 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-async-method-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-async-method.template
+/*---
+description: Valid Static AsyncMethod PrivateName (field definitions after a static async method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public, async-functions]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ AsyncMethod
+
+ AsyncMethod :
+ async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static async m() { return 42; } static async #$(value) {
+ return await value;
+ }
+ static async #_(value) {
+ return await value;
+ }
+ static async #\u{6F}(value) {
+ return await value;
+ }
+ static async #\u2118(value) {
+ return await value;
+ }
+ static async #ZW_\u200C_NJ(value) {
+ return await value;
+ }
+ static async #ZW_\u200D_J(value) {
+ return await value;
+ };
+ static async $(value) {
+ return await this.#$(value);
+ }
+ static async _(value) {
+ return await this.#_(value);
+ }
+ static async \u{6F}(value) {
+ return await this.#\u{6F}(value);
+ }
+ static async \u2118(value) {
+ return await this.#\u2118(value);
+ }
+ static async ZW_\u200C_NJ(value) {
+ return await this.#ZW_\u200C_NJ(value);
+ }
+ static async ZW_\u200D_J(value) {
+ return await this.#ZW_\u200D_J(value);
+ }
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+C.m().then(function(v) {
+ assert.sameValue(v, 42);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ Promise.all([
+ C.$(1),
+ C._(1),
+ C.\u{6F}(1),
+ C.\u2118(1),
+ C.ZW_\u200C_NJ(1),
+ C.ZW_\u200D_J(1),
+ ]).then(results => {
+
+ assert.sameValue(results[0], 1);
+ assert.sameValue(results[1], 1);
+ assert.sameValue(results[2], 1);
+ assert.sameValue(results[3], 1);
+ assert.sameValue(results[4], 1);
+ assert.sameValue(results[5], 1);
+
+ }).then($DONE, $DONE);
+
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-static-generator-method-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-static-generator-method-privatename-identifier-alt.js
new file mode 100644
index 0000000000..4207291845
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-static-generator-method-privatename-identifier-alt.js
@@ -0,0 +1,139 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-generator-method-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-async-method.template
+/*---
+description: Valid Static GeneratorMethod PrivateName (field definitions after a static async method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public, async-functions]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ GeneratorMethod
+
+ GeneratorMethod :
+ * ClassElementName ( UniqueFormalParameters ){ GeneratorBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static async m() { return 42; } static * #$(value) {
+ yield * value;
+ }
+ static * #_(value) {
+ yield * value;
+ }
+ static * #o(value) {
+ yield * value;
+ }
+ static * #℘(value) {
+ yield * value;
+ }
+ static * #ZW_‌_NJ(value) {
+ yield * value;
+ }
+ static * #ZW_‍_J(value) {
+ yield * value;
+ };
+ static get $() {
+ return this.#$;
+ }
+ static get _() {
+ return this.#_;
+ }
+ static get o() {
+ return this.#o;
+ }
+ static get ℘() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#℘;
+ }
+ static get ZW_‌_NJ() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‌_NJ;
+ }
+ static get ZW_‍_J() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‍_J;
+ }
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+C.m().then(function(v) {
+ assert.sameValue(v, 42);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(C.$([1]).next().value, 1);
+ assert.sameValue(C._([1]).next().value, 1);
+ assert.sameValue(C.o([1]).next().value, 1);
+ assert.sameValue(C.℘([1]).next().value, 1);
+ assert.sameValue(C.ZW_‌_NJ([1]).next().value, 1);
+ assert.sameValue(C.ZW_‍_J([1]).next().value, 1);
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-static-generator-method-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-static-generator-method-privatename-identifier.js
new file mode 100644
index 0000000000..e839471025
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-static-generator-method-privatename-identifier.js
@@ -0,0 +1,140 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-generator-method-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-async-method.template
+/*---
+description: Valid Static GeneratorMethod PrivateName (field definitions after a static async method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public, async-functions]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ GeneratorMethod
+
+ GeneratorMethod :
+ * ClassElementName ( UniqueFormalParameters ){ GeneratorBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static async m() { return 42; } static * #$(value) {
+ yield * value;
+ }
+ static * #_(value) {
+ yield * value;
+ }
+ static * #\u{6F}(value) {
+ yield * value;
+ }
+ static * #\u2118(value) {
+ yield * value;
+ }
+ static * #ZW_\u200C_NJ(value) {
+ yield * value;
+ }
+ static * #ZW_\u200D_J(value) {
+ yield * value;
+ };
+ static get $() {
+ return this.#$;
+ }
+ static get _() {
+ return this.#_;
+ }
+ static get \u{6F}() {
+ return this.#\u{6F};
+ }
+ static get \u2118() {
+ return this.#\u2118;
+ }
+ static get ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ;
+ }
+ static get ZW_\u200D_J() {
+ return this.#ZW_\u200D_J;
+ }
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+C.m().then(function(v) {
+ assert.sameValue(v, 42);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(C.$([1]).next().value, 1);
+ assert.sameValue(C._([1]).next().value, 1);
+ assert.sameValue(C.\u{6F}([1]).next().value, 1);
+ assert.sameValue(C.\u2118([1]).next().value, 1);
+ assert.sameValue(C.ZW_\u200C_NJ([1]).next().value, 1);
+ assert.sameValue(C.ZW_\u200D_J([1]).next().value, 1);
+
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-static-method-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-static-method-privatename-identifier-alt.js
new file mode 100644
index 0000000000..4429dda9bd
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-static-method-privatename-identifier-alt.js
@@ -0,0 +1,137 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-method-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-async-method.template
+/*---
+description: Valid Static Method PrivateName (field definitions after a static async method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public, async-functions]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ ClassElementName ( UniqueFormalParameters ){ FunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static async m() { return 42; } static #$(value) {
+ return value;
+ }
+ static #_(value) {
+ return value;
+ }
+ static #o(value) {
+ return value;
+ }
+ static #℘(value) {
+ return value;
+ }
+ static #ZW_‌_NJ(value) {
+ return value;
+ }
+ static #ZW_‍_J(value) {
+ return value;
+ };
+ static $(value) {
+ return this.#$(value);
+ }
+ static _(value) {
+ return this.#_(value);
+ }
+ static o(value) {
+ return this.#o(value);
+ }
+ static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#℘(value);
+ }
+ static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‌_NJ(value);
+ }
+ static ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‍_J(value);
+ }
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+C.m().then(function(v) {
+ assert.sameValue(v, 42);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(C.$(1), 1);
+ assert.sameValue(C._(1), 1);
+ assert.sameValue(C.o(1), 1);
+ assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+ assert.sameValue(C.ZW_‌_NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+ assert.sameValue(C.ZW_‍_J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-static-method-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-static-method-privatename-identifier.js
new file mode 100644
index 0000000000..07dbb5d6ca
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-static-method-privatename-identifier.js
@@ -0,0 +1,137 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-method-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-async-method.template
+/*---
+description: Valid Static Method PrivateName (field definitions after a static async method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public, async-functions]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ ClassElementName ( UniqueFormalParameters ){ FunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static async m() { return 42; } static #$(value) {
+ return value;
+ }
+ static #_(value) {
+ return value;
+ }
+ static #\u{6F}(value) {
+ return value;
+ }
+ static #\u2118(value) {
+ return value;
+ }
+ static #ZW_\u200C_NJ(value) {
+ return value;
+ }
+ static #ZW_\u200D_J(value) {
+ return value;
+ };
+ static $(value) {
+ return this.#$(value);
+ }
+ static _(value) {
+ return this.#_(value);
+ }
+ static \u{6F}(value) {
+ return this.#\u{6F}(value);
+ }
+ static \u2118(value) {
+ return this.#\u2118(value);
+ }
+ static ZW_\u200C_NJ(value) {
+ return this.#ZW_\u200C_NJ(value);
+ }
+ static ZW_\u200D_J(value) {
+ return this.#ZW_\u200D_J(value);
+ }
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+C.m().then(function(v) {
+ assert.sameValue(v, 42);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(C.$(1), 1);
+ assert.sameValue(C._(1), 1);
+ assert.sameValue(C.\u{6F}(1), 1);
+ assert.sameValue(C.\u2118(1), 1);
+ assert.sameValue(C.ZW_\u200C_NJ(1), 1);
+ assert.sameValue(C.ZW_\u200D_J(1), 1);
+
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-static-privatename-identifier-alt-by-classname.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-static-privatename-identifier-alt-by-classname.js
new file mode 100644
index 0000000000..de741f808a
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-static-privatename-identifier-alt-by-classname.js
@@ -0,0 +1,125 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-alt-by-classname.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-async-method.template
+/*---
+description: Valid Static PrivateName (field definitions after a static async method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public, async-functions]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static async m() { return 42; } static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_‍_J;
+ static $(value) {
+ C.#$ = value;
+ return C.#$;
+ }
+ static _(value) {
+ C.#_ = value;
+ return C.#_;
+ }
+ static o(value) {
+ C.#\u{6F} = value;
+ return C.#\u{6F};
+ }
+ static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.#℘ = value;
+ return C.#℘;
+ }
+ static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.#ZW_‌_NJ = value;
+ return C.#ZW_‌_NJ;
+ }
+ static ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.#ZW_‍_J = value;
+ return C.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+C.m().then(function(v) {
+ assert.sameValue(v, 42);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(C.$(1), 1);
+ assert.sameValue(C._(1), 1);
+ assert.sameValue(C.o(1), 1);
+ assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+ assert.sameValue(C.ZW_‌_NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+ assert.sameValue(C.ZW_‍_J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-static-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-static-privatename-identifier-alt.js
new file mode 100644
index 0000000000..032187502f
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-static-privatename-identifier-alt.js
@@ -0,0 +1,125 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-async-method.template
+/*---
+description: Valid Static PrivateName (field definitions after a static async method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public, async-functions]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static async m() { return 42; } static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_‍_J;
+ static $(value) {
+ this.#$ = value;
+ return this.#$;
+ }
+ static _(value) {
+ this.#_ = value;
+ return this.#_;
+ }
+ static o(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F};
+ }
+ static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ this.#℘ = value;
+ return this.#℘;
+ }
+ static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ this.#ZW_‌_NJ = value;
+ return this.#ZW_‌_NJ;
+ }
+ static ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ this.#ZW_‍_J = value;
+ return this.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+C.m().then(function(v) {
+ assert.sameValue(v, 42);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(C.$(1), 1);
+ assert.sameValue(C._(1), 1);
+ assert.sameValue(C.o(1), 1);
+ assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+ assert.sameValue(C.ZW_‌_NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+ assert.sameValue(C.ZW_‍_J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-static-privatename-identifier-by-classname.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-static-privatename-identifier-by-classname.js
new file mode 100644
index 0000000000..2b45cd6849
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-static-privatename-identifier-by-classname.js
@@ -0,0 +1,125 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-by-classname.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-async-method.template
+/*---
+description: Valid Static PrivateName (field definitions after a static async method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public, async-functions]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static async m() { return 42; } static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J;
+ static $(value) {
+ C.#$ = value;
+ return C.#$;
+ }
+ static _(value) {
+ C.#_ = value;
+ return C.#_;
+ }
+ static \u{6F}(value) {
+ C.#\u{6F} = value;
+ return C.#\u{6F};
+ }
+ static \u2118(value) {
+ C.#\u2118 = value;
+ return C.#\u2118;
+ }
+ static ZW_\u200C_NJ(value) {
+ C.#ZW_\u200C_NJ = value;
+ return C.#ZW_\u200C_NJ;
+ }
+ static ZW_\u200D_J(value) {
+ C.#ZW_\u200D_J = value;
+ return C.#ZW_\u200D_J;
+ }
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+C.m().then(function(v) {
+ assert.sameValue(v, 42);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(C.$(1), 1);
+ assert.sameValue(C._(1), 1);
+ assert.sameValue(C.\u{6F}(1), 1);
+ assert.sameValue(C.\u2118(1), 1);
+ assert.sameValue(C.ZW_\u200C_NJ(1), 1);
+ assert.sameValue(C.ZW_\u200D_J(1), 1);
+
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-static-privatename-identifier-initializer-alt-by-classname.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-static-privatename-identifier-initializer-alt-by-classname.js
new file mode 100644
index 0000000000..ae1ee0eeab
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-static-privatename-identifier-initializer-alt-by-classname.js
@@ -0,0 +1,119 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-initializer-alt-by-classname.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-async-method.template
+/*---
+description: Valid Static PrivateName (field definitions after a static async method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public, async-functions]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static async m() { return 42; } static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_‍_J = 1;
+ static $() {
+ return C.#$;
+ }
+ static _() {
+ return C.#_;
+ }
+ static \u{6F}() {
+ return C.#\u{6F};
+ }
+ static ℘() {
+ return C.#℘;
+ }
+ static ZW_‌_NJ() {
+ return C.#ZW_‌_NJ;
+ }
+ static ZW_‍_J() {
+ return C.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+C.m().then(function(v) {
+ assert.sameValue(v, 42);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(C.$(), 1);
+ assert.sameValue(C._(), 1);
+ assert.sameValue(C.\u{6F}(), 1);
+ assert.sameValue(C.℘(), 1);
+ assert.sameValue(C.ZW_‌_NJ(), 1);
+ assert.sameValue(C.ZW_‍_J(), 1);
+
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-static-privatename-identifier-initializer-alt.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-static-privatename-identifier-initializer-alt.js
new file mode 100644
index 0000000000..050cce6101
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-static-privatename-identifier-initializer-alt.js
@@ -0,0 +1,119 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-initializer-alt.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-async-method.template
+/*---
+description: Valid Static PrivateName (field definitions after a static async method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public, async-functions]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static async m() { return 42; } static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_‍_J = 1;
+ static $() {
+ return this.#$;
+ }
+ static _() {
+ return this.#_;
+ }
+ static \u{6F}() {
+ return this.#\u{6F};
+ }
+ static ℘() {
+ return this.#℘;
+ }
+ static ZW_‌_NJ() {
+ return this.#ZW_‌_NJ;
+ }
+ static ZW_‍_J() {
+ return this.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+C.m().then(function(v) {
+ assert.sameValue(v, 42);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(C.$(), 1);
+ assert.sameValue(C._(), 1);
+ assert.sameValue(C.\u{6F}(), 1);
+ assert.sameValue(C.℘(), 1);
+ assert.sameValue(C.ZW_‌_NJ(), 1);
+ assert.sameValue(C.ZW_‍_J(), 1);
+
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-static-privatename-identifier-initializer.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-static-privatename-identifier-initializer.js
new file mode 100644
index 0000000000..868c5a6289
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-static-privatename-identifier-initializer.js
@@ -0,0 +1,119 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-initializer.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-async-method.template
+/*---
+description: Valid Static PrivateName (field definitions after a static async method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public, async-functions]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static async m() { return 42; } static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #\u2118 = 1; static #ZW_\u200C_NJ = 1; static #ZW_\u200D_J = 1;
+ static $() {
+ return this.#$;
+ }
+ static _() {
+ return this.#_;
+ }
+ static \u{6F}() {
+ return this.#\u{6F};
+ }
+ static \u2118() {
+ return this.#\u2118;
+ }
+ static ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ;
+ }
+ static ZW_\u200D_J() {
+ return this.#ZW_\u200D_J;
+ }
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+C.m().then(function(v) {
+ assert.sameValue(v, 42);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(C.$(), 1);
+ assert.sameValue(C._(), 1);
+ assert.sameValue(C.\u{6F}(), 1);
+ assert.sameValue(C.\u2118(), 1);
+ assert.sameValue(C.ZW_\u200C_NJ(), 1);
+ assert.sameValue(C.ZW_\u200D_J(), 1);
+
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-static-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-static-privatename-identifier.js
new file mode 100644
index 0000000000..439531a775
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-rs-static-privatename-identifier.js
@@ -0,0 +1,125 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-async-method.template
+/*---
+description: Valid Static PrivateName (field definitions after a static async method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public, async-functions]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static async m() { return 42; } static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J;
+ static $(value) {
+ this.#$ = value;
+ return this.#$;
+ }
+ static _(value) {
+ this.#_ = value;
+ return this.#_;
+ }
+ static \u{6F}(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F};
+ }
+ static \u2118(value) {
+ this.#\u2118 = value;
+ return this.#\u2118;
+ }
+ static ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ = value;
+ return this.#ZW_\u200C_NJ;
+ }
+ static ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J = value;
+ return this.#ZW_\u200D_J;
+ }
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+C.m().then(function(v) {
+ assert.sameValue(v, 42);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(C.$(1), 1);
+ assert.sameValue(C._(1), 1);
+ assert.sameValue(C.\u{6F}(1), 1);
+ assert.sameValue(C.\u2118(1), 1);
+ assert.sameValue(C.ZW_\u200C_NJ(1), 1);
+ assert.sameValue(C.ZW_\u200D_J(1), 1);
+
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-static-private-fields.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-static-private-fields.js
new file mode 100644
index 0000000000..8321179c85
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-static-private-fields.js
@@ -0,0 +1,86 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/static-private-fields.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-async-method.template
+/*---
+description: static private fields (field definitions after a static async method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public, async-functions]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ static FieldDefinition ;
+
+ FieldDefinition :
+ ClassElementName Initializer_opt
+
+ ClassElementName :
+ PrivateName
+
+ PrivateName :
+ # IdentifierName
+
+---*/
+
+
+class C {
+ static async m() { return 42; } static #x; static #y;
+ static x() {
+ this.#x = 42;
+ return this.#x;
+ }
+ static y() {
+ this.#y = 43;
+ return this.#y;
+ }
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+C.m().then(function(v) {
+ assert.sameValue(v, 42);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ // Test the private fields do not appear as properties before set to value
+ assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#x"), "test 1");
+ assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 2");
+ assert(!Object.prototype.hasOwnProperty.call(c, "#x"), "test 3");
+
+ assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#y"), "test 4");
+ assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 5");
+ assert(!Object.prototype.hasOwnProperty.call(c, "#y"), "test 6");
+
+ // Test if private fields can be sucessfully accessed and set to value
+ assert.sameValue(C.x(), 42, "test 7");
+ assert.sameValue(C.y(), 43, "test 8");
+
+ // Test the private fields do not appear as properties before after set to value
+ assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 9");
+ assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 10");
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-static-private-methods-with-fields.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-static-private-methods-with-fields.js
new file mode 100644
index 0000000000..451d1ff4e9
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-static-private-methods-with-fields.js
@@ -0,0 +1,103 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/static-private-methods-with-fields.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-async-method.template
+/*---
+description: static private methods with fields (field definitions after a static async method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class-static-fields-private, class, class-fields-public, async-functions]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ static FieldDefinition ;
+
+ FieldDefinition :
+ ClassElementName Initializer_opt
+
+ ClassElementName :
+ PrivateName
+
+ PrivateName :
+ # IdentifierName
+
+---*/
+
+
+class C {
+ static async m() { return 42; } static #xVal; static #yVal;
+ static #x(value) {
+ this.#xVal = value;
+ return this.#xVal;
+ }
+ static #y(value) {
+ this.#yVal = value;
+ return this.#yVal;
+ }
+ static x() {
+ return this.#x(42);
+ }
+ static y() {
+ return this.#y(43);
+ }
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+C.m().then(function(v) {
+ assert.sameValue(v, 42);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ // Test the private methods do not appear as properties before set to value
+ assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#x"), "test 1");
+ assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 2");
+ assert(!Object.prototype.hasOwnProperty.call(c, "#x"), "test 3");
+
+ assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#y"), "test 4");
+ assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 5");
+ assert(!Object.prototype.hasOwnProperty.call(c, "#y"), "test 6");
+
+ assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#xVal"), "test 7");
+ assert(!Object.prototype.hasOwnProperty.call(C, "#xVal"), "test 8");
+ assert(!Object.prototype.hasOwnProperty.call(c, "#xVal"), "test 9");
+
+ assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#yVal"), "test 10");
+ assert(!Object.prototype.hasOwnProperty.call(C, "#yVal"), "test 11");
+ assert(!Object.prototype.hasOwnProperty.call(c, "#yVal"), "test 12");
+
+ // Test if private fields can be sucessfully accessed and set to value
+ assert.sameValue(C.x(), 42, "test 13");
+ assert.sameValue(C.y(), 43, "test 14");
+
+ // Test the private fields do not appear as properties before after set to value
+ assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 15");
+ assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 16");
+
+ assert(!Object.prototype.hasOwnProperty.call(C, "#xVal"), "test 17");
+ assert(!Object.prototype.hasOwnProperty.call(C, "#yVal"), "test 18");
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-static-private-methods.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-static-private-methods.js
new file mode 100644
index 0000000000..212944715c
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-static-private-methods.js
@@ -0,0 +1,90 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/static-private-methods.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-async-method.template
+/*---
+description: static private methods (field definitions after a static async method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public, async-functions]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ static FieldDefinition ;
+
+ FieldDefinition :
+ ClassElementName Initializer_opt
+
+ ClassElementName :
+ PrivateName
+
+ PrivateName :
+ # IdentifierName
+
+---*/
+
+
+class C {
+ static async m() { return 42; } ;
+ static #x(value) {
+ return value / 2;
+ }
+ static #y(value) {
+ return value * 2;
+ }
+ static x() {
+ return this.#x(84);
+ }
+ static y() {
+ return this.#y(43);
+ }
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+C.m().then(function(v) {
+ assert.sameValue(v, 42);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ // Test the private methods do not appear as properties before set to value
+ assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#x"), "test 1");
+ assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 2");
+ assert(!Object.prototype.hasOwnProperty.call(c, "#x"), "test 3");
+
+ assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#y"), "test 4");
+ assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 5");
+ assert(!Object.prototype.hasOwnProperty.call(c, "#y"), "test 6");
+
+ // Test if private fields can be sucessfully accessed and set to value
+ assert.sameValue(C.x(), 42, "test 7");
+ assert.sameValue(C.y(), 86, "test 8");
+
+ // Test the private fields do not appear as properties before after set to value
+ assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 9");
+ assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 10");
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-string-literal-names.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-string-literal-names.js
new file mode 100644
index 0000000000..9f166c7de6
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-async-method-string-literal-names.js
@@ -0,0 +1,124 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/string-literal-names.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-async-method.template
+/*---
+description: String literal names (field definitions after a static async method in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-public, class, async-functions]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement:
+ ...
+ FieldDefinition ;
+
+ FieldDefinition:
+ ClassElementName Initializer_opt
+
+ ClassElementName:
+ PropertyName
+
+---*/
+
+
+class C {
+ static async m() { return 42; } 'a'; "b"; 'c' = 39;
+ "d" = 42;
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+C.m().then(function(v) {
+ assert.sameValue(v, 42);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "a"),
+ "a does not appear as an own property on C prototype"
+ );
+ assert(
+ !Object.prototype.hasOwnProperty.call(C, "a"),
+ "a does not appear as an own property on C constructor"
+ );
+
+ verifyProperty(c, "a", {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+ });
+
+ assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "b"),
+ "b does not appear as an own property on C prototype"
+ );
+ assert(
+ !Object.prototype.hasOwnProperty.call(C, "b"),
+ "b does not appear as an own property on C constructor"
+ );
+
+ verifyProperty(c, "b", {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+ });
+
+ assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "c"),
+ "c does not appear as an own property on C prototype"
+ );
+ assert(
+ !Object.prototype.hasOwnProperty.call(C, "c"),
+ "c does not appear as an own property on C constructor"
+ );
+
+ verifyProperty(c, "c", {
+ value: 39,
+ enumerable: true,
+ writable: true,
+ configurable: true
+ });
+
+ assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "d"),
+ "d does not appear as an own property on C prototype"
+ );
+ assert(
+ !Object.prototype.hasOwnProperty.call(C, "d"),
+ "d does not appear as an own property on C constructor"
+ );
+
+ verifyProperty(c, "d", {
+ value: 42,
+ enumerable: true,
+ writable: true,
+ configurable: true
+ });
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-computed-names.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-computed-names.js
new file mode 100644
index 0000000000..7a4af2835c
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-computed-names.js
@@ -0,0 +1,110 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/computed-names.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-gen.template
+/*---
+description: Computed property names (field definitions after a static generator in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-public, computed-property-names, generators, class]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement:
+ ...
+ FieldDefinition ;
+
+ FieldDefinition:
+ ClassElementName Initializer_opt
+
+ ClassElementName:
+ PropertyName
+
+---*/
+var x = "b";
+
+
+
+class C {
+ static *m() { return 42; } [x] = 42; [10] = "meep"; ["not initialized"];
+
+}
+
+var c = new C();
+
+assert.sameValue(C.m().next().value, 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "b"),
+ "b doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "b"),
+ "b doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "b", {
+ value: 42,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "x"),
+ "x doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "x"),
+ "x doesn't appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "x"),
+ "x doesn't appear as an own property on C instance"
+);
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "10"),
+ "10 doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "10"),
+ "10 doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "10", {
+ value: "meep",
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "not initialized"),
+ "'not initialized' doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "not initialized"),
+ "'not initialized' doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "not initialized", {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-computed-symbol-names.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-computed-symbol-names.js
new file mode 100644
index 0000000000..9de02507a5
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-computed-symbol-names.js
@@ -0,0 +1,108 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/computed-symbol-names.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-gen.template
+/*---
+description: Computed property symbol names (field definitions after a static generator in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-public, Symbol, computed-property-names, generators, class]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement:
+ ...
+ FieldDefinition ;
+
+ FieldDefinition:
+ ClassElementName Initializer_opt
+
+ ClassElementName:
+ PropertyName
+
+---*/
+var x = Symbol();
+var y = Symbol();
+
+
+
+class C {
+ static *m() { return 42; } [x]; [y] = 42;
+
+}
+
+var c = new C();
+
+assert.sameValue(C.m().next().value, 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, x),
+ "Symbol x doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, x),
+ "Symbol x doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, x, {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, y),
+ "Symbol y doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, y),
+ "Symbol y doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, y, {
+ value: 42,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "x"),
+ "x doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "x"),
+ "x doesn't appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "x"),
+ "x doesn't appear as an own property on C instance"
+);
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "y"),
+ "y doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "y"),
+ "y doesn't appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "y"),
+ "y doesn't appear as an own property on C instance"
+);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-grammar-privatename-identifier-semantics-stringvalue.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-grammar-privatename-identifier-semantics-stringvalue.js
new file mode 100644
index 0000000000..a7e4a814b1
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-grammar-privatename-identifier-semantics-stringvalue.js
@@ -0,0 +1,112 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-privatename-identifier-semantics-stringvalue.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-gen.template
+/*---
+description: PrivateName Static Semantics, StringValue (field definitions after a static generator in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-private, generators, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+
+ 1. Return the String value consisting of the sequence of code
+ units corresponding to PrivateName. In determining the sequence
+ any occurrences of \ UnicodeEscapeSequence are first replaced
+ with the code point represented by the UnicodeEscapeSequence
+ and then the code points of the entire PrivateName are converted
+ to code units by UTF16Encoding (10.1.1) each code point.
+
+---*/
+
+
+class C {
+ static *m() { return 42; } #\u{6F};
+ #\u2118;
+ #ZW_\u200C_NJ;
+ #ZW_\u200D_J;;
+ o(value) {
+ this.#o = value;
+ return this.#o;
+ }
+ ℘(value) {
+ this.#℘ = value;
+ return this.#℘;
+ }
+ ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS METHOD
+ this.#ZW_‌_NJ = value;
+ return this.#ZW_‌_NJ;
+ }
+ ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS METHOD
+ this.#ZW_‍_J = value;
+ return this.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(C.m().next().value, 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.o(1), 1);
+assert.sameValue(c.℘(1), 1);
+assert.sameValue(c.ZW_‌_NJ(1), 1);
+assert.sameValue(c.ZW_‍_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-literal-names-asi.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-literal-names-asi.js
new file mode 100644
index 0000000000..573533abbd
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-literal-names-asi.js
@@ -0,0 +1,80 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/literal-names-asi.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-gen.template
+/*---
+description: Literal property names with ASI (field definitions after a static generator in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-public, generators, class]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement:
+ ...
+ FieldDefinition ;
+
+ FieldDefinition:
+ ClassElementName Initializer_opt
+
+ ClassElementName:
+ PropertyName
+
+---*/
+
+
+class C {
+ static *m() { return 42; } a
+ b = 42;;
+
+}
+
+var c = new C();
+
+assert.sameValue(C.m().next().value, 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "a"),
+ "a doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "a"),
+ "a doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "a", {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "b"),
+ "b doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "b"),
+ "b doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "b", {
+ value: 42,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-literal-names.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-literal-names.js
new file mode 100644
index 0000000000..d2b667b977
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-literal-names.js
@@ -0,0 +1,99 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/literal-names.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-gen.template
+/*---
+description: Literal property names (field definitions after a static generator in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-public, generators, class]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement:
+ ...
+ FieldDefinition ;
+
+ FieldDefinition:
+ ClassElementName Initializer_opt
+
+ ClassElementName:
+ PropertyName
+
+---*/
+const fn = function() {}
+
+
+
+class C {
+ static *m() { return 42; } a; b = 42;
+ c = fn;
+
+}
+
+var c = new C();
+
+assert.sameValue(C.m().next().value, 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "a"),
+ "a doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "a"),
+ "a doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "a", {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "b"),
+ "b doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "b"),
+ "b doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "b", {
+ value: 42,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "c"),
+ "c doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "c"),
+ "c doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "c", {
+ value: fn,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-private-field-usage.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-private-field-usage.js
new file mode 100644
index 0000000000..616b420dd1
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-private-field-usage.js
@@ -0,0 +1,52 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-field-usage.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-gen.template
+/*---
+description: PrivateName CallExpression usage (private field) (field definitions after a static generator in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-private, generators, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ Updated Productions
+
+ CallExpression[Yield, Await]:
+ CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+ SuperCall[?Yield, ?Await]
+ CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+ CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+ CallExpression[?Yield, ?Await].IdentifierName
+ CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+ CallExpression[?Yield, ?Await].PrivateName
+
+---*/
+
+
+class C {
+ static *m() { return 42; } #m = 'test262';;
+ method() {
+ return this.#m;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(C.m().next().value, 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.method(), 'test262');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-private-method-getter-usage.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-private-method-getter-usage.js
new file mode 100644
index 0000000000..e66e791fc3
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-private-method-getter-usage.js
@@ -0,0 +1,52 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-method-getter-usage.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-gen.template
+/*---
+description: PrivateName CallExpression usage (Accesor get method) (field definitions after a static generator in the same line)
+esid: prod-FieldDefinition
+features: [class-methods-private, generators, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ Updated Productions
+
+ CallExpression[Yield, Await]:
+ CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+ SuperCall[?Yield, ?Await]
+ CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+ CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+ CallExpression[?Yield, ?Await].IdentifierName
+ CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+ CallExpression[?Yield, ?Await].PrivateName
+
+---*/
+
+
+class C {
+ static *m() { return 42; } get #m() { return 'test262'; };
+ method() {
+ return this.#m;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(C.m().next().value, 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.method(), 'test262');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-private-method-usage.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-private-method-usage.js
new file mode 100644
index 0000000000..a79e11f931
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-private-method-usage.js
@@ -0,0 +1,52 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-method-usage.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-gen.template
+/*---
+description: PrivateName CallExpression usage (private method) (field definitions after a static generator in the same line)
+esid: prod-FieldDefinition
+features: [class-methods-private, generators, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ Updated Productions
+
+ CallExpression[Yield, Await]:
+ CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+ SuperCall[?Yield, ?Await]
+ CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+ CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+ CallExpression[?Yield, ?Await].IdentifierName
+ CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+ CallExpression[?Yield, ?Await].PrivateName
+
+---*/
+
+
+class C {
+ static *m() { return 42; } #m() { return 'test262'; };
+ method() {
+ return this.#m();
+ }
+}
+
+var c = new C();
+
+assert.sameValue(C.m().next().value, 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.method(), 'test262');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-private-names.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-private-names.js
new file mode 100644
index 0000000000..77b88e5621
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-private-names.js
@@ -0,0 +1,74 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-names.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-gen.template
+/*---
+description: private names (field definitions after a static generator in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-private, generators, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ FieldDefinition ;
+
+ FieldDefinition :
+ ClassElementName Initializer_opt
+
+ ClassElementName :
+ PrivateName
+
+ PrivateName :
+ # IdentifierName
+
+---*/
+
+
+class C {
+ static *m() { return 42; } #x; #y;
+ x() {
+ this.#x = 42;
+ return this.#x;
+ }
+ y() {
+ this.#y = 43;
+ return this.#y;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(C.m().next().value, 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+// Test the private fields do not appear as properties before set to value
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#x"), "test 1");
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 2");
+assert(!Object.prototype.hasOwnProperty.call(c, "#x"), "test 3");
+
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#y"), "test 4");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 5");
+assert(!Object.prototype.hasOwnProperty.call(c, "#y"), "test 6");
+
+// Test if private fields can be sucessfully accessed and set to value
+assert.sameValue(c.x(), 42, "test 7");
+assert.sameValue(c.y(), 43, "test 8");
+
+// Test the private fields do not appear as properties before after set to value
+assert(!Object.prototype.hasOwnProperty.call(c, "#x"), "test 9");
+assert(!Object.prototype.hasOwnProperty.call(c, "#y"), "test 10");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-field-identifier-initializer.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-field-identifier-initializer.js
new file mode 100644
index 0000000000..b8a6287e9f
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-field-identifier-initializer.js
@@ -0,0 +1,90 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-field-identifier-initializer.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-gen.template
+/*---
+description: Valid FieldDefinition (field definitions after a static generator in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-public, generators, class]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+
+ PropertyName :
+ LiteralPropertyName
+ ComputedPropertyName
+
+ LiteralPropertyName :
+ IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static *m() { return 42; } $ = 1; _ = 1; \u{6F} = 1; \u2118 = 1; ZW_\u200C_NJ = 1; ZW_\u200D_J = 1;
+
+}
+
+var c = new C();
+
+assert.sameValue(C.m().next().value, 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$, 1);
+assert.sameValue(c._, 1);
+assert.sameValue(c.\u{6F}, 1);
+assert.sameValue(c.\u2118, 1);
+assert.sameValue(c.ZW_\u200C_NJ, 1);
+assert.sameValue(c.ZW_\u200D_J, 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-field-identifier.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-field-identifier.js
new file mode 100644
index 0000000000..697972b0df
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-field-identifier.js
@@ -0,0 +1,97 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-field-identifier.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-gen.template
+/*---
+description: Valid FieldDefinition (field definitions after a static generator in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-public, generators, class]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+
+ PropertyName :
+ LiteralPropertyName
+ ComputedPropertyName
+
+ LiteralPropertyName :
+ IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static *m() { return 42; } $; _; \u{6F}; \u2118; ZW_\u200C_NJ; ZW_\u200D_J;
+
+}
+
+var c = new C();
+
+assert.sameValue(C.m().next().value, 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+c.$ = 1;
+c._ = 1;
+c.\u{6F} = 1;
+c.\u2118 = 1;
+c.ZW_\u200C_NJ = 1;
+c.ZW_\u200D_J = 1;
+
+assert.sameValue(c.$, 1);
+assert.sameValue(c._, 1);
+assert.sameValue(c.\u{6F}, 1);
+assert.sameValue(c.\u2118, 1);
+assert.sameValue(c.ZW_\u200C_NJ, 1);
+assert.sameValue(c.ZW_\u200D_J, 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-private-getter-alt.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-private-getter-alt.js
new file mode 100644
index 0000000000..ab50cf85b5
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-private-getter-alt.js
@@ -0,0 +1,131 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-getter-alt.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-gen.template
+/*---
+description: Valid PrivateName as private getter (field definitions after a static generator in the same line)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, generators, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ...
+ get ClassElementName ( ){ FunctionBody }
+ ...
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static *m() { return 42; } #$_; #__; #\u{6F}_; #℘_; #ZW_‌_NJ_; #ZW_‍_J_;
+ get #$() {
+ return this.#$_;
+ }
+ get #_() {
+ return this.#__;
+ }
+ get #\u{6F}() {
+ return this.#\u{6F}_;
+ }
+ get #℘() {
+ return this.#℘_;
+ }
+ get #ZW_‌_NJ() {
+ return this.#ZW_‌_NJ_;
+ }
+ get #ZW_‍_J() {
+ return this.#ZW_‍_J_;
+ }
+;
+ $(value) {
+ this.#$_ = value;
+ return this.#$;
+ }
+ _(value) {
+ this.#__ = value;
+ return this.#_;
+ }
+ \u{6F}(value) {
+ this.#\u{6F}_ = value;
+ return this.#\u{6F};
+ }
+ ℘(value) {
+ this.#℘_ = value;
+ return this.#℘;
+ }
+ ZW_‌_NJ(value) {
+ this.#ZW_‌_NJ_ = value;
+ return this.#ZW_‌_NJ;
+ }
+ ZW_‍_J(value) {
+ this.#ZW_‍_J_ = value;
+ return this.#ZW_‍_J;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(C.m().next().value, 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.℘(1), 1);
+assert.sameValue(c.ZW_‌_NJ(1), 1);
+assert.sameValue(c.ZW_‍_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-private-getter.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-private-getter.js
new file mode 100644
index 0000000000..57f505cbd6
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-private-getter.js
@@ -0,0 +1,131 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-getter.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-gen.template
+/*---
+description: Valid PrivateName as private getter (field definitions after a static generator in the same line)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, generators, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ...
+ get ClassElementName ( ){ FunctionBody }
+ ...
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static *m() { return 42; } #$_; #__; #\u{6F}_; #\u2118_; #ZW_\u200C_NJ_; #ZW_\u200D_J_;
+ get #$() {
+ return this.#$_;
+ }
+ get #_() {
+ return this.#__;
+ }
+ get #\u{6F}() {
+ return this.#\u{6F}_;
+ }
+ get #\u2118() {
+ return this.#\u2118_;
+ }
+ get #ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ_;
+ }
+ get #ZW_\u200D_J() {
+ return this.#ZW_\u200D_J_;
+ }
+;
+ $(value) {
+ this.#$_ = value;
+ return this.#$;
+ }
+ _(value) {
+ this.#__ = value;
+ return this.#_;
+ }
+ \u{6F}(value) {
+ this.#\u{6F}_ = value;
+ return this.#\u{6F};
+ }
+ \u2118(value) {
+ this.#\u2118_ = value;
+ return this.#\u2118;
+ }
+ ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ_ = value;
+ return this.#ZW_\u200C_NJ;
+ }
+ ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J_ = value;
+ return this.#ZW_\u200D_J;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(C.m().next().value, 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.\u2118(1), 1);
+assert.sameValue(c.ZW_\u200C_NJ(1), 1);
+assert.sameValue(c.ZW_\u200D_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-private-method-alt.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-private-method-alt.js
new file mode 100644
index 0000000000..89f5cf1ac1
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-private-method-alt.js
@@ -0,0 +1,130 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-method-alt.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-gen.template
+/*---
+description: Valid PrivateName as private method (field definitions after a static generator in the same line)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, generators, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ClassElementName ( UniqueFormalParameters ) { FunctionBody }
+ ...
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static *m() { return 42; } #$_; #__; #\u{6F}_; #℘_; #ZW_‌_NJ_; #ZW_‍_J_;
+ #$() {
+ return this.#$_;
+ }
+ #_() {
+ return this.#__;
+ }
+ #\u{6F}() {
+ return this.#\u{6F}_;
+ }
+ #℘() {
+ return this.#℘_;
+ }
+ #ZW_‌_NJ() {
+ return this.#ZW_‌_NJ_;
+ }
+ #ZW_‍_J() {
+ return this.#ZW_‍_J_;
+ }
+;
+ $(value) {
+ this.#$_ = value;
+ return this.#$();
+ }
+ _(value) {
+ this.#__ = value;
+ return this.#_();
+ }
+ \u{6F}(value) {
+ this.#\u{6F}_ = value;
+ return this.#\u{6F}();
+ }
+ ℘(value) {
+ this.#℘_ = value;
+ return this.#℘();
+ }
+ ZW_‌_NJ(value) {
+ this.#ZW_‌_NJ_ = value;
+ return this.#ZW_‌_NJ();
+ }
+ ZW_‍_J(value) {
+ this.#ZW_‍_J_ = value;
+ return this.#ZW_‍_J();
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(C.m().next().value, 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.℘(1), 1);
+assert.sameValue(c.ZW_‌_NJ(1), 1);
+assert.sameValue(c.ZW_‍_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-private-method.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-private-method.js
new file mode 100644
index 0000000000..1c5d73f675
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-private-method.js
@@ -0,0 +1,130 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-method.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-gen.template
+/*---
+description: Valid PrivateName as private method (field definitions after a static generator in the same line)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, generators, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ClassElementName ( UniqueFormalParameters ) { FunctionBody }
+ ...
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static *m() { return 42; } #$_; #__; #\u{6F}_; #\u2118_; #ZW_\u200C_NJ_; #ZW_\u200D_J_;
+ #$() {
+ return this.#$_;
+ }
+ #_() {
+ return this.#__;
+ }
+ #\u{6F}() {
+ return this.#\u{6F}_;
+ }
+ #\u2118() {
+ return this.#\u2118_;
+ }
+ #ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ_;
+ }
+ #ZW_\u200D_J() {
+ return this.#ZW_\u200D_J_;
+ }
+;
+ $(value) {
+ this.#$_ = value;
+ return this.#$();
+ }
+ _(value) {
+ this.#__ = value;
+ return this.#_();
+ }
+ \u{6F}(value) {
+ this.#\u{6F}_ = value;
+ return this.#\u{6F}();
+ }
+ \u2118(value) {
+ this.#\u2118_ = value;
+ return this.#\u2118();
+ }
+ ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ_ = value;
+ return this.#ZW_\u200C_NJ();
+ }
+ ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J_ = value;
+ return this.#ZW_\u200D_J();
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(C.m().next().value, 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.\u2118(1), 1);
+assert.sameValue(c.ZW_\u200C_NJ(1), 1);
+assert.sameValue(c.ZW_\u200D_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-private-setter-alt.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-private-setter-alt.js
new file mode 100644
index 0000000000..b382776e7d
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-private-setter-alt.js
@@ -0,0 +1,130 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-setter-alt.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-gen.template
+/*---
+description: Valid PrivateName as private setter (field definitions after a static generator in the same line)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, generators, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ...
+ set ClassElementName ( PropertySetParameterList ) { FunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static *m() { return 42; } #$_; #__; #\u{6F}_; #℘_; #ZW_‌_NJ_; #ZW_‍_J_;
+ set #$(value) {
+ this.#$_ = value;
+ }
+ set #_(value) {
+ this.#__ = value;
+ }
+ set #\u{6F}(value) {
+ this.#\u{6F}_ = value;
+ }
+ set #℘(value) {
+ this.#℘_ = value;
+ }
+ set #ZW_‌_NJ(value) {
+ this.#ZW_‌_NJ_ = value;
+ }
+ set #ZW_‍_J(value) {
+ this.#ZW_‍_J_ = value;
+ }
+;
+ $(value) {
+ this.#$ = value;
+ return this.#$_;
+ }
+ _(value) {
+ this.#_ = value;
+ return this.#__;
+ }
+ \u{6F}(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F}_;
+ }
+ ℘(value) {
+ this.#℘ = value;
+ return this.#℘_;
+ }
+ ZW_‌_NJ(value) {
+ this.#ZW_‌_NJ = value;
+ return this.#ZW_‌_NJ_;
+ }
+ ZW_‍_J(value) {
+ this.#ZW_‍_J = value;
+ return this.#ZW_‍_J_;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(C.m().next().value, 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.℘(1), 1);
+assert.sameValue(c.ZW_‌_NJ(1), 1);
+assert.sameValue(c.ZW_‍_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-private-setter.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-private-setter.js
new file mode 100644
index 0000000000..0bb69a4311
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-private-setter.js
@@ -0,0 +1,130 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-setter.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-gen.template
+/*---
+description: Valid PrivateName as private setter (field definitions after a static generator in the same line)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, generators, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ...
+ set ClassElementName ( PropertySetParameterList ) { FunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static *m() { return 42; } #$_; #__; #\u{6F}_; #\u2118_; #ZW_\u200C_NJ_; #ZW_\u200D_J_;
+ set #$(value) {
+ this.#$_ = value;
+ }
+ set #_(value) {
+ this.#__ = value;
+ }
+ set #\u{6F}(value) {
+ this.#\u{6F}_ = value;
+ }
+ set #\u2118(value) {
+ this.#\u2118_ = value;
+ }
+ set #ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ_ = value;
+ }
+ set #ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J_ = value;
+ }
+;
+ $(value) {
+ this.#$ = value;
+ return this.#$_;
+ }
+ _(value) {
+ this.#_ = value;
+ return this.#__;
+ }
+ \u{6F}(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F}_;
+ }
+ \u2118(value) {
+ this.#\u2118 = value;
+ return this.#\u2118_;
+ }
+ ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ = value;
+ return this.#ZW_\u200C_NJ_;
+ }
+ ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J = value;
+ return this.#ZW_\u200D_J_;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(C.m().next().value, 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.\u2118(1), 1);
+assert.sameValue(c.ZW_\u200C_NJ(1), 1);
+assert.sameValue(c.ZW_\u200D_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-privatename-identifier-alt.js
new file mode 100644
index 0000000000..2600dcfb6c
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-privatename-identifier-alt.js
@@ -0,0 +1,112 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-gen.template
+/*---
+description: Valid PrivateName (field definitions after a static generator in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-private, generators, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static *m() { return 42; } #$; #_; #\u{6F}; #℘; #ZW_‌_NJ; #ZW_‍_J;
+ $(value) {
+ this.#$ = value;
+ return this.#$;
+ }
+ _(value) {
+ this.#_ = value;
+ return this.#_;
+ }
+ \u{6F}(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F};
+ }
+ ℘(value) {
+ this.#℘ = value;
+ return this.#℘;
+ }
+ ZW_‌_NJ(value) {
+ this.#ZW_‌_NJ = value;
+ return this.#ZW_‌_NJ;
+ }
+ ZW_‍_J(value) {
+ this.#ZW_‍_J = value;
+ return this.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(C.m().next().value, 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.℘(1), 1);
+assert.sameValue(c.ZW_‌_NJ(1), 1);
+assert.sameValue(c.ZW_‍_J(1), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-privatename-identifier-initializer-alt.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-privatename-identifier-initializer-alt.js
new file mode 100644
index 0000000000..d28198e687
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-privatename-identifier-initializer-alt.js
@@ -0,0 +1,106 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-privatename-identifier-initializer-alt.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-gen.template
+/*---
+description: Valid PrivateName (field definitions after a static generator in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-private, generators, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static *m() { return 42; } #$ = 1; #_ = 1; #\u{6F} = 1; #℘ = 1; #ZW_‌_NJ = 1; #ZW_‍_J = 1;
+ $() {
+ return this.#$;
+ }
+ _() {
+ return this.#_;
+ }
+ \u{6F}() {
+ return this.#\u{6F};
+ }
+ ℘() {
+ return this.#℘;
+ }
+ ZW_‌_NJ() {
+ return this.#ZW_‌_NJ;
+ }
+ ZW_‍_J() {
+ return this.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(C.m().next().value, 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(), 1);
+assert.sameValue(c._(), 1);
+assert.sameValue(c.\u{6F}(), 1);
+assert.sameValue(c.℘(), 1);
+assert.sameValue(c.ZW_‌_NJ(), 1);
+assert.sameValue(c.ZW_‍_J(), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-privatename-identifier-initializer.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-privatename-identifier-initializer.js
new file mode 100644
index 0000000000..507fb5ba2b
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-privatename-identifier-initializer.js
@@ -0,0 +1,106 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-privatename-identifier-initializer.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-gen.template
+/*---
+description: Valid PrivateName (field definitions after a static generator in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-private, generators, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static *m() { return 42; } #$ = 1; #_ = 1; #\u{6F} = 1; #\u2118 = 1; #ZW_\u200C_NJ = 1; #ZW_\u200D_J = 1;
+ $() {
+ return this.#$;
+ }
+ _() {
+ return this.#_;
+ }
+ \u{6F}() {
+ return this.#\u{6F};
+ }
+ \u2118() {
+ return this.#\u2118;
+ }
+ ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ;
+ }
+ ZW_\u200D_J() {
+ return this.#ZW_\u200D_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(C.m().next().value, 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(), 1);
+assert.sameValue(c._(), 1);
+assert.sameValue(c.\u{6F}(), 1);
+assert.sameValue(c.\u2118(), 1);
+assert.sameValue(c.ZW_\u200C_NJ(), 1);
+assert.sameValue(c.ZW_\u200D_J(), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-privatename-identifier.js
new file mode 100644
index 0000000000..6be5e99862
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-privatename-identifier.js
@@ -0,0 +1,112 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-gen.template
+/*---
+description: Valid PrivateName (field definitions after a static generator in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-private, generators, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static *m() { return 42; } #$; #_; #\u{6F}; #\u2118; #ZW_\u200C_NJ; #ZW_\u200D_J;
+ $(value) {
+ this.#$ = value;
+ return this.#$;
+ }
+ _(value) {
+ this.#_ = value;
+ return this.#_;
+ }
+ \u{6F}(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F};
+ }
+ \u2118(value) {
+ this.#\u2118 = value;
+ return this.#\u2118;
+ }
+ ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ = value;
+ return this.#ZW_\u200C_NJ;
+ }
+ ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J = value;
+ return this.#ZW_\u200D_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(C.m().next().value, 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.\u2118(1), 1);
+assert.sameValue(c.ZW_\u200C_NJ(1), 1);
+assert.sameValue(c.ZW_\u200D_J(1), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-static-async-generator-method-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-static-async-generator-method-privatename-identifier-alt.js
new file mode 100644
index 0000000000..e591ba9030
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-static-async-generator-method-privatename-identifier-alt.js
@@ -0,0 +1,137 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-async-generator-method-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-gen.template
+/*---
+description: Valid Static AsyncGeneratorMethod PrivateName (field definitions after a static generator in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, generators, class, class-fields-public]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static *m() { return 42; } static async * #$(value) {
+ yield * await value;
+ }
+ static async * #_(value) {
+ yield * await value;
+ }
+ static async * #o(value) {
+ yield * await value;
+ }
+ static async * #℘(value) {
+ yield * await value;
+ }
+ static async * #ZW_‌_NJ(value) {
+ yield * await value;
+ }
+ static async * #ZW_‍_J(value) {
+ yield * await value;
+ };
+ static get $() {
+ return this.#$;
+ }
+ static get _() {
+ return this.#_;
+ }
+ static get o() {
+ return this.#o;
+ }
+ static get ℘() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#℘;
+ }
+ static get ZW_‌_NJ() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‌_NJ;
+ }
+ static get ZW_‍_J() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‍_J;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(C.m().next().value, 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+Promise.all([
+ C.$([1]).next(),
+ C._([1]).next(),
+ C.o([1]).next(),
+ C.℘([1]).next(), // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.ZW_‌_NJ([1]).next(), // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.ZW_‍_J([1]).next(), // DO NOT CHANGE THE NAME OF THIS FIELD
+]).then(results => {
+
+ assert.sameValue(results[0].value, 1);
+ assert.sameValue(results[1].value, 1);
+ assert.sameValue(results[2].value, 1);
+ assert.sameValue(results[3].value, 1);
+ assert.sameValue(results[4].value, 1);
+ assert.sameValue(results[5].value, 1);
+
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-static-async-generator-method-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-static-async-generator-method-privatename-identifier.js
new file mode 100644
index 0000000000..e984284638
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-static-async-generator-method-privatename-identifier.js
@@ -0,0 +1,138 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-async-generator-method-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-gen.template
+/*---
+description: Valid Static AsyncGeneratorMethod PrivateName (field definitions after a static generator in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, generators, class, class-fields-public]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static *m() { return 42; } static async * #$(value) {
+ yield * await value;
+ }
+ static async * #_(value) {
+ yield * await value;
+ }
+ static async * #\u{6F}(value) {
+ yield * await value;
+ }
+ static async * #\u2118(value) {
+ yield * await value;
+ }
+ static async * #ZW_\u200C_NJ(value) {
+ yield * await value;
+ }
+ static async * #ZW_\u200D_J(value) {
+ yield * await value;
+ };
+ static get $() {
+ return this.#$;
+ }
+ static get _() {
+ return this.#_;
+ }
+ static get \u{6F}() {
+ return this.#\u{6F};
+ }
+ static get \u2118() {
+ return this.#\u2118;
+ }
+ static get ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ;
+ }
+ static get ZW_\u200D_J() {
+ return this.#ZW_\u200D_J;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(C.m().next().value, 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+Promise.all([
+ C.$([1]).next(),
+ C._([1]).next(),
+ C.\u{6F}([1]).next(),
+ C.\u2118([1]).next(),
+ C.ZW_\u200C_NJ([1]).next(),
+ C.ZW_\u200D_J([1]).next(),
+]).then(results => {
+
+ assert.sameValue(results[0].value, 1);
+ assert.sameValue(results[1].value, 1);
+ assert.sameValue(results[2].value, 1);
+ assert.sameValue(results[3].value, 1);
+ assert.sameValue(results[4].value, 1);
+ assert.sameValue(results[5].value, 1);
+
+}).then($DONE, $DONE);
+
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-static-async-method-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-static-async-method-privatename-identifier-alt.js
new file mode 100644
index 0000000000..13aceacbbe
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-static-async-method-privatename-identifier-alt.js
@@ -0,0 +1,137 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-async-method-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-gen.template
+/*---
+description: Valid Static AsyncMethod PrivateName (field definitions after a static generator in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, generators, class, class-fields-public]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ AsyncMethod
+
+ AsyncMethod :
+ async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static *m() { return 42; } static async #$(value) {
+ return await value;
+ }
+ static async #_(value) {
+ return await value;
+ }
+ static async #o(value) {
+ return await value;
+ }
+ static async #℘(value) {
+ return await value;
+ }
+ static async #ZW_‌_NJ(value) {
+ return await value;
+ }
+ static async #ZW_‍_J(value) {
+ return await value;
+ };
+ static async $(value) {
+ return await this.#$(value);
+ }
+ static async _(value) {
+ return await this.#_(value);
+ }
+ static async o(value) {
+ return await this.#o(value);
+ }
+ static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return await this.#℘(value);
+ }
+ static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return await this.#ZW_‌_NJ(value);
+ }
+ static async ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return await this.#ZW_‍_J(value);
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(C.m().next().value, 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+Promise.all([
+ C.$(1),
+ C._(1),
+ C.o(1),
+ C.℘(1), // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.ZW_‌_NJ(1), // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.ZW_‍_J(1), // DO NOT CHANGE THE NAME OF THIS FIELD
+]).then(results => {
+
+ assert.sameValue(results[0], 1);
+ assert.sameValue(results[1], 1);
+ assert.sameValue(results[2], 1);
+ assert.sameValue(results[3], 1);
+ assert.sameValue(results[4], 1);
+ assert.sameValue(results[5], 1);
+
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-static-async-method-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-static-async-method-privatename-identifier.js
new file mode 100644
index 0000000000..a4aef9d4bb
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-static-async-method-privatename-identifier.js
@@ -0,0 +1,138 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-async-method-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-gen.template
+/*---
+description: Valid Static AsyncMethod PrivateName (field definitions after a static generator in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, generators, class, class-fields-public]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ AsyncMethod
+
+ AsyncMethod :
+ async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static *m() { return 42; } static async #$(value) {
+ return await value;
+ }
+ static async #_(value) {
+ return await value;
+ }
+ static async #\u{6F}(value) {
+ return await value;
+ }
+ static async #\u2118(value) {
+ return await value;
+ }
+ static async #ZW_\u200C_NJ(value) {
+ return await value;
+ }
+ static async #ZW_\u200D_J(value) {
+ return await value;
+ };
+ static async $(value) {
+ return await this.#$(value);
+ }
+ static async _(value) {
+ return await this.#_(value);
+ }
+ static async \u{6F}(value) {
+ return await this.#\u{6F}(value);
+ }
+ static async \u2118(value) {
+ return await this.#\u2118(value);
+ }
+ static async ZW_\u200C_NJ(value) {
+ return await this.#ZW_\u200C_NJ(value);
+ }
+ static async ZW_\u200D_J(value) {
+ return await this.#ZW_\u200D_J(value);
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(C.m().next().value, 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+Promise.all([
+ C.$(1),
+ C._(1),
+ C.\u{6F}(1),
+ C.\u2118(1),
+ C.ZW_\u200C_NJ(1),
+ C.ZW_\u200D_J(1),
+]).then(results => {
+
+ assert.sameValue(results[0], 1);
+ assert.sameValue(results[1], 1);
+ assert.sameValue(results[2], 1);
+ assert.sameValue(results[3], 1);
+ assert.sameValue(results[4], 1);
+ assert.sameValue(results[5], 1);
+
+}).then($DONE, $DONE);
+
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-static-generator-method-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-static-generator-method-privatename-identifier-alt.js
new file mode 100644
index 0000000000..92e3b3d66e
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-static-generator-method-privatename-identifier-alt.js
@@ -0,0 +1,127 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-generator-method-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-gen.template
+/*---
+description: Valid Static GeneratorMethod PrivateName (field definitions after a static generator in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, generators, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ GeneratorMethod
+
+ GeneratorMethod :
+ * ClassElementName ( UniqueFormalParameters ){ GeneratorBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static *m() { return 42; } static * #$(value) {
+ yield * value;
+ }
+ static * #_(value) {
+ yield * value;
+ }
+ static * #o(value) {
+ yield * value;
+ }
+ static * #℘(value) {
+ yield * value;
+ }
+ static * #ZW_‌_NJ(value) {
+ yield * value;
+ }
+ static * #ZW_‍_J(value) {
+ yield * value;
+ };
+ static get $() {
+ return this.#$;
+ }
+ static get _() {
+ return this.#_;
+ }
+ static get o() {
+ return this.#o;
+ }
+ static get ℘() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#℘;
+ }
+ static get ZW_‌_NJ() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‌_NJ;
+ }
+ static get ZW_‍_J() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‍_J;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(C.m().next().value, 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$([1]).next().value, 1);
+assert.sameValue(C._([1]).next().value, 1);
+assert.sameValue(C.o([1]).next().value, 1);
+assert.sameValue(C.℘([1]).next().value, 1);
+assert.sameValue(C.ZW_‌_NJ([1]).next().value, 1);
+assert.sameValue(C.ZW_‍_J([1]).next().value, 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-static-generator-method-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-static-generator-method-privatename-identifier.js
new file mode 100644
index 0000000000..b84f84a43e
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-static-generator-method-privatename-identifier.js
@@ -0,0 +1,128 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-generator-method-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-gen.template
+/*---
+description: Valid Static GeneratorMethod PrivateName (field definitions after a static generator in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, generators, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ GeneratorMethod
+
+ GeneratorMethod :
+ * ClassElementName ( UniqueFormalParameters ){ GeneratorBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static *m() { return 42; } static * #$(value) {
+ yield * value;
+ }
+ static * #_(value) {
+ yield * value;
+ }
+ static * #\u{6F}(value) {
+ yield * value;
+ }
+ static * #\u2118(value) {
+ yield * value;
+ }
+ static * #ZW_\u200C_NJ(value) {
+ yield * value;
+ }
+ static * #ZW_\u200D_J(value) {
+ yield * value;
+ };
+ static get $() {
+ return this.#$;
+ }
+ static get _() {
+ return this.#_;
+ }
+ static get \u{6F}() {
+ return this.#\u{6F};
+ }
+ static get \u2118() {
+ return this.#\u2118;
+ }
+ static get ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ;
+ }
+ static get ZW_\u200D_J() {
+ return this.#ZW_\u200D_J;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(C.m().next().value, 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$([1]).next().value, 1);
+assert.sameValue(C._([1]).next().value, 1);
+assert.sameValue(C.\u{6F}([1]).next().value, 1);
+assert.sameValue(C.\u2118([1]).next().value, 1);
+assert.sameValue(C.ZW_\u200C_NJ([1]).next().value, 1);
+assert.sameValue(C.ZW_\u200D_J([1]).next().value, 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-static-method-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-static-method-privatename-identifier-alt.js
new file mode 100644
index 0000000000..cee0153caa
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-static-method-privatename-identifier-alt.js
@@ -0,0 +1,125 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-method-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-gen.template
+/*---
+description: Valid Static Method PrivateName (field definitions after a static generator in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, generators, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ ClassElementName ( UniqueFormalParameters ){ FunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static *m() { return 42; } static #$(value) {
+ return value;
+ }
+ static #_(value) {
+ return value;
+ }
+ static #o(value) {
+ return value;
+ }
+ static #℘(value) {
+ return value;
+ }
+ static #ZW_‌_NJ(value) {
+ return value;
+ }
+ static #ZW_‍_J(value) {
+ return value;
+ };
+ static $(value) {
+ return this.#$(value);
+ }
+ static _(value) {
+ return this.#_(value);
+ }
+ static o(value) {
+ return this.#o(value);
+ }
+ static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#℘(value);
+ }
+ static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‌_NJ(value);
+ }
+ static ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‍_J(value);
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(C.m().next().value, 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(1), 1);
+assert.sameValue(C._(1), 1);
+assert.sameValue(C.o(1), 1);
+assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+assert.sameValue(C.ZW_‌_NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+assert.sameValue(C.ZW_‍_J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-static-method-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-static-method-privatename-identifier.js
new file mode 100644
index 0000000000..5b8e8822e7
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-static-method-privatename-identifier.js
@@ -0,0 +1,125 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-method-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-gen.template
+/*---
+description: Valid Static Method PrivateName (field definitions after a static generator in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, generators, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ ClassElementName ( UniqueFormalParameters ){ FunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static *m() { return 42; } static #$(value) {
+ return value;
+ }
+ static #_(value) {
+ return value;
+ }
+ static #\u{6F}(value) {
+ return value;
+ }
+ static #\u2118(value) {
+ return value;
+ }
+ static #ZW_\u200C_NJ(value) {
+ return value;
+ }
+ static #ZW_\u200D_J(value) {
+ return value;
+ };
+ static $(value) {
+ return this.#$(value);
+ }
+ static _(value) {
+ return this.#_(value);
+ }
+ static \u{6F}(value) {
+ return this.#\u{6F}(value);
+ }
+ static \u2118(value) {
+ return this.#\u2118(value);
+ }
+ static ZW_\u200C_NJ(value) {
+ return this.#ZW_\u200C_NJ(value);
+ }
+ static ZW_\u200D_J(value) {
+ return this.#ZW_\u200D_J(value);
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(C.m().next().value, 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(1), 1);
+assert.sameValue(C._(1), 1);
+assert.sameValue(C.\u{6F}(1), 1);
+assert.sameValue(C.\u2118(1), 1);
+assert.sameValue(C.ZW_\u200C_NJ(1), 1);
+assert.sameValue(C.ZW_\u200D_J(1), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-static-privatename-identifier-alt-by-classname.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-static-privatename-identifier-alt-by-classname.js
new file mode 100644
index 0000000000..9713e63e6e
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-static-privatename-identifier-alt-by-classname.js
@@ -0,0 +1,113 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-alt-by-classname.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-gen.template
+/*---
+description: Valid Static PrivateName (field definitions after a static generator in the same line)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, generators, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static *m() { return 42; } static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_‍_J;
+ static $(value) {
+ C.#$ = value;
+ return C.#$;
+ }
+ static _(value) {
+ C.#_ = value;
+ return C.#_;
+ }
+ static o(value) {
+ C.#\u{6F} = value;
+ return C.#\u{6F};
+ }
+ static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.#℘ = value;
+ return C.#℘;
+ }
+ static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.#ZW_‌_NJ = value;
+ return C.#ZW_‌_NJ;
+ }
+ static ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.#ZW_‍_J = value;
+ return C.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(C.m().next().value, 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(1), 1);
+assert.sameValue(C._(1), 1);
+assert.sameValue(C.o(1), 1);
+assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+assert.sameValue(C.ZW_‌_NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+assert.sameValue(C.ZW_‍_J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-static-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-static-privatename-identifier-alt.js
new file mode 100644
index 0000000000..7f1543380d
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-static-privatename-identifier-alt.js
@@ -0,0 +1,113 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-gen.template
+/*---
+description: Valid Static PrivateName (field definitions after a static generator in the same line)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, generators, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static *m() { return 42; } static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_‍_J;
+ static $(value) {
+ this.#$ = value;
+ return this.#$;
+ }
+ static _(value) {
+ this.#_ = value;
+ return this.#_;
+ }
+ static o(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F};
+ }
+ static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ this.#℘ = value;
+ return this.#℘;
+ }
+ static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ this.#ZW_‌_NJ = value;
+ return this.#ZW_‌_NJ;
+ }
+ static ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ this.#ZW_‍_J = value;
+ return this.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(C.m().next().value, 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(1), 1);
+assert.sameValue(C._(1), 1);
+assert.sameValue(C.o(1), 1);
+assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+assert.sameValue(C.ZW_‌_NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+assert.sameValue(C.ZW_‍_J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-static-privatename-identifier-by-classname.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-static-privatename-identifier-by-classname.js
new file mode 100644
index 0000000000..c814f0615e
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-static-privatename-identifier-by-classname.js
@@ -0,0 +1,113 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-by-classname.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-gen.template
+/*---
+description: Valid Static PrivateName (field definitions after a static generator in the same line)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, generators, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static *m() { return 42; } static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J;
+ static $(value) {
+ C.#$ = value;
+ return C.#$;
+ }
+ static _(value) {
+ C.#_ = value;
+ return C.#_;
+ }
+ static \u{6F}(value) {
+ C.#\u{6F} = value;
+ return C.#\u{6F};
+ }
+ static \u2118(value) {
+ C.#\u2118 = value;
+ return C.#\u2118;
+ }
+ static ZW_\u200C_NJ(value) {
+ C.#ZW_\u200C_NJ = value;
+ return C.#ZW_\u200C_NJ;
+ }
+ static ZW_\u200D_J(value) {
+ C.#ZW_\u200D_J = value;
+ return C.#ZW_\u200D_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(C.m().next().value, 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(1), 1);
+assert.sameValue(C._(1), 1);
+assert.sameValue(C.\u{6F}(1), 1);
+assert.sameValue(C.\u2118(1), 1);
+assert.sameValue(C.ZW_\u200C_NJ(1), 1);
+assert.sameValue(C.ZW_\u200D_J(1), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js
new file mode 100644
index 0000000000..43888c6e25
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js
@@ -0,0 +1,107 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-initializer-alt-by-classname.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-gen.template
+/*---
+description: Valid Static PrivateName (field definitions after a static generator in the same line)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, generators, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static *m() { return 42; } static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_‍_J = 1;
+ static $() {
+ return C.#$;
+ }
+ static _() {
+ return C.#_;
+ }
+ static \u{6F}() {
+ return C.#\u{6F};
+ }
+ static ℘() {
+ return C.#℘;
+ }
+ static ZW_‌_NJ() {
+ return C.#ZW_‌_NJ;
+ }
+ static ZW_‍_J() {
+ return C.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(C.m().next().value, 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(), 1);
+assert.sameValue(C._(), 1);
+assert.sameValue(C.\u{6F}(), 1);
+assert.sameValue(C.℘(), 1);
+assert.sameValue(C.ZW_‌_NJ(), 1);
+assert.sameValue(C.ZW_‍_J(), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-static-privatename-identifier-initializer-alt.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-static-privatename-identifier-initializer-alt.js
new file mode 100644
index 0000000000..3e0f9f7197
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-static-privatename-identifier-initializer-alt.js
@@ -0,0 +1,107 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-initializer-alt.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-gen.template
+/*---
+description: Valid Static PrivateName (field definitions after a static generator in the same line)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, generators, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static *m() { return 42; } static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_‍_J = 1;
+ static $() {
+ return this.#$;
+ }
+ static _() {
+ return this.#_;
+ }
+ static \u{6F}() {
+ return this.#\u{6F};
+ }
+ static ℘() {
+ return this.#℘;
+ }
+ static ZW_‌_NJ() {
+ return this.#ZW_‌_NJ;
+ }
+ static ZW_‍_J() {
+ return this.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(C.m().next().value, 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(), 1);
+assert.sameValue(C._(), 1);
+assert.sameValue(C.\u{6F}(), 1);
+assert.sameValue(C.℘(), 1);
+assert.sameValue(C.ZW_‌_NJ(), 1);
+assert.sameValue(C.ZW_‍_J(), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-static-privatename-identifier-initializer.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-static-privatename-identifier-initializer.js
new file mode 100644
index 0000000000..22059bc30a
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-static-privatename-identifier-initializer.js
@@ -0,0 +1,107 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-initializer.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-gen.template
+/*---
+description: Valid Static PrivateName (field definitions after a static generator in the same line)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, generators, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static *m() { return 42; } static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #\u2118 = 1; static #ZW_\u200C_NJ = 1; static #ZW_\u200D_J = 1;
+ static $() {
+ return this.#$;
+ }
+ static _() {
+ return this.#_;
+ }
+ static \u{6F}() {
+ return this.#\u{6F};
+ }
+ static \u2118() {
+ return this.#\u2118;
+ }
+ static ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ;
+ }
+ static ZW_\u200D_J() {
+ return this.#ZW_\u200D_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(C.m().next().value, 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(), 1);
+assert.sameValue(C._(), 1);
+assert.sameValue(C.\u{6F}(), 1);
+assert.sameValue(C.\u2118(), 1);
+assert.sameValue(C.ZW_\u200C_NJ(), 1);
+assert.sameValue(C.ZW_\u200D_J(), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-static-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-static-privatename-identifier.js
new file mode 100644
index 0000000000..2d39dafc78
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-rs-static-privatename-identifier.js
@@ -0,0 +1,113 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-gen.template
+/*---
+description: Valid Static PrivateName (field definitions after a static generator in the same line)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, generators, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static *m() { return 42; } static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J;
+ static $(value) {
+ this.#$ = value;
+ return this.#$;
+ }
+ static _(value) {
+ this.#_ = value;
+ return this.#_;
+ }
+ static \u{6F}(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F};
+ }
+ static \u2118(value) {
+ this.#\u2118 = value;
+ return this.#\u2118;
+ }
+ static ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ = value;
+ return this.#ZW_\u200C_NJ;
+ }
+ static ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J = value;
+ return this.#ZW_\u200D_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(C.m().next().value, 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(1), 1);
+assert.sameValue(C._(1), 1);
+assert.sameValue(C.\u{6F}(1), 1);
+assert.sameValue(C.\u2118(1), 1);
+assert.sameValue(C.ZW_\u200C_NJ(1), 1);
+assert.sameValue(C.ZW_\u200D_J(1), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-static-private-fields.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-static-private-fields.js
new file mode 100644
index 0000000000..13d9a43d2a
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-static-private-fields.js
@@ -0,0 +1,74 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/static-private-fields.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-gen.template
+/*---
+description: static private fields (field definitions after a static generator in the same line)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, generators, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ static FieldDefinition ;
+
+ FieldDefinition :
+ ClassElementName Initializer_opt
+
+ ClassElementName :
+ PrivateName
+
+ PrivateName :
+ # IdentifierName
+
+---*/
+
+
+class C {
+ static *m() { return 42; } static #x; static #y;
+ static x() {
+ this.#x = 42;
+ return this.#x;
+ }
+ static y() {
+ this.#y = 43;
+ return this.#y;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(C.m().next().value, 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+// Test the private fields do not appear as properties before set to value
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#x"), "test 1");
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 2");
+assert(!Object.prototype.hasOwnProperty.call(c, "#x"), "test 3");
+
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#y"), "test 4");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 5");
+assert(!Object.prototype.hasOwnProperty.call(c, "#y"), "test 6");
+
+// Test if private fields can be sucessfully accessed and set to value
+assert.sameValue(C.x(), 42, "test 7");
+assert.sameValue(C.y(), 43, "test 8");
+
+// Test the private fields do not appear as properties before after set to value
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 9");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 10");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-static-private-methods-with-fields.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-static-private-methods-with-fields.js
new file mode 100644
index 0000000000..73d35265c5
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-static-private-methods-with-fields.js
@@ -0,0 +1,91 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/static-private-methods-with-fields.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-gen.template
+/*---
+description: static private methods with fields (field definitions after a static generator in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class-static-fields-private, generators, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ static FieldDefinition ;
+
+ FieldDefinition :
+ ClassElementName Initializer_opt
+
+ ClassElementName :
+ PrivateName
+
+ PrivateName :
+ # IdentifierName
+
+---*/
+
+
+class C {
+ static *m() { return 42; } static #xVal; static #yVal;
+ static #x(value) {
+ this.#xVal = value;
+ return this.#xVal;
+ }
+ static #y(value) {
+ this.#yVal = value;
+ return this.#yVal;
+ }
+ static x() {
+ return this.#x(42);
+ }
+ static y() {
+ return this.#y(43);
+ }
+}
+
+var c = new C();
+
+assert.sameValue(C.m().next().value, 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+// Test the private methods do not appear as properties before set to value
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#x"), "test 1");
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 2");
+assert(!Object.prototype.hasOwnProperty.call(c, "#x"), "test 3");
+
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#y"), "test 4");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 5");
+assert(!Object.prototype.hasOwnProperty.call(c, "#y"), "test 6");
+
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#xVal"), "test 7");
+assert(!Object.prototype.hasOwnProperty.call(C, "#xVal"), "test 8");
+assert(!Object.prototype.hasOwnProperty.call(c, "#xVal"), "test 9");
+
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#yVal"), "test 10");
+assert(!Object.prototype.hasOwnProperty.call(C, "#yVal"), "test 11");
+assert(!Object.prototype.hasOwnProperty.call(c, "#yVal"), "test 12");
+
+// Test if private fields can be sucessfully accessed and set to value
+assert.sameValue(C.x(), 42, "test 13");
+assert.sameValue(C.y(), 43, "test 14");
+
+// Test the private fields do not appear as properties before after set to value
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 15");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 16");
+
+assert(!Object.prototype.hasOwnProperty.call(C, "#xVal"), "test 17");
+assert(!Object.prototype.hasOwnProperty.call(C, "#yVal"), "test 18");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-static-private-methods.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-static-private-methods.js
new file mode 100644
index 0000000000..214c71221e
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-static-private-methods.js
@@ -0,0 +1,78 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/static-private-methods.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-gen.template
+/*---
+description: static private methods (field definitions after a static generator in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, generators, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ static FieldDefinition ;
+
+ FieldDefinition :
+ ClassElementName Initializer_opt
+
+ ClassElementName :
+ PrivateName
+
+ PrivateName :
+ # IdentifierName
+
+---*/
+
+
+class C {
+ static *m() { return 42; } ;
+ static #x(value) {
+ return value / 2;
+ }
+ static #y(value) {
+ return value * 2;
+ }
+ static x() {
+ return this.#x(84);
+ }
+ static y() {
+ return this.#y(43);
+ }
+}
+
+var c = new C();
+
+assert.sameValue(C.m().next().value, 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+// Test the private methods do not appear as properties before set to value
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#x"), "test 1");
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 2");
+assert(!Object.prototype.hasOwnProperty.call(c, "#x"), "test 3");
+
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#y"), "test 4");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 5");
+assert(!Object.prototype.hasOwnProperty.call(c, "#y"), "test 6");
+
+// Test if private fields can be sucessfully accessed and set to value
+assert.sameValue(C.x(), 42, "test 7");
+assert.sameValue(C.y(), 86, "test 8");
+
+// Test the private fields do not appear as properties before after set to value
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 9");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 10");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-string-literal-names.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-string-literal-names.js
new file mode 100644
index 0000000000..15a6f0219c
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-gen-string-literal-names.js
@@ -0,0 +1,112 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/string-literal-names.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-gen.template
+/*---
+description: String literal names (field definitions after a static generator in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-public, generators, class]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement:
+ ...
+ FieldDefinition ;
+
+ FieldDefinition:
+ ClassElementName Initializer_opt
+
+ ClassElementName:
+ PropertyName
+
+---*/
+
+
+class C {
+ static *m() { return 42; } 'a'; "b"; 'c' = 39;
+ "d" = 42;
+
+}
+
+var c = new C();
+
+assert.sameValue(C.m().next().value, 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "a"),
+ "a does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "a"),
+ "a does not appear as an own property on C constructor"
+);
+
+verifyProperty(c, "a", {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "b"),
+ "b does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "b"),
+ "b does not appear as an own property on C constructor"
+);
+
+verifyProperty(c, "b", {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "c"),
+ "c does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "c"),
+ "c does not appear as an own property on C constructor"
+);
+
+verifyProperty(c, "c", {
+ value: 39,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "d"),
+ "d does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "d"),
+ "d does not appear as an own property on C constructor"
+);
+
+verifyProperty(c, "d", {
+ value: 42,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-computed-names.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-computed-names.js
new file mode 100644
index 0000000000..cb60bd378a
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-computed-names.js
@@ -0,0 +1,110 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/computed-names.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-method.template
+/*---
+description: Computed property names (field definitions after a static method in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-public, computed-property-names, class]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement:
+ ...
+ FieldDefinition ;
+
+ FieldDefinition:
+ ClassElementName Initializer_opt
+
+ ClassElementName:
+ PropertyName
+
+---*/
+var x = "b";
+
+
+
+class C {
+ static m() { return 42; } [x] = 42; [10] = "meep"; ["not initialized"];
+
+}
+
+var c = new C();
+
+assert.sameValue(C.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "b"),
+ "b doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "b"),
+ "b doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "b", {
+ value: 42,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "x"),
+ "x doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "x"),
+ "x doesn't appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "x"),
+ "x doesn't appear as an own property on C instance"
+);
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "10"),
+ "10 doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "10"),
+ "10 doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "10", {
+ value: "meep",
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "not initialized"),
+ "'not initialized' doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "not initialized"),
+ "'not initialized' doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "not initialized", {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-computed-symbol-names.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-computed-symbol-names.js
new file mode 100644
index 0000000000..a6f74e7c7b
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-computed-symbol-names.js
@@ -0,0 +1,108 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/computed-symbol-names.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-method.template
+/*---
+description: Computed property symbol names (field definitions after a static method in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-public, Symbol, computed-property-names, class]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement:
+ ...
+ FieldDefinition ;
+
+ FieldDefinition:
+ ClassElementName Initializer_opt
+
+ ClassElementName:
+ PropertyName
+
+---*/
+var x = Symbol();
+var y = Symbol();
+
+
+
+class C {
+ static m() { return 42; } [x]; [y] = 42;
+
+}
+
+var c = new C();
+
+assert.sameValue(C.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, x),
+ "Symbol x doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, x),
+ "Symbol x doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, x, {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, y),
+ "Symbol y doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, y),
+ "Symbol y doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, y, {
+ value: 42,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "x"),
+ "x doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "x"),
+ "x doesn't appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "x"),
+ "x doesn't appear as an own property on C instance"
+);
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "y"),
+ "y doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "y"),
+ "y doesn't appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "y"),
+ "y doesn't appear as an own property on C instance"
+);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-grammar-privatename-identifier-semantics-stringvalue.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-grammar-privatename-identifier-semantics-stringvalue.js
new file mode 100644
index 0000000000..820183bea5
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-grammar-privatename-identifier-semantics-stringvalue.js
@@ -0,0 +1,112 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-privatename-identifier-semantics-stringvalue.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-method.template
+/*---
+description: PrivateName Static Semantics, StringValue (field definitions after a static method in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+
+ 1. Return the String value consisting of the sequence of code
+ units corresponding to PrivateName. In determining the sequence
+ any occurrences of \ UnicodeEscapeSequence are first replaced
+ with the code point represented by the UnicodeEscapeSequence
+ and then the code points of the entire PrivateName are converted
+ to code units by UTF16Encoding (10.1.1) each code point.
+
+---*/
+
+
+class C {
+ static m() { return 42; } #\u{6F};
+ #\u2118;
+ #ZW_\u200C_NJ;
+ #ZW_\u200D_J;;
+ o(value) {
+ this.#o = value;
+ return this.#o;
+ }
+ ℘(value) {
+ this.#℘ = value;
+ return this.#℘;
+ }
+ ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS METHOD
+ this.#ZW_‌_NJ = value;
+ return this.#ZW_‌_NJ;
+ }
+ ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS METHOD
+ this.#ZW_‍_J = value;
+ return this.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(C.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.o(1), 1);
+assert.sameValue(c.℘(1), 1);
+assert.sameValue(c.ZW_‌_NJ(1), 1);
+assert.sameValue(c.ZW_‍_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-literal-names-asi.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-literal-names-asi.js
new file mode 100644
index 0000000000..9e97c4a255
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-literal-names-asi.js
@@ -0,0 +1,80 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/literal-names-asi.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-method.template
+/*---
+description: Literal property names with ASI (field definitions after a static method in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-public, class]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement:
+ ...
+ FieldDefinition ;
+
+ FieldDefinition:
+ ClassElementName Initializer_opt
+
+ ClassElementName:
+ PropertyName
+
+---*/
+
+
+class C {
+ static m() { return 42; } a
+ b = 42;;
+
+}
+
+var c = new C();
+
+assert.sameValue(C.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "a"),
+ "a doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "a"),
+ "a doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "a", {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "b"),
+ "b doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "b"),
+ "b doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "b", {
+ value: 42,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-literal-names.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-literal-names.js
new file mode 100644
index 0000000000..3cc1c1be04
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-literal-names.js
@@ -0,0 +1,99 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/literal-names.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-method.template
+/*---
+description: Literal property names (field definitions after a static method in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-public, class]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement:
+ ...
+ FieldDefinition ;
+
+ FieldDefinition:
+ ClassElementName Initializer_opt
+
+ ClassElementName:
+ PropertyName
+
+---*/
+const fn = function() {}
+
+
+
+class C {
+ static m() { return 42; } a; b = 42;
+ c = fn;
+
+}
+
+var c = new C();
+
+assert.sameValue(C.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "a"),
+ "a doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "a"),
+ "a doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "a", {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "b"),
+ "b doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "b"),
+ "b doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "b", {
+ value: 42,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "c"),
+ "c doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "c"),
+ "c doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "c", {
+ value: fn,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-private-field-usage.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-private-field-usage.js
new file mode 100644
index 0000000000..1fd4217704
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-private-field-usage.js
@@ -0,0 +1,52 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-field-usage.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-method.template
+/*---
+description: PrivateName CallExpression usage (private field) (field definitions after a static method in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ Updated Productions
+
+ CallExpression[Yield, Await]:
+ CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+ SuperCall[?Yield, ?Await]
+ CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+ CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+ CallExpression[?Yield, ?Await].IdentifierName
+ CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+ CallExpression[?Yield, ?Await].PrivateName
+
+---*/
+
+
+class C {
+ static m() { return 42; } #m = 'test262';;
+ method() {
+ return this.#m;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(C.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.method(), 'test262');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-private-method-getter-usage.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-private-method-getter-usage.js
new file mode 100644
index 0000000000..35563b45d0
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-private-method-getter-usage.js
@@ -0,0 +1,52 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-method-getter-usage.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-method.template
+/*---
+description: PrivateName CallExpression usage (Accesor get method) (field definitions after a static method in the same line)
+esid: prod-FieldDefinition
+features: [class-methods-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ Updated Productions
+
+ CallExpression[Yield, Await]:
+ CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+ SuperCall[?Yield, ?Await]
+ CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+ CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+ CallExpression[?Yield, ?Await].IdentifierName
+ CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+ CallExpression[?Yield, ?Await].PrivateName
+
+---*/
+
+
+class C {
+ static m() { return 42; } get #m() { return 'test262'; };
+ method() {
+ return this.#m;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(C.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.method(), 'test262');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-private-method-usage.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-private-method-usage.js
new file mode 100644
index 0000000000..375648c02c
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-private-method-usage.js
@@ -0,0 +1,52 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-method-usage.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-method.template
+/*---
+description: PrivateName CallExpression usage (private method) (field definitions after a static method in the same line)
+esid: prod-FieldDefinition
+features: [class-methods-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ Updated Productions
+
+ CallExpression[Yield, Await]:
+ CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+ SuperCall[?Yield, ?Await]
+ CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+ CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+ CallExpression[?Yield, ?Await].IdentifierName
+ CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+ CallExpression[?Yield, ?Await].PrivateName
+
+---*/
+
+
+class C {
+ static m() { return 42; } #m() { return 'test262'; };
+ method() {
+ return this.#m();
+ }
+}
+
+var c = new C();
+
+assert.sameValue(C.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.method(), 'test262');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-private-names.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-private-names.js
new file mode 100644
index 0000000000..1f1891cd9f
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-private-names.js
@@ -0,0 +1,74 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-names.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-method.template
+/*---
+description: private names (field definitions after a static method in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ FieldDefinition ;
+
+ FieldDefinition :
+ ClassElementName Initializer_opt
+
+ ClassElementName :
+ PrivateName
+
+ PrivateName :
+ # IdentifierName
+
+---*/
+
+
+class C {
+ static m() { return 42; } #x; #y;
+ x() {
+ this.#x = 42;
+ return this.#x;
+ }
+ y() {
+ this.#y = 43;
+ return this.#y;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(C.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+// Test the private fields do not appear as properties before set to value
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#x"), "test 1");
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 2");
+assert(!Object.prototype.hasOwnProperty.call(c, "#x"), "test 3");
+
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#y"), "test 4");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 5");
+assert(!Object.prototype.hasOwnProperty.call(c, "#y"), "test 6");
+
+// Test if private fields can be sucessfully accessed and set to value
+assert.sameValue(c.x(), 42, "test 7");
+assert.sameValue(c.y(), 43, "test 8");
+
+// Test the private fields do not appear as properties before after set to value
+assert(!Object.prototype.hasOwnProperty.call(c, "#x"), "test 9");
+assert(!Object.prototype.hasOwnProperty.call(c, "#y"), "test 10");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-field-identifier-initializer.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-field-identifier-initializer.js
new file mode 100644
index 0000000000..0bbf608b42
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-field-identifier-initializer.js
@@ -0,0 +1,90 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-field-identifier-initializer.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-method.template
+/*---
+description: Valid FieldDefinition (field definitions after a static method in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-public, class]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+
+ PropertyName :
+ LiteralPropertyName
+ ComputedPropertyName
+
+ LiteralPropertyName :
+ IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static m() { return 42; } $ = 1; _ = 1; \u{6F} = 1; \u2118 = 1; ZW_\u200C_NJ = 1; ZW_\u200D_J = 1;
+
+}
+
+var c = new C();
+
+assert.sameValue(C.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$, 1);
+assert.sameValue(c._, 1);
+assert.sameValue(c.\u{6F}, 1);
+assert.sameValue(c.\u2118, 1);
+assert.sameValue(c.ZW_\u200C_NJ, 1);
+assert.sameValue(c.ZW_\u200D_J, 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-field-identifier.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-field-identifier.js
new file mode 100644
index 0000000000..18ae1d46b4
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-field-identifier.js
@@ -0,0 +1,97 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-field-identifier.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-method.template
+/*---
+description: Valid FieldDefinition (field definitions after a static method in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-public, class]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+
+ PropertyName :
+ LiteralPropertyName
+ ComputedPropertyName
+
+ LiteralPropertyName :
+ IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static m() { return 42; } $; _; \u{6F}; \u2118; ZW_\u200C_NJ; ZW_\u200D_J;
+
+}
+
+var c = new C();
+
+assert.sameValue(C.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+c.$ = 1;
+c._ = 1;
+c.\u{6F} = 1;
+c.\u2118 = 1;
+c.ZW_\u200C_NJ = 1;
+c.ZW_\u200D_J = 1;
+
+assert.sameValue(c.$, 1);
+assert.sameValue(c._, 1);
+assert.sameValue(c.\u{6F}, 1);
+assert.sameValue(c.\u2118, 1);
+assert.sameValue(c.ZW_\u200C_NJ, 1);
+assert.sameValue(c.ZW_\u200D_J, 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-private-getter-alt.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-private-getter-alt.js
new file mode 100644
index 0000000000..f3432246aa
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-private-getter-alt.js
@@ -0,0 +1,131 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-getter-alt.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-method.template
+/*---
+description: Valid PrivateName as private getter (field definitions after a static method in the same line)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ...
+ get ClassElementName ( ){ FunctionBody }
+ ...
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static m() { return 42; } #$_; #__; #\u{6F}_; #℘_; #ZW_‌_NJ_; #ZW_‍_J_;
+ get #$() {
+ return this.#$_;
+ }
+ get #_() {
+ return this.#__;
+ }
+ get #\u{6F}() {
+ return this.#\u{6F}_;
+ }
+ get #℘() {
+ return this.#℘_;
+ }
+ get #ZW_‌_NJ() {
+ return this.#ZW_‌_NJ_;
+ }
+ get #ZW_‍_J() {
+ return this.#ZW_‍_J_;
+ }
+;
+ $(value) {
+ this.#$_ = value;
+ return this.#$;
+ }
+ _(value) {
+ this.#__ = value;
+ return this.#_;
+ }
+ \u{6F}(value) {
+ this.#\u{6F}_ = value;
+ return this.#\u{6F};
+ }
+ ℘(value) {
+ this.#℘_ = value;
+ return this.#℘;
+ }
+ ZW_‌_NJ(value) {
+ this.#ZW_‌_NJ_ = value;
+ return this.#ZW_‌_NJ;
+ }
+ ZW_‍_J(value) {
+ this.#ZW_‍_J_ = value;
+ return this.#ZW_‍_J;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(C.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.℘(1), 1);
+assert.sameValue(c.ZW_‌_NJ(1), 1);
+assert.sameValue(c.ZW_‍_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-private-getter.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-private-getter.js
new file mode 100644
index 0000000000..0731610a19
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-private-getter.js
@@ -0,0 +1,131 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-getter.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-method.template
+/*---
+description: Valid PrivateName as private getter (field definitions after a static method in the same line)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ...
+ get ClassElementName ( ){ FunctionBody }
+ ...
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static m() { return 42; } #$_; #__; #\u{6F}_; #\u2118_; #ZW_\u200C_NJ_; #ZW_\u200D_J_;
+ get #$() {
+ return this.#$_;
+ }
+ get #_() {
+ return this.#__;
+ }
+ get #\u{6F}() {
+ return this.#\u{6F}_;
+ }
+ get #\u2118() {
+ return this.#\u2118_;
+ }
+ get #ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ_;
+ }
+ get #ZW_\u200D_J() {
+ return this.#ZW_\u200D_J_;
+ }
+;
+ $(value) {
+ this.#$_ = value;
+ return this.#$;
+ }
+ _(value) {
+ this.#__ = value;
+ return this.#_;
+ }
+ \u{6F}(value) {
+ this.#\u{6F}_ = value;
+ return this.#\u{6F};
+ }
+ \u2118(value) {
+ this.#\u2118_ = value;
+ return this.#\u2118;
+ }
+ ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ_ = value;
+ return this.#ZW_\u200C_NJ;
+ }
+ ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J_ = value;
+ return this.#ZW_\u200D_J;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(C.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.\u2118(1), 1);
+assert.sameValue(c.ZW_\u200C_NJ(1), 1);
+assert.sameValue(c.ZW_\u200D_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-private-method-alt.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-private-method-alt.js
new file mode 100644
index 0000000000..d7a7a0e688
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-private-method-alt.js
@@ -0,0 +1,130 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-method-alt.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-method.template
+/*---
+description: Valid PrivateName as private method (field definitions after a static method in the same line)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ClassElementName ( UniqueFormalParameters ) { FunctionBody }
+ ...
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static m() { return 42; } #$_; #__; #\u{6F}_; #℘_; #ZW_‌_NJ_; #ZW_‍_J_;
+ #$() {
+ return this.#$_;
+ }
+ #_() {
+ return this.#__;
+ }
+ #\u{6F}() {
+ return this.#\u{6F}_;
+ }
+ #℘() {
+ return this.#℘_;
+ }
+ #ZW_‌_NJ() {
+ return this.#ZW_‌_NJ_;
+ }
+ #ZW_‍_J() {
+ return this.#ZW_‍_J_;
+ }
+;
+ $(value) {
+ this.#$_ = value;
+ return this.#$();
+ }
+ _(value) {
+ this.#__ = value;
+ return this.#_();
+ }
+ \u{6F}(value) {
+ this.#\u{6F}_ = value;
+ return this.#\u{6F}();
+ }
+ ℘(value) {
+ this.#℘_ = value;
+ return this.#℘();
+ }
+ ZW_‌_NJ(value) {
+ this.#ZW_‌_NJ_ = value;
+ return this.#ZW_‌_NJ();
+ }
+ ZW_‍_J(value) {
+ this.#ZW_‍_J_ = value;
+ return this.#ZW_‍_J();
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(C.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.℘(1), 1);
+assert.sameValue(c.ZW_‌_NJ(1), 1);
+assert.sameValue(c.ZW_‍_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-private-method.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-private-method.js
new file mode 100644
index 0000000000..68a5e5e9e7
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-private-method.js
@@ -0,0 +1,130 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-method.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-method.template
+/*---
+description: Valid PrivateName as private method (field definitions after a static method in the same line)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ClassElementName ( UniqueFormalParameters ) { FunctionBody }
+ ...
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static m() { return 42; } #$_; #__; #\u{6F}_; #\u2118_; #ZW_\u200C_NJ_; #ZW_\u200D_J_;
+ #$() {
+ return this.#$_;
+ }
+ #_() {
+ return this.#__;
+ }
+ #\u{6F}() {
+ return this.#\u{6F}_;
+ }
+ #\u2118() {
+ return this.#\u2118_;
+ }
+ #ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ_;
+ }
+ #ZW_\u200D_J() {
+ return this.#ZW_\u200D_J_;
+ }
+;
+ $(value) {
+ this.#$_ = value;
+ return this.#$();
+ }
+ _(value) {
+ this.#__ = value;
+ return this.#_();
+ }
+ \u{6F}(value) {
+ this.#\u{6F}_ = value;
+ return this.#\u{6F}();
+ }
+ \u2118(value) {
+ this.#\u2118_ = value;
+ return this.#\u2118();
+ }
+ ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ_ = value;
+ return this.#ZW_\u200C_NJ();
+ }
+ ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J_ = value;
+ return this.#ZW_\u200D_J();
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(C.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.\u2118(1), 1);
+assert.sameValue(c.ZW_\u200C_NJ(1), 1);
+assert.sameValue(c.ZW_\u200D_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-private-setter-alt.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-private-setter-alt.js
new file mode 100644
index 0000000000..5371131c0e
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-private-setter-alt.js
@@ -0,0 +1,130 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-setter-alt.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-method.template
+/*---
+description: Valid PrivateName as private setter (field definitions after a static method in the same line)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ...
+ set ClassElementName ( PropertySetParameterList ) { FunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static m() { return 42; } #$_; #__; #\u{6F}_; #℘_; #ZW_‌_NJ_; #ZW_‍_J_;
+ set #$(value) {
+ this.#$_ = value;
+ }
+ set #_(value) {
+ this.#__ = value;
+ }
+ set #\u{6F}(value) {
+ this.#\u{6F}_ = value;
+ }
+ set #℘(value) {
+ this.#℘_ = value;
+ }
+ set #ZW_‌_NJ(value) {
+ this.#ZW_‌_NJ_ = value;
+ }
+ set #ZW_‍_J(value) {
+ this.#ZW_‍_J_ = value;
+ }
+;
+ $(value) {
+ this.#$ = value;
+ return this.#$_;
+ }
+ _(value) {
+ this.#_ = value;
+ return this.#__;
+ }
+ \u{6F}(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F}_;
+ }
+ ℘(value) {
+ this.#℘ = value;
+ return this.#℘_;
+ }
+ ZW_‌_NJ(value) {
+ this.#ZW_‌_NJ = value;
+ return this.#ZW_‌_NJ_;
+ }
+ ZW_‍_J(value) {
+ this.#ZW_‍_J = value;
+ return this.#ZW_‍_J_;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(C.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.℘(1), 1);
+assert.sameValue(c.ZW_‌_NJ(1), 1);
+assert.sameValue(c.ZW_‍_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-private-setter.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-private-setter.js
new file mode 100644
index 0000000000..d15e7d36c4
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-private-setter.js
@@ -0,0 +1,130 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-setter.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-method.template
+/*---
+description: Valid PrivateName as private setter (field definitions after a static method in the same line)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ...
+ set ClassElementName ( PropertySetParameterList ) { FunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static m() { return 42; } #$_; #__; #\u{6F}_; #\u2118_; #ZW_\u200C_NJ_; #ZW_\u200D_J_;
+ set #$(value) {
+ this.#$_ = value;
+ }
+ set #_(value) {
+ this.#__ = value;
+ }
+ set #\u{6F}(value) {
+ this.#\u{6F}_ = value;
+ }
+ set #\u2118(value) {
+ this.#\u2118_ = value;
+ }
+ set #ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ_ = value;
+ }
+ set #ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J_ = value;
+ }
+;
+ $(value) {
+ this.#$ = value;
+ return this.#$_;
+ }
+ _(value) {
+ this.#_ = value;
+ return this.#__;
+ }
+ \u{6F}(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F}_;
+ }
+ \u2118(value) {
+ this.#\u2118 = value;
+ return this.#\u2118_;
+ }
+ ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ = value;
+ return this.#ZW_\u200C_NJ_;
+ }
+ ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J = value;
+ return this.#ZW_\u200D_J_;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(C.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.\u2118(1), 1);
+assert.sameValue(c.ZW_\u200C_NJ(1), 1);
+assert.sameValue(c.ZW_\u200D_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-privatename-identifier-alt.js
new file mode 100644
index 0000000000..d248e6ac16
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-privatename-identifier-alt.js
@@ -0,0 +1,112 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-method.template
+/*---
+description: Valid PrivateName (field definitions after a static method in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static m() { return 42; } #$; #_; #\u{6F}; #℘; #ZW_‌_NJ; #ZW_‍_J;
+ $(value) {
+ this.#$ = value;
+ return this.#$;
+ }
+ _(value) {
+ this.#_ = value;
+ return this.#_;
+ }
+ \u{6F}(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F};
+ }
+ ℘(value) {
+ this.#℘ = value;
+ return this.#℘;
+ }
+ ZW_‌_NJ(value) {
+ this.#ZW_‌_NJ = value;
+ return this.#ZW_‌_NJ;
+ }
+ ZW_‍_J(value) {
+ this.#ZW_‍_J = value;
+ return this.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(C.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.℘(1), 1);
+assert.sameValue(c.ZW_‌_NJ(1), 1);
+assert.sameValue(c.ZW_‍_J(1), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-privatename-identifier-initializer-alt.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-privatename-identifier-initializer-alt.js
new file mode 100644
index 0000000000..aca2290a9d
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-privatename-identifier-initializer-alt.js
@@ -0,0 +1,106 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-privatename-identifier-initializer-alt.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-method.template
+/*---
+description: Valid PrivateName (field definitions after a static method in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static m() { return 42; } #$ = 1; #_ = 1; #\u{6F} = 1; #℘ = 1; #ZW_‌_NJ = 1; #ZW_‍_J = 1;
+ $() {
+ return this.#$;
+ }
+ _() {
+ return this.#_;
+ }
+ \u{6F}() {
+ return this.#\u{6F};
+ }
+ ℘() {
+ return this.#℘;
+ }
+ ZW_‌_NJ() {
+ return this.#ZW_‌_NJ;
+ }
+ ZW_‍_J() {
+ return this.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(C.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(), 1);
+assert.sameValue(c._(), 1);
+assert.sameValue(c.\u{6F}(), 1);
+assert.sameValue(c.℘(), 1);
+assert.sameValue(c.ZW_‌_NJ(), 1);
+assert.sameValue(c.ZW_‍_J(), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-privatename-identifier-initializer.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-privatename-identifier-initializer.js
new file mode 100644
index 0000000000..c2f6b16e75
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-privatename-identifier-initializer.js
@@ -0,0 +1,106 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-privatename-identifier-initializer.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-method.template
+/*---
+description: Valid PrivateName (field definitions after a static method in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static m() { return 42; } #$ = 1; #_ = 1; #\u{6F} = 1; #\u2118 = 1; #ZW_\u200C_NJ = 1; #ZW_\u200D_J = 1;
+ $() {
+ return this.#$;
+ }
+ _() {
+ return this.#_;
+ }
+ \u{6F}() {
+ return this.#\u{6F};
+ }
+ \u2118() {
+ return this.#\u2118;
+ }
+ ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ;
+ }
+ ZW_\u200D_J() {
+ return this.#ZW_\u200D_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(C.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(), 1);
+assert.sameValue(c._(), 1);
+assert.sameValue(c.\u{6F}(), 1);
+assert.sameValue(c.\u2118(), 1);
+assert.sameValue(c.ZW_\u200C_NJ(), 1);
+assert.sameValue(c.ZW_\u200D_J(), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-privatename-identifier.js
new file mode 100644
index 0000000000..f5e5e271e9
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-privatename-identifier.js
@@ -0,0 +1,112 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-method.template
+/*---
+description: Valid PrivateName (field definitions after a static method in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static m() { return 42; } #$; #_; #\u{6F}; #\u2118; #ZW_\u200C_NJ; #ZW_\u200D_J;
+ $(value) {
+ this.#$ = value;
+ return this.#$;
+ }
+ _(value) {
+ this.#_ = value;
+ return this.#_;
+ }
+ \u{6F}(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F};
+ }
+ \u2118(value) {
+ this.#\u2118 = value;
+ return this.#\u2118;
+ }
+ ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ = value;
+ return this.#ZW_\u200C_NJ;
+ }
+ ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J = value;
+ return this.#ZW_\u200D_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(C.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.\u2118(1), 1);
+assert.sameValue(c.ZW_\u200C_NJ(1), 1);
+assert.sameValue(c.ZW_\u200D_J(1), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-static-async-generator-method-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-static-async-generator-method-privatename-identifier-alt.js
new file mode 100644
index 0000000000..99ec2bf733
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-static-async-generator-method-privatename-identifier-alt.js
@@ -0,0 +1,137 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-async-generator-method-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-method.template
+/*---
+description: Valid Static AsyncGeneratorMethod PrivateName (field definitions after a static method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static m() { return 42; } static async * #$(value) {
+ yield * await value;
+ }
+ static async * #_(value) {
+ yield * await value;
+ }
+ static async * #o(value) {
+ yield * await value;
+ }
+ static async * #℘(value) {
+ yield * await value;
+ }
+ static async * #ZW_‌_NJ(value) {
+ yield * await value;
+ }
+ static async * #ZW_‍_J(value) {
+ yield * await value;
+ };
+ static get $() {
+ return this.#$;
+ }
+ static get _() {
+ return this.#_;
+ }
+ static get o() {
+ return this.#o;
+ }
+ static get ℘() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#℘;
+ }
+ static get ZW_‌_NJ() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‌_NJ;
+ }
+ static get ZW_‍_J() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‍_J;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(C.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+Promise.all([
+ C.$([1]).next(),
+ C._([1]).next(),
+ C.o([1]).next(),
+ C.℘([1]).next(), // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.ZW_‌_NJ([1]).next(), // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.ZW_‍_J([1]).next(), // DO NOT CHANGE THE NAME OF THIS FIELD
+]).then(results => {
+
+ assert.sameValue(results[0].value, 1);
+ assert.sameValue(results[1].value, 1);
+ assert.sameValue(results[2].value, 1);
+ assert.sameValue(results[3].value, 1);
+ assert.sameValue(results[4].value, 1);
+ assert.sameValue(results[5].value, 1);
+
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-static-async-generator-method-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-static-async-generator-method-privatename-identifier.js
new file mode 100644
index 0000000000..b33d56493a
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-static-async-generator-method-privatename-identifier.js
@@ -0,0 +1,138 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-async-generator-method-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-method.template
+/*---
+description: Valid Static AsyncGeneratorMethod PrivateName (field definitions after a static method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static m() { return 42; } static async * #$(value) {
+ yield * await value;
+ }
+ static async * #_(value) {
+ yield * await value;
+ }
+ static async * #\u{6F}(value) {
+ yield * await value;
+ }
+ static async * #\u2118(value) {
+ yield * await value;
+ }
+ static async * #ZW_\u200C_NJ(value) {
+ yield * await value;
+ }
+ static async * #ZW_\u200D_J(value) {
+ yield * await value;
+ };
+ static get $() {
+ return this.#$;
+ }
+ static get _() {
+ return this.#_;
+ }
+ static get \u{6F}() {
+ return this.#\u{6F};
+ }
+ static get \u2118() {
+ return this.#\u2118;
+ }
+ static get ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ;
+ }
+ static get ZW_\u200D_J() {
+ return this.#ZW_\u200D_J;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(C.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+Promise.all([
+ C.$([1]).next(),
+ C._([1]).next(),
+ C.\u{6F}([1]).next(),
+ C.\u2118([1]).next(),
+ C.ZW_\u200C_NJ([1]).next(),
+ C.ZW_\u200D_J([1]).next(),
+]).then(results => {
+
+ assert.sameValue(results[0].value, 1);
+ assert.sameValue(results[1].value, 1);
+ assert.sameValue(results[2].value, 1);
+ assert.sameValue(results[3].value, 1);
+ assert.sameValue(results[4].value, 1);
+ assert.sameValue(results[5].value, 1);
+
+}).then($DONE, $DONE);
+
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-static-async-method-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-static-async-method-privatename-identifier-alt.js
new file mode 100644
index 0000000000..5a545abaea
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-static-async-method-privatename-identifier-alt.js
@@ -0,0 +1,137 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-async-method-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-method.template
+/*---
+description: Valid Static AsyncMethod PrivateName (field definitions after a static method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ AsyncMethod
+
+ AsyncMethod :
+ async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static m() { return 42; } static async #$(value) {
+ return await value;
+ }
+ static async #_(value) {
+ return await value;
+ }
+ static async #o(value) {
+ return await value;
+ }
+ static async #℘(value) {
+ return await value;
+ }
+ static async #ZW_‌_NJ(value) {
+ return await value;
+ }
+ static async #ZW_‍_J(value) {
+ return await value;
+ };
+ static async $(value) {
+ return await this.#$(value);
+ }
+ static async _(value) {
+ return await this.#_(value);
+ }
+ static async o(value) {
+ return await this.#o(value);
+ }
+ static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return await this.#℘(value);
+ }
+ static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return await this.#ZW_‌_NJ(value);
+ }
+ static async ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return await this.#ZW_‍_J(value);
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(C.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+Promise.all([
+ C.$(1),
+ C._(1),
+ C.o(1),
+ C.℘(1), // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.ZW_‌_NJ(1), // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.ZW_‍_J(1), // DO NOT CHANGE THE NAME OF THIS FIELD
+]).then(results => {
+
+ assert.sameValue(results[0], 1);
+ assert.sameValue(results[1], 1);
+ assert.sameValue(results[2], 1);
+ assert.sameValue(results[3], 1);
+ assert.sameValue(results[4], 1);
+ assert.sameValue(results[5], 1);
+
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-static-async-method-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-static-async-method-privatename-identifier.js
new file mode 100644
index 0000000000..ea24834124
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-static-async-method-privatename-identifier.js
@@ -0,0 +1,138 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-async-method-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-method.template
+/*---
+description: Valid Static AsyncMethod PrivateName (field definitions after a static method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ AsyncMethod
+
+ AsyncMethod :
+ async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static m() { return 42; } static async #$(value) {
+ return await value;
+ }
+ static async #_(value) {
+ return await value;
+ }
+ static async #\u{6F}(value) {
+ return await value;
+ }
+ static async #\u2118(value) {
+ return await value;
+ }
+ static async #ZW_\u200C_NJ(value) {
+ return await value;
+ }
+ static async #ZW_\u200D_J(value) {
+ return await value;
+ };
+ static async $(value) {
+ return await this.#$(value);
+ }
+ static async _(value) {
+ return await this.#_(value);
+ }
+ static async \u{6F}(value) {
+ return await this.#\u{6F}(value);
+ }
+ static async \u2118(value) {
+ return await this.#\u2118(value);
+ }
+ static async ZW_\u200C_NJ(value) {
+ return await this.#ZW_\u200C_NJ(value);
+ }
+ static async ZW_\u200D_J(value) {
+ return await this.#ZW_\u200D_J(value);
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(C.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+Promise.all([
+ C.$(1),
+ C._(1),
+ C.\u{6F}(1),
+ C.\u2118(1),
+ C.ZW_\u200C_NJ(1),
+ C.ZW_\u200D_J(1),
+]).then(results => {
+
+ assert.sameValue(results[0], 1);
+ assert.sameValue(results[1], 1);
+ assert.sameValue(results[2], 1);
+ assert.sameValue(results[3], 1);
+ assert.sameValue(results[4], 1);
+ assert.sameValue(results[5], 1);
+
+}).then($DONE, $DONE);
+
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-static-generator-method-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-static-generator-method-privatename-identifier-alt.js
new file mode 100644
index 0000000000..0c423cd562
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-static-generator-method-privatename-identifier-alt.js
@@ -0,0 +1,127 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-generator-method-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-method.template
+/*---
+description: Valid Static GeneratorMethod PrivateName (field definitions after a static method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ GeneratorMethod
+
+ GeneratorMethod :
+ * ClassElementName ( UniqueFormalParameters ){ GeneratorBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static m() { return 42; } static * #$(value) {
+ yield * value;
+ }
+ static * #_(value) {
+ yield * value;
+ }
+ static * #o(value) {
+ yield * value;
+ }
+ static * #℘(value) {
+ yield * value;
+ }
+ static * #ZW_‌_NJ(value) {
+ yield * value;
+ }
+ static * #ZW_‍_J(value) {
+ yield * value;
+ };
+ static get $() {
+ return this.#$;
+ }
+ static get _() {
+ return this.#_;
+ }
+ static get o() {
+ return this.#o;
+ }
+ static get ℘() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#℘;
+ }
+ static get ZW_‌_NJ() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‌_NJ;
+ }
+ static get ZW_‍_J() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‍_J;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(C.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$([1]).next().value, 1);
+assert.sameValue(C._([1]).next().value, 1);
+assert.sameValue(C.o([1]).next().value, 1);
+assert.sameValue(C.℘([1]).next().value, 1);
+assert.sameValue(C.ZW_‌_NJ([1]).next().value, 1);
+assert.sameValue(C.ZW_‍_J([1]).next().value, 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-static-generator-method-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-static-generator-method-privatename-identifier.js
new file mode 100644
index 0000000000..55f868c51e
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-static-generator-method-privatename-identifier.js
@@ -0,0 +1,128 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-generator-method-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-method.template
+/*---
+description: Valid Static GeneratorMethod PrivateName (field definitions after a static method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ GeneratorMethod
+
+ GeneratorMethod :
+ * ClassElementName ( UniqueFormalParameters ){ GeneratorBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static m() { return 42; } static * #$(value) {
+ yield * value;
+ }
+ static * #_(value) {
+ yield * value;
+ }
+ static * #\u{6F}(value) {
+ yield * value;
+ }
+ static * #\u2118(value) {
+ yield * value;
+ }
+ static * #ZW_\u200C_NJ(value) {
+ yield * value;
+ }
+ static * #ZW_\u200D_J(value) {
+ yield * value;
+ };
+ static get $() {
+ return this.#$;
+ }
+ static get _() {
+ return this.#_;
+ }
+ static get \u{6F}() {
+ return this.#\u{6F};
+ }
+ static get \u2118() {
+ return this.#\u2118;
+ }
+ static get ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ;
+ }
+ static get ZW_\u200D_J() {
+ return this.#ZW_\u200D_J;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(C.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$([1]).next().value, 1);
+assert.sameValue(C._([1]).next().value, 1);
+assert.sameValue(C.\u{6F}([1]).next().value, 1);
+assert.sameValue(C.\u2118([1]).next().value, 1);
+assert.sameValue(C.ZW_\u200C_NJ([1]).next().value, 1);
+assert.sameValue(C.ZW_\u200D_J([1]).next().value, 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-static-method-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-static-method-privatename-identifier-alt.js
new file mode 100644
index 0000000000..58462544d5
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-static-method-privatename-identifier-alt.js
@@ -0,0 +1,125 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-method-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-method.template
+/*---
+description: Valid Static Method PrivateName (field definitions after a static method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ ClassElementName ( UniqueFormalParameters ){ FunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static m() { return 42; } static #$(value) {
+ return value;
+ }
+ static #_(value) {
+ return value;
+ }
+ static #o(value) {
+ return value;
+ }
+ static #℘(value) {
+ return value;
+ }
+ static #ZW_‌_NJ(value) {
+ return value;
+ }
+ static #ZW_‍_J(value) {
+ return value;
+ };
+ static $(value) {
+ return this.#$(value);
+ }
+ static _(value) {
+ return this.#_(value);
+ }
+ static o(value) {
+ return this.#o(value);
+ }
+ static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#℘(value);
+ }
+ static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‌_NJ(value);
+ }
+ static ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‍_J(value);
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(C.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(1), 1);
+assert.sameValue(C._(1), 1);
+assert.sameValue(C.o(1), 1);
+assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+assert.sameValue(C.ZW_‌_NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+assert.sameValue(C.ZW_‍_J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-static-method-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-static-method-privatename-identifier.js
new file mode 100644
index 0000000000..a4995abb53
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-static-method-privatename-identifier.js
@@ -0,0 +1,125 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-method-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-method.template
+/*---
+description: Valid Static Method PrivateName (field definitions after a static method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ ClassElementName ( UniqueFormalParameters ){ FunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static m() { return 42; } static #$(value) {
+ return value;
+ }
+ static #_(value) {
+ return value;
+ }
+ static #\u{6F}(value) {
+ return value;
+ }
+ static #\u2118(value) {
+ return value;
+ }
+ static #ZW_\u200C_NJ(value) {
+ return value;
+ }
+ static #ZW_\u200D_J(value) {
+ return value;
+ };
+ static $(value) {
+ return this.#$(value);
+ }
+ static _(value) {
+ return this.#_(value);
+ }
+ static \u{6F}(value) {
+ return this.#\u{6F}(value);
+ }
+ static \u2118(value) {
+ return this.#\u2118(value);
+ }
+ static ZW_\u200C_NJ(value) {
+ return this.#ZW_\u200C_NJ(value);
+ }
+ static ZW_\u200D_J(value) {
+ return this.#ZW_\u200D_J(value);
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(C.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(1), 1);
+assert.sameValue(C._(1), 1);
+assert.sameValue(C.\u{6F}(1), 1);
+assert.sameValue(C.\u2118(1), 1);
+assert.sameValue(C.ZW_\u200C_NJ(1), 1);
+assert.sameValue(C.ZW_\u200D_J(1), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-static-privatename-identifier-alt-by-classname.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-static-privatename-identifier-alt-by-classname.js
new file mode 100644
index 0000000000..7d795f14a5
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-static-privatename-identifier-alt-by-classname.js
@@ -0,0 +1,113 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-alt-by-classname.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-method.template
+/*---
+description: Valid Static PrivateName (field definitions after a static method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static m() { return 42; } static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_‍_J;
+ static $(value) {
+ C.#$ = value;
+ return C.#$;
+ }
+ static _(value) {
+ C.#_ = value;
+ return C.#_;
+ }
+ static o(value) {
+ C.#\u{6F} = value;
+ return C.#\u{6F};
+ }
+ static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.#℘ = value;
+ return C.#℘;
+ }
+ static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.#ZW_‌_NJ = value;
+ return C.#ZW_‌_NJ;
+ }
+ static ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.#ZW_‍_J = value;
+ return C.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(C.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(1), 1);
+assert.sameValue(C._(1), 1);
+assert.sameValue(C.o(1), 1);
+assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+assert.sameValue(C.ZW_‌_NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+assert.sameValue(C.ZW_‍_J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-static-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-static-privatename-identifier-alt.js
new file mode 100644
index 0000000000..387692ab67
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-static-privatename-identifier-alt.js
@@ -0,0 +1,113 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-method.template
+/*---
+description: Valid Static PrivateName (field definitions after a static method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static m() { return 42; } static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_‍_J;
+ static $(value) {
+ this.#$ = value;
+ return this.#$;
+ }
+ static _(value) {
+ this.#_ = value;
+ return this.#_;
+ }
+ static o(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F};
+ }
+ static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ this.#℘ = value;
+ return this.#℘;
+ }
+ static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ this.#ZW_‌_NJ = value;
+ return this.#ZW_‌_NJ;
+ }
+ static ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ this.#ZW_‍_J = value;
+ return this.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(C.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(1), 1);
+assert.sameValue(C._(1), 1);
+assert.sameValue(C.o(1), 1);
+assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+assert.sameValue(C.ZW_‌_NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+assert.sameValue(C.ZW_‍_J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-static-privatename-identifier-by-classname.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-static-privatename-identifier-by-classname.js
new file mode 100644
index 0000000000..3a5862090b
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-static-privatename-identifier-by-classname.js
@@ -0,0 +1,113 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-by-classname.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-method.template
+/*---
+description: Valid Static PrivateName (field definitions after a static method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static m() { return 42; } static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J;
+ static $(value) {
+ C.#$ = value;
+ return C.#$;
+ }
+ static _(value) {
+ C.#_ = value;
+ return C.#_;
+ }
+ static \u{6F}(value) {
+ C.#\u{6F} = value;
+ return C.#\u{6F};
+ }
+ static \u2118(value) {
+ C.#\u2118 = value;
+ return C.#\u2118;
+ }
+ static ZW_\u200C_NJ(value) {
+ C.#ZW_\u200C_NJ = value;
+ return C.#ZW_\u200C_NJ;
+ }
+ static ZW_\u200D_J(value) {
+ C.#ZW_\u200D_J = value;
+ return C.#ZW_\u200D_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(C.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(1), 1);
+assert.sameValue(C._(1), 1);
+assert.sameValue(C.\u{6F}(1), 1);
+assert.sameValue(C.\u2118(1), 1);
+assert.sameValue(C.ZW_\u200C_NJ(1), 1);
+assert.sameValue(C.ZW_\u200D_J(1), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-static-privatename-identifier-initializer-alt-by-classname.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-static-privatename-identifier-initializer-alt-by-classname.js
new file mode 100644
index 0000000000..f028117c95
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-static-privatename-identifier-initializer-alt-by-classname.js
@@ -0,0 +1,107 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-initializer-alt-by-classname.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-method.template
+/*---
+description: Valid Static PrivateName (field definitions after a static method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static m() { return 42; } static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_‍_J = 1;
+ static $() {
+ return C.#$;
+ }
+ static _() {
+ return C.#_;
+ }
+ static \u{6F}() {
+ return C.#\u{6F};
+ }
+ static ℘() {
+ return C.#℘;
+ }
+ static ZW_‌_NJ() {
+ return C.#ZW_‌_NJ;
+ }
+ static ZW_‍_J() {
+ return C.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(C.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(), 1);
+assert.sameValue(C._(), 1);
+assert.sameValue(C.\u{6F}(), 1);
+assert.sameValue(C.℘(), 1);
+assert.sameValue(C.ZW_‌_NJ(), 1);
+assert.sameValue(C.ZW_‍_J(), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-static-privatename-identifier-initializer-alt.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-static-privatename-identifier-initializer-alt.js
new file mode 100644
index 0000000000..ac7380a810
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-static-privatename-identifier-initializer-alt.js
@@ -0,0 +1,107 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-initializer-alt.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-method.template
+/*---
+description: Valid Static PrivateName (field definitions after a static method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static m() { return 42; } static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_‍_J = 1;
+ static $() {
+ return this.#$;
+ }
+ static _() {
+ return this.#_;
+ }
+ static \u{6F}() {
+ return this.#\u{6F};
+ }
+ static ℘() {
+ return this.#℘;
+ }
+ static ZW_‌_NJ() {
+ return this.#ZW_‌_NJ;
+ }
+ static ZW_‍_J() {
+ return this.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(C.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(), 1);
+assert.sameValue(C._(), 1);
+assert.sameValue(C.\u{6F}(), 1);
+assert.sameValue(C.℘(), 1);
+assert.sameValue(C.ZW_‌_NJ(), 1);
+assert.sameValue(C.ZW_‍_J(), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-static-privatename-identifier-initializer.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-static-privatename-identifier-initializer.js
new file mode 100644
index 0000000000..ad3e002644
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-static-privatename-identifier-initializer.js
@@ -0,0 +1,107 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-initializer.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-method.template
+/*---
+description: Valid Static PrivateName (field definitions after a static method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static m() { return 42; } static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #\u2118 = 1; static #ZW_\u200C_NJ = 1; static #ZW_\u200D_J = 1;
+ static $() {
+ return this.#$;
+ }
+ static _() {
+ return this.#_;
+ }
+ static \u{6F}() {
+ return this.#\u{6F};
+ }
+ static \u2118() {
+ return this.#\u2118;
+ }
+ static ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ;
+ }
+ static ZW_\u200D_J() {
+ return this.#ZW_\u200D_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(C.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(), 1);
+assert.sameValue(C._(), 1);
+assert.sameValue(C.\u{6F}(), 1);
+assert.sameValue(C.\u2118(), 1);
+assert.sameValue(C.ZW_\u200C_NJ(), 1);
+assert.sameValue(C.ZW_\u200D_J(), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-static-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-static-privatename-identifier.js
new file mode 100644
index 0000000000..86a3bbe364
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-rs-static-privatename-identifier.js
@@ -0,0 +1,113 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-method.template
+/*---
+description: Valid Static PrivateName (field definitions after a static method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static m() { return 42; } static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J;
+ static $(value) {
+ this.#$ = value;
+ return this.#$;
+ }
+ static _(value) {
+ this.#_ = value;
+ return this.#_;
+ }
+ static \u{6F}(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F};
+ }
+ static \u2118(value) {
+ this.#\u2118 = value;
+ return this.#\u2118;
+ }
+ static ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ = value;
+ return this.#ZW_\u200C_NJ;
+ }
+ static ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J = value;
+ return this.#ZW_\u200D_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(C.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(1), 1);
+assert.sameValue(C._(1), 1);
+assert.sameValue(C.\u{6F}(1), 1);
+assert.sameValue(C.\u2118(1), 1);
+assert.sameValue(C.ZW_\u200C_NJ(1), 1);
+assert.sameValue(C.ZW_\u200D_J(1), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-static-private-fields.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-static-private-fields.js
new file mode 100644
index 0000000000..e20e5ac17e
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-static-private-fields.js
@@ -0,0 +1,74 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/static-private-fields.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-method.template
+/*---
+description: static private fields (field definitions after a static method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ static FieldDefinition ;
+
+ FieldDefinition :
+ ClassElementName Initializer_opt
+
+ ClassElementName :
+ PrivateName
+
+ PrivateName :
+ # IdentifierName
+
+---*/
+
+
+class C {
+ static m() { return 42; } static #x; static #y;
+ static x() {
+ this.#x = 42;
+ return this.#x;
+ }
+ static y() {
+ this.#y = 43;
+ return this.#y;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(C.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+// Test the private fields do not appear as properties before set to value
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#x"), "test 1");
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 2");
+assert(!Object.prototype.hasOwnProperty.call(c, "#x"), "test 3");
+
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#y"), "test 4");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 5");
+assert(!Object.prototype.hasOwnProperty.call(c, "#y"), "test 6");
+
+// Test if private fields can be sucessfully accessed and set to value
+assert.sameValue(C.x(), 42, "test 7");
+assert.sameValue(C.y(), 43, "test 8");
+
+// Test the private fields do not appear as properties before after set to value
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 9");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 10");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-static-private-methods-with-fields.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-static-private-methods-with-fields.js
new file mode 100644
index 0000000000..aa6489c492
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-static-private-methods-with-fields.js
@@ -0,0 +1,91 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/static-private-methods-with-fields.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-method.template
+/*---
+description: static private methods with fields (field definitions after a static method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class-static-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ static FieldDefinition ;
+
+ FieldDefinition :
+ ClassElementName Initializer_opt
+
+ ClassElementName :
+ PrivateName
+
+ PrivateName :
+ # IdentifierName
+
+---*/
+
+
+class C {
+ static m() { return 42; } static #xVal; static #yVal;
+ static #x(value) {
+ this.#xVal = value;
+ return this.#xVal;
+ }
+ static #y(value) {
+ this.#yVal = value;
+ return this.#yVal;
+ }
+ static x() {
+ return this.#x(42);
+ }
+ static y() {
+ return this.#y(43);
+ }
+}
+
+var c = new C();
+
+assert.sameValue(C.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+// Test the private methods do not appear as properties before set to value
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#x"), "test 1");
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 2");
+assert(!Object.prototype.hasOwnProperty.call(c, "#x"), "test 3");
+
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#y"), "test 4");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 5");
+assert(!Object.prototype.hasOwnProperty.call(c, "#y"), "test 6");
+
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#xVal"), "test 7");
+assert(!Object.prototype.hasOwnProperty.call(C, "#xVal"), "test 8");
+assert(!Object.prototype.hasOwnProperty.call(c, "#xVal"), "test 9");
+
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#yVal"), "test 10");
+assert(!Object.prototype.hasOwnProperty.call(C, "#yVal"), "test 11");
+assert(!Object.prototype.hasOwnProperty.call(c, "#yVal"), "test 12");
+
+// Test if private fields can be sucessfully accessed and set to value
+assert.sameValue(C.x(), 42, "test 13");
+assert.sameValue(C.y(), 43, "test 14");
+
+// Test the private fields do not appear as properties before after set to value
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 15");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 16");
+
+assert(!Object.prototype.hasOwnProperty.call(C, "#xVal"), "test 17");
+assert(!Object.prototype.hasOwnProperty.call(C, "#yVal"), "test 18");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-static-private-methods.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-static-private-methods.js
new file mode 100644
index 0000000000..8ab59dab0c
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-static-private-methods.js
@@ -0,0 +1,78 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/static-private-methods.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-method.template
+/*---
+description: static private methods (field definitions after a static method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ static FieldDefinition ;
+
+ FieldDefinition :
+ ClassElementName Initializer_opt
+
+ ClassElementName :
+ PrivateName
+
+ PrivateName :
+ # IdentifierName
+
+---*/
+
+
+class C {
+ static m() { return 42; } ;
+ static #x(value) {
+ return value / 2;
+ }
+ static #y(value) {
+ return value * 2;
+ }
+ static x() {
+ return this.#x(84);
+ }
+ static y() {
+ return this.#y(43);
+ }
+}
+
+var c = new C();
+
+assert.sameValue(C.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+// Test the private methods do not appear as properties before set to value
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#x"), "test 1");
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 2");
+assert(!Object.prototype.hasOwnProperty.call(c, "#x"), "test 3");
+
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#y"), "test 4");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 5");
+assert(!Object.prototype.hasOwnProperty.call(c, "#y"), "test 6");
+
+// Test if private fields can be sucessfully accessed and set to value
+assert.sameValue(C.x(), 42, "test 7");
+assert.sameValue(C.y(), 86, "test 8");
+
+// Test the private fields do not appear as properties before after set to value
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 9");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 10");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-string-literal-names.js b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-string-literal-names.js
new file mode 100644
index 0000000000..a022473b03
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/after-same-line-static-method-string-literal-names.js
@@ -0,0 +1,112 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/string-literal-names.case
+// - src/class-elements/productions/cls-decl-after-same-line-static-method.template
+/*---
+description: String literal names (field definitions after a static method in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-public, class]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement:
+ ...
+ FieldDefinition ;
+
+ FieldDefinition:
+ ClassElementName Initializer_opt
+
+ ClassElementName:
+ PropertyName
+
+---*/
+
+
+class C {
+ static m() { return 42; } 'a'; "b"; 'c' = 39;
+ "d" = 42;
+
+}
+
+var c = new C();
+
+assert.sameValue(C.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
+ "m doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(C, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "a"),
+ "a does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "a"),
+ "a does not appear as an own property on C constructor"
+);
+
+verifyProperty(c, "a", {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "b"),
+ "b does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "b"),
+ "b does not appear as an own property on C constructor"
+);
+
+verifyProperty(c, "b", {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "c"),
+ "c does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "c"),
+ "c does not appear as an own property on C constructor"
+);
+
+verifyProperty(c, "c", {
+ value: 39,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "d"),
+ "d does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "d"),
+ "d does not appear as an own property on C constructor"
+);
+
+verifyProperty(c, "d", {
+ value: 42,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/arrow-body-derived-cls-direct-eval-contains-superproperty-1.js b/js/src/tests/test262/language/statements/class/elements/arrow-body-derived-cls-direct-eval-contains-superproperty-1.js
new file mode 100644
index 0000000000..93c84e4144
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/arrow-body-derived-cls-direct-eval-contains-superproperty-1.js
@@ -0,0 +1,36 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/eval-contains-superproperty-1.case
+// - src/class-elements/initializer-eval-super-property/cls-decl-fields-eval-arrow-body.template
+/*---
+description: super.x in StatementList of eval (direct eval)
+esid: sec-performeval-rules-in-initializer
+features: [class, class-fields-public]
+flags: [generated]
+info: |
+ Additional Early Error Rules for Eval Inside Initializer
+ These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer.
+ ScriptBody : StatementList
+
+ ...
+ The remaining eval rules apply as outside a constructor, inside a method, and inside a function.
+
+ Additional Early Error Rules for Eval Outside Methods
+ These static semantics are applied by PerformEval when a direct eval call occurs outside of a MethodDefinition.
+ ScriptBody : StatementList
+
+ It is a Syntax Error if StatementList Contains SuperProperty.
+
+---*/
+
+
+var executed = false;
+class A {}
+class C extends A {
+ x = eval('executed = true; () => super.x;');
+}
+
+new C().x();
+
+assert.sameValue(executed, true);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/arrow-body-derived-cls-direct-eval-contains-superproperty-2.js b/js/src/tests/test262/language/statements/class/elements/arrow-body-derived-cls-direct-eval-contains-superproperty-2.js
new file mode 100644
index 0000000000..a228bda128
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/arrow-body-derived-cls-direct-eval-contains-superproperty-2.js
@@ -0,0 +1,33 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/eval-contains-superproperty-2.case
+// - src/class-elements/initializer-eval-super-property/cls-decl-fields-eval-arrow-body.template
+/*---
+description: super['x'] in StatementList of eval (direct eval)
+esid: sec-performeval-rules-in-initializer
+features: [class, class-fields-public]
+flags: [generated]
+info: |
+ The remaining eval rules apply as outside a constructor, inside a method, and inside a function.
+
+ Additional Early Error Rules for Eval Outside Methods
+
+ These static semantics are applied by PerformEval when a direct eval call occurs outside of a MethodDefinition.
+
+ ScriptBody : StatementList
+
+ It is a Syntax Error if StatementList Contains SuperProperty.
+
+---*/
+
+
+var executed = false;
+class A {}
+class C extends A {
+ x = eval('executed = true; () => super["x"];');
+}
+
+new C().x();
+
+assert.sameValue(executed, true);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/arrow-body-derived-cls-direct-eval-err-contains-supercall-1.js b/js/src/tests/test262/language/statements/class/elements/arrow-body-derived-cls-direct-eval-err-contains-supercall-1.js
new file mode 100644
index 0000000000..1cc1113d38
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/arrow-body-derived-cls-direct-eval-err-contains-supercall-1.js
@@ -0,0 +1,38 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/eval-err-contains-supercall-1.case
+// - src/class-elements/initializer-eval-super-call/cls-decl-fields-eval-arrow-body.template
+/*---
+description: error if `super()['x']` in StatementList of eval (direct eval)
+esid: sec-performeval-rules-in-initializer
+features: [class, class-fields-public]
+flags: [generated]
+info: |
+ Additional Early Error Rules for Eval Inside Initializer
+ These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer.
+ ScriptBody : StatementList
+
+ ...
+ The remaining eval rules apply as outside a constructor, inside a method, and inside a function.
+
+ Additional Early Error Rules for Eval Outside Constructor Methods
+ These static semantics are applied by PerformEval when a direct eval call occurs outside of the constructor method of a ClassDeclaration or ClassExpression.
+ ScriptBody : StatementList
+
+ It is a Syntax Error if StatementList Contains SuperCall.
+
+---*/
+
+
+var executed = false;
+class A {}
+class C extends A {
+ x = eval('executed = true; () => super()["x"];');
+}
+
+assert.throws(SyntaxError, function() {
+ new C().x();
+});
+
+assert.sameValue(executed, false);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/arrow-body-derived-cls-direct-eval-err-contains-supercall-2.js b/js/src/tests/test262/language/statements/class/elements/arrow-body-derived-cls-direct-eval-err-contains-supercall-2.js
new file mode 100644
index 0000000000..a43bf96f7a
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/arrow-body-derived-cls-direct-eval-err-contains-supercall-2.js
@@ -0,0 +1,31 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/eval-err-contains-supercall-2.case
+// - src/class-elements/initializer-eval-super-call/cls-decl-fields-eval-arrow-body.template
+/*---
+description: error if `super().x` in StatementList of eval (direct eval)
+esid: sec-performeval-rules-in-initializer
+features: [class, class-fields-public]
+flags: [generated]
+info: |
+ Additional Early Error Rules for Eval Outside Constructor Methods
+ These static semantics are applied by PerformEval when a direct eval call occurs outside of the constructor method of a ClassDeclaration or ClassExpression.
+ ScriptBody : StatementList
+
+ It is a Syntax Error if StatementList Contains SuperCall.
+
+---*/
+
+
+var executed = false;
+class A {}
+class C extends A {
+ x = eval('executed = true; () => super().x;');
+}
+
+assert.throws(SyntaxError, function() {
+ new C().x();
+});
+
+assert.sameValue(executed, false);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/arrow-body-derived-cls-direct-eval-err-contains-supercall.js b/js/src/tests/test262/language/statements/class/elements/arrow-body-derived-cls-direct-eval-err-contains-supercall.js
new file mode 100644
index 0000000000..d0eba15d3f
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/arrow-body-derived-cls-direct-eval-err-contains-supercall.js
@@ -0,0 +1,38 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/eval-err-contains-supercall.case
+// - src/class-elements/initializer-eval-super-call/cls-decl-fields-eval-arrow-body.template
+/*---
+description: error if `super()` in StatementList of eval (direct eval)
+esid: sec-performeval-rules-in-initializer
+features: [class, class-fields-public]
+flags: [generated]
+info: |
+ Additional Early Error Rules for Eval Inside Initializer
+ These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer.
+ ScriptBody : StatementList
+
+ ...
+ The remaining eval rules apply as outside a constructor, inside a method, and inside a function.
+
+ Additional Early Error Rules for Eval Outside Constructor Methods
+ These static semantics are applied by PerformEval when a direct eval call occurs outside of the constructor method of a ClassDeclaration or ClassExpression.
+ ScriptBody : StatementList
+
+ It is a Syntax Error if StatementList Contains SuperCall.
+
+---*/
+
+
+var executed = false;
+class A {}
+class C extends A {
+ x = eval('executed = true; () => super();');
+}
+
+assert.throws(SyntaxError, function() {
+ new C().x();
+});
+
+assert.sameValue(executed, false);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/arrow-body-derived-cls-indirect-eval-contains-superproperty-1.js b/js/src/tests/test262/language/statements/class/elements/arrow-body-derived-cls-indirect-eval-contains-superproperty-1.js
new file mode 100644
index 0000000000..76e3354f61
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/arrow-body-derived-cls-indirect-eval-contains-superproperty-1.js
@@ -0,0 +1,36 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/eval-contains-superproperty-1.case
+// - src/class-elements/initializer-eval-super-property/cls-decl-fields-indirect-eval-arrow-body.template
+/*---
+description: super.x in StatementList of eval (indirect eval)
+esid: sec-performeval-rules-in-initializer
+features: [class, class-fields-public]
+flags: [generated]
+info: |
+ Additional Early Error Rules for Eval Inside Initializer
+ These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer.
+ ScriptBody : StatementList
+
+ ...
+ The remaining eval rules apply as outside a constructor, inside a method, and inside a function.
+
+ Additional Early Error Rules for Eval Outside Methods
+ These static semantics are applied by PerformEval when a direct eval call occurs outside of a MethodDefinition.
+ ScriptBody : StatementList
+
+ It is a Syntax Error if StatementList Contains SuperProperty.
+
+---*/
+
+
+class A {}
+class C extends A {
+ x = (0, eval)('() => super.x;');
+}
+
+assert.throws(SyntaxError, function() {
+ new C().x();
+});
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/arrow-body-derived-cls-indirect-eval-contains-superproperty-2.js b/js/src/tests/test262/language/statements/class/elements/arrow-body-derived-cls-indirect-eval-contains-superproperty-2.js
new file mode 100644
index 0000000000..4c636fac01
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/arrow-body-derived-cls-indirect-eval-contains-superproperty-2.js
@@ -0,0 +1,33 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/eval-contains-superproperty-2.case
+// - src/class-elements/initializer-eval-super-property/cls-decl-fields-indirect-eval-arrow-body.template
+/*---
+description: super['x'] in StatementList of eval (indirect eval)
+esid: sec-performeval-rules-in-initializer
+features: [class, class-fields-public]
+flags: [generated]
+info: |
+ The remaining eval rules apply as outside a constructor, inside a method, and inside a function.
+
+ Additional Early Error Rules for Eval Outside Methods
+
+ These static semantics are applied by PerformEval when a direct eval call occurs outside of a MethodDefinition.
+
+ ScriptBody : StatementList
+
+ It is a Syntax Error if StatementList Contains SuperProperty.
+
+---*/
+
+
+class A {}
+class C extends A {
+ x = (0, eval)('() => super["x"];');
+}
+
+assert.throws(SyntaxError, function() {
+ new C().x();
+});
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/arrow-body-derived-cls-indirect-eval-err-contains-supercall-1.js b/js/src/tests/test262/language/statements/class/elements/arrow-body-derived-cls-indirect-eval-err-contains-supercall-1.js
new file mode 100644
index 0000000000..d18d96841d
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/arrow-body-derived-cls-indirect-eval-err-contains-supercall-1.js
@@ -0,0 +1,36 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/eval-err-contains-supercall-1.case
+// - src/class-elements/initializer-eval-super-call/cls-decl-fields-indirect-eval-arrow-body.template
+/*---
+description: error if `super()['x']` in StatementList of eval (indirect eval)
+esid: sec-performeval-rules-in-initializer
+features: [class, class-fields-public]
+flags: [generated]
+info: |
+ Additional Early Error Rules for Eval Inside Initializer
+ These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer.
+ ScriptBody : StatementList
+
+ ...
+ The remaining eval rules apply as outside a constructor, inside a method, and inside a function.
+
+ Additional Early Error Rules for Eval Outside Constructor Methods
+ These static semantics are applied by PerformEval when a direct eval call occurs outside of the constructor method of a ClassDeclaration or ClassExpression.
+ ScriptBody : StatementList
+
+ It is a Syntax Error if StatementList Contains SuperCall.
+
+---*/
+
+
+class A {}
+class C extends A {
+ x = (0, eval)('() => super()["x"];');
+}
+
+assert.throws(SyntaxError, function() {
+ new C().x();
+});
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/arrow-body-derived-cls-indirect-eval-err-contains-supercall-2.js b/js/src/tests/test262/language/statements/class/elements/arrow-body-derived-cls-indirect-eval-err-contains-supercall-2.js
new file mode 100644
index 0000000000..a8e100c4f3
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/arrow-body-derived-cls-indirect-eval-err-contains-supercall-2.js
@@ -0,0 +1,29 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/eval-err-contains-supercall-2.case
+// - src/class-elements/initializer-eval-super-call/cls-decl-fields-indirect-eval-arrow-body.template
+/*---
+description: error if `super().x` in StatementList of eval (indirect eval)
+esid: sec-performeval-rules-in-initializer
+features: [class, class-fields-public]
+flags: [generated]
+info: |
+ Additional Early Error Rules for Eval Outside Constructor Methods
+ These static semantics are applied by PerformEval when a direct eval call occurs outside of the constructor method of a ClassDeclaration or ClassExpression.
+ ScriptBody : StatementList
+
+ It is a Syntax Error if StatementList Contains SuperCall.
+
+---*/
+
+
+class A {}
+class C extends A {
+ x = (0, eval)('() => super().x;');
+}
+
+assert.throws(SyntaxError, function() {
+ new C().x();
+});
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/arrow-body-derived-cls-indirect-eval-err-contains-supercall.js b/js/src/tests/test262/language/statements/class/elements/arrow-body-derived-cls-indirect-eval-err-contains-supercall.js
new file mode 100644
index 0000000000..4c03c94360
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/arrow-body-derived-cls-indirect-eval-err-contains-supercall.js
@@ -0,0 +1,36 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/eval-err-contains-supercall.case
+// - src/class-elements/initializer-eval-super-call/cls-decl-fields-indirect-eval-arrow-body.template
+/*---
+description: error if `super()` in StatementList of eval (indirect eval)
+esid: sec-performeval-rules-in-initializer
+features: [class, class-fields-public]
+flags: [generated]
+info: |
+ Additional Early Error Rules for Eval Inside Initializer
+ These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer.
+ ScriptBody : StatementList
+
+ ...
+ The remaining eval rules apply as outside a constructor, inside a method, and inside a function.
+
+ Additional Early Error Rules for Eval Outside Constructor Methods
+ These static semantics are applied by PerformEval when a direct eval call occurs outside of the constructor method of a ClassDeclaration or ClassExpression.
+ ScriptBody : StatementList
+
+ It is a Syntax Error if StatementList Contains SuperCall.
+
+---*/
+
+
+class A {}
+class C extends A {
+ x = (0, eval)('() => super();');
+}
+
+assert.throws(SyntaxError, function() {
+ new C().x();
+});
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/arrow-body-direct-eval-err-contains-arguments.js b/js/src/tests/test262/language/statements/class/elements/arrow-body-direct-eval-err-contains-arguments.js
new file mode 100644
index 0000000000..93e5ecfc53
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/arrow-body-direct-eval-err-contains-arguments.js
@@ -0,0 +1,38 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/eval-err-contains-arguments.case
+// - src/class-elements/initializer-direct-eval-arguments/cls-decl-fields-eval-arrow-body.template
+/*---
+description: error if `arguments` in StatementList of eval (direct eval)
+esid: sec-performeval-rules-in-initializer
+features: [class, class-fields-public]
+flags: [generated]
+info: |
+ Additional Early Error Rules for Eval Inside Initializer
+ These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer.
+ ScriptBody : StatementList
+
+ It is a Syntax Error if ContainsArguments of StatementList is true.
+ ...
+
+ Static Semantics: ContainsArguments
+ IdentifierReference : Identifier
+
+ 1. If the StringValue of Identifier is "arguments", return true.
+ ...
+ For all other grammatical productions, recurse on all nonterminals. If any piece returns true, then return true. Otherwise return false.
+
+---*/
+
+
+var executed = false;
+class C {
+ x = eval('executed = true; () => arguments;');
+}
+
+assert.throws(SyntaxError, function() {
+ new C().x();
+});
+
+assert.sameValue(executed, false);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/arrow-body-direct-eval-err-contains-newtarget.js b/js/src/tests/test262/language/statements/class/elements/arrow-body-direct-eval-err-contains-newtarget.js
new file mode 100644
index 0000000000..f8195d0139
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/arrow-body-direct-eval-err-contains-newtarget.js
@@ -0,0 +1,36 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/eval-err-contains-newtarget.case
+// - src/class-elements/initializer-eval-newtarget/cls-decl-fields-eval-arrow-body.template
+/*---
+description: error if `new.target` in StatementList of eval (direct eval)
+esid: sec-performeval-rules-in-initializer
+features: [class, new.target, class-fields-public]
+flags: [generated]
+info: |
+ Additional Early Error Rules for Eval Inside Initializer
+ These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer.
+ ScriptBody : StatementList
+
+ ...
+ The remaining eval rules apply as outside a constructor, inside a method, and inside a function.
+
+ Additional Early Error Rules for Eval Outside Functions
+ These static semantics are applied by PerformEval when a direct eval call occurs outside of any function.
+ ScriptBody : StatementList
+
+ It is a Syntax Error if StatementList Contains NewTarget.
+
+---*/
+
+
+var executed = false;
+class C {
+ x = eval('executed = true; () => new.target;');
+}
+
+var c = new C();
+
+assert.sameValue(executed, true);
+assert.sameValue(c.x(), undefined);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/arrow-body-indirect-eval-err-contains-newtarget.js b/js/src/tests/test262/language/statements/class/elements/arrow-body-indirect-eval-err-contains-newtarget.js
new file mode 100644
index 0000000000..c41a3ac458
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/arrow-body-indirect-eval-err-contains-newtarget.js
@@ -0,0 +1,35 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/eval-err-contains-newtarget.case
+// - src/class-elements/initializer-eval-newtarget/cls-decl-fields-indirect-eval-arrow-body.template
+/*---
+description: error if `new.target` in StatementList of eval (indirect eval)
+esid: sec-performeval-rules-in-initializer
+features: [class, new.target, class-fields-public]
+flags: [generated]
+info: |
+ Additional Early Error Rules for Eval Inside Initializer
+ These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer.
+ ScriptBody : StatementList
+
+ ...
+ The remaining eval rules apply as outside a constructor, inside a method, and inside a function.
+
+ Additional Early Error Rules for Eval Outside Functions
+ These static semantics are applied by PerformEval when a direct eval call occurs outside of any function.
+ ScriptBody : StatementList
+
+ It is a Syntax Error if StatementList Contains NewTarget.
+
+---*/
+
+
+class C {
+ x = (0, eval)('() => new.target;');
+}
+
+assert.throws(SyntaxError, function() {
+ new C().x();
+});
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/arrow-body-private-derived-cls-direct-eval-contains-superproperty-1.js b/js/src/tests/test262/language/statements/class/elements/arrow-body-private-derived-cls-direct-eval-contains-superproperty-1.js
new file mode 100644
index 0000000000..aafbecc24a
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/arrow-body-private-derived-cls-direct-eval-contains-superproperty-1.js
@@ -0,0 +1,39 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/eval-contains-superproperty-1.case
+// - src/class-elements/initializer-eval-super-property/cls-decl-private-fields-eval-arrow-body.template
+/*---
+description: super.x in StatementList of eval (direct eval)
+esid: sec-performeval-rules-in-initializer
+features: [class, class-fields-public, class-fields-private]
+flags: [generated]
+info: |
+ Additional Early Error Rules for Eval Inside Initializer
+ These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer.
+ ScriptBody : StatementList
+
+ ...
+ The remaining eval rules apply as outside a constructor, inside a method, and inside a function.
+
+ Additional Early Error Rules for Eval Outside Methods
+ These static semantics are applied by PerformEval when a direct eval call occurs outside of a MethodDefinition.
+ ScriptBody : StatementList
+
+ It is a Syntax Error if StatementList Contains SuperProperty.
+
+---*/
+
+
+var executed = false;
+class A {}
+class C extends A {
+ #x = eval('executed = true; () => super.x;');
+ x() {
+ this.#x();
+ }
+}
+
+new C().x();
+
+assert.sameValue(executed, true);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/arrow-body-private-derived-cls-direct-eval-contains-superproperty-2.js b/js/src/tests/test262/language/statements/class/elements/arrow-body-private-derived-cls-direct-eval-contains-superproperty-2.js
new file mode 100644
index 0000000000..7973af8125
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/arrow-body-private-derived-cls-direct-eval-contains-superproperty-2.js
@@ -0,0 +1,36 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/eval-contains-superproperty-2.case
+// - src/class-elements/initializer-eval-super-property/cls-decl-private-fields-eval-arrow-body.template
+/*---
+description: super['x'] in StatementList of eval (direct eval)
+esid: sec-performeval-rules-in-initializer
+features: [class, class-fields-public, class-fields-private]
+flags: [generated]
+info: |
+ The remaining eval rules apply as outside a constructor, inside a method, and inside a function.
+
+ Additional Early Error Rules for Eval Outside Methods
+
+ These static semantics are applied by PerformEval when a direct eval call occurs outside of a MethodDefinition.
+
+ ScriptBody : StatementList
+
+ It is a Syntax Error if StatementList Contains SuperProperty.
+
+---*/
+
+
+var executed = false;
+class A {}
+class C extends A {
+ #x = eval('executed = true; () => super["x"];');
+ x() {
+ this.#x();
+ }
+}
+
+new C().x();
+
+assert.sameValue(executed, true);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/arrow-body-private-derived-cls-direct-eval-err-contains-supercall-1.js b/js/src/tests/test262/language/statements/class/elements/arrow-body-private-derived-cls-direct-eval-err-contains-supercall-1.js
new file mode 100644
index 0000000000..21281940b3
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/arrow-body-private-derived-cls-direct-eval-err-contains-supercall-1.js
@@ -0,0 +1,38 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/eval-err-contains-supercall-1.case
+// - src/class-elements/initializer-eval-super-call/cls-decl-private-fields-eval-arrow-body.template
+/*---
+description: error if `super()['x']` in StatementList of eval (direct eval)
+esid: sec-performeval-rules-in-initializer
+features: [class, class-fields-public, class-fields-private]
+flags: [generated]
+info: |
+ Additional Early Error Rules for Eval Inside Initializer
+ These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer.
+ ScriptBody : StatementList
+
+ ...
+ The remaining eval rules apply as outside a constructor, inside a method, and inside a function.
+
+ Additional Early Error Rules for Eval Outside Constructor Methods
+ These static semantics are applied by PerformEval when a direct eval call occurs outside of the constructor method of a ClassDeclaration or ClassExpression.
+ ScriptBody : StatementList
+
+ It is a Syntax Error if StatementList Contains SuperCall.
+
+---*/
+
+
+var executed = false;
+class A {}
+class C extends A {
+ #x = eval('executed = true; () => super()["x"];');
+}
+
+assert.throws(SyntaxError, function() {
+ new C().x();
+});
+
+assert.sameValue(executed, false);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/arrow-body-private-derived-cls-direct-eval-err-contains-supercall-2.js b/js/src/tests/test262/language/statements/class/elements/arrow-body-private-derived-cls-direct-eval-err-contains-supercall-2.js
new file mode 100644
index 0000000000..154041c503
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/arrow-body-private-derived-cls-direct-eval-err-contains-supercall-2.js
@@ -0,0 +1,31 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/eval-err-contains-supercall-2.case
+// - src/class-elements/initializer-eval-super-call/cls-decl-private-fields-eval-arrow-body.template
+/*---
+description: error if `super().x` in StatementList of eval (direct eval)
+esid: sec-performeval-rules-in-initializer
+features: [class, class-fields-public, class-fields-private]
+flags: [generated]
+info: |
+ Additional Early Error Rules for Eval Outside Constructor Methods
+ These static semantics are applied by PerformEval when a direct eval call occurs outside of the constructor method of a ClassDeclaration or ClassExpression.
+ ScriptBody : StatementList
+
+ It is a Syntax Error if StatementList Contains SuperCall.
+
+---*/
+
+
+var executed = false;
+class A {}
+class C extends A {
+ #x = eval('executed = true; () => super().x;');
+}
+
+assert.throws(SyntaxError, function() {
+ new C().x();
+});
+
+assert.sameValue(executed, false);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/arrow-body-private-derived-cls-direct-eval-err-contains-supercall.js b/js/src/tests/test262/language/statements/class/elements/arrow-body-private-derived-cls-direct-eval-err-contains-supercall.js
new file mode 100644
index 0000000000..df7a681804
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/arrow-body-private-derived-cls-direct-eval-err-contains-supercall.js
@@ -0,0 +1,38 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/eval-err-contains-supercall.case
+// - src/class-elements/initializer-eval-super-call/cls-decl-private-fields-eval-arrow-body.template
+/*---
+description: error if `super()` in StatementList of eval (direct eval)
+esid: sec-performeval-rules-in-initializer
+features: [class, class-fields-public, class-fields-private]
+flags: [generated]
+info: |
+ Additional Early Error Rules for Eval Inside Initializer
+ These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer.
+ ScriptBody : StatementList
+
+ ...
+ The remaining eval rules apply as outside a constructor, inside a method, and inside a function.
+
+ Additional Early Error Rules for Eval Outside Constructor Methods
+ These static semantics are applied by PerformEval when a direct eval call occurs outside of the constructor method of a ClassDeclaration or ClassExpression.
+ ScriptBody : StatementList
+
+ It is a Syntax Error if StatementList Contains SuperCall.
+
+---*/
+
+
+var executed = false;
+class A {}
+class C extends A {
+ #x = eval('executed = true; () => super();');
+}
+
+assert.throws(SyntaxError, function() {
+ new C().x();
+});
+
+assert.sameValue(executed, false);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/arrow-body-private-derived-cls-indirect-eval-contains-superproperty-1.js b/js/src/tests/test262/language/statements/class/elements/arrow-body-private-derived-cls-indirect-eval-contains-superproperty-1.js
new file mode 100644
index 0000000000..407e470762
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/arrow-body-private-derived-cls-indirect-eval-contains-superproperty-1.js
@@ -0,0 +1,36 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/eval-contains-superproperty-1.case
+// - src/class-elements/initializer-eval-super-property/cls-decl-private-fields-indirect-eval-arrow-body.template
+/*---
+description: super.x in StatementList of eval (indirect eval)
+esid: sec-performeval-rules-in-initializer
+features: [class, class-fields-public, class-fields-private]
+flags: [generated]
+info: |
+ Additional Early Error Rules for Eval Inside Initializer
+ These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer.
+ ScriptBody : StatementList
+
+ ...
+ The remaining eval rules apply as outside a constructor, inside a method, and inside a function.
+
+ Additional Early Error Rules for Eval Outside Methods
+ These static semantics are applied by PerformEval when a direct eval call occurs outside of a MethodDefinition.
+ ScriptBody : StatementList
+
+ It is a Syntax Error if StatementList Contains SuperProperty.
+
+---*/
+
+
+class A {}
+class C extends A {
+ #x = (0, eval)('() => super.x;');
+}
+
+assert.throws(SyntaxError, function() {
+ new C().x();
+});
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/arrow-body-private-derived-cls-indirect-eval-contains-superproperty-2.js b/js/src/tests/test262/language/statements/class/elements/arrow-body-private-derived-cls-indirect-eval-contains-superproperty-2.js
new file mode 100644
index 0000000000..19ace0c9d3
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/arrow-body-private-derived-cls-indirect-eval-contains-superproperty-2.js
@@ -0,0 +1,33 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/eval-contains-superproperty-2.case
+// - src/class-elements/initializer-eval-super-property/cls-decl-private-fields-indirect-eval-arrow-body.template
+/*---
+description: super['x'] in StatementList of eval (indirect eval)
+esid: sec-performeval-rules-in-initializer
+features: [class, class-fields-public, class-fields-private]
+flags: [generated]
+info: |
+ The remaining eval rules apply as outside a constructor, inside a method, and inside a function.
+
+ Additional Early Error Rules for Eval Outside Methods
+
+ These static semantics are applied by PerformEval when a direct eval call occurs outside of a MethodDefinition.
+
+ ScriptBody : StatementList
+
+ It is a Syntax Error if StatementList Contains SuperProperty.
+
+---*/
+
+
+class A {}
+class C extends A {
+ #x = (0, eval)('() => super["x"];');
+}
+
+assert.throws(SyntaxError, function() {
+ new C().x();
+});
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/arrow-body-private-derived-cls-indirect-eval-err-contains-supercall-1.js b/js/src/tests/test262/language/statements/class/elements/arrow-body-private-derived-cls-indirect-eval-err-contains-supercall-1.js
new file mode 100644
index 0000000000..c36853216f
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/arrow-body-private-derived-cls-indirect-eval-err-contains-supercall-1.js
@@ -0,0 +1,36 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/eval-err-contains-supercall-1.case
+// - src/class-elements/initializer-eval-super-call/cls-decl-private-fields-indirect-eval-arrow-body.template
+/*---
+description: error if `super()['x']` in StatementList of eval (indirect eval)
+esid: sec-performeval-rules-in-initializer
+features: [class, class-fields-public, class-fields-private]
+flags: [generated]
+info: |
+ Additional Early Error Rules for Eval Inside Initializer
+ These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer.
+ ScriptBody : StatementList
+
+ ...
+ The remaining eval rules apply as outside a constructor, inside a method, and inside a function.
+
+ Additional Early Error Rules for Eval Outside Constructor Methods
+ These static semantics are applied by PerformEval when a direct eval call occurs outside of the constructor method of a ClassDeclaration or ClassExpression.
+ ScriptBody : StatementList
+
+ It is a Syntax Error if StatementList Contains SuperCall.
+
+---*/
+
+
+class A {}
+class C extends A {
+ #x = (0, eval)('() => super()["x"];');
+}
+
+assert.throws(SyntaxError, function() {
+ new C().x();
+});
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/arrow-body-private-derived-cls-indirect-eval-err-contains-supercall-2.js b/js/src/tests/test262/language/statements/class/elements/arrow-body-private-derived-cls-indirect-eval-err-contains-supercall-2.js
new file mode 100644
index 0000000000..dcbaf799a0
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/arrow-body-private-derived-cls-indirect-eval-err-contains-supercall-2.js
@@ -0,0 +1,29 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/eval-err-contains-supercall-2.case
+// - src/class-elements/initializer-eval-super-call/cls-decl-private-fields-indirect-eval-arrow-body.template
+/*---
+description: error if `super().x` in StatementList of eval (indirect eval)
+esid: sec-performeval-rules-in-initializer
+features: [class, class-fields-public, class-fields-private]
+flags: [generated]
+info: |
+ Additional Early Error Rules for Eval Outside Constructor Methods
+ These static semantics are applied by PerformEval when a direct eval call occurs outside of the constructor method of a ClassDeclaration or ClassExpression.
+ ScriptBody : StatementList
+
+ It is a Syntax Error if StatementList Contains SuperCall.
+
+---*/
+
+
+class A {}
+class C extends A {
+ #x = (0, eval)('() => super().x;');
+}
+
+assert.throws(SyntaxError, function() {
+ new C().x();
+});
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/arrow-body-private-derived-cls-indirect-eval-err-contains-supercall.js b/js/src/tests/test262/language/statements/class/elements/arrow-body-private-derived-cls-indirect-eval-err-contains-supercall.js
new file mode 100644
index 0000000000..637904527e
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/arrow-body-private-derived-cls-indirect-eval-err-contains-supercall.js
@@ -0,0 +1,36 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/eval-err-contains-supercall.case
+// - src/class-elements/initializer-eval-super-call/cls-decl-private-fields-indirect-eval-arrow-body.template
+/*---
+description: error if `super()` in StatementList of eval (indirect eval)
+esid: sec-performeval-rules-in-initializer
+features: [class, class-fields-public, class-fields-private]
+flags: [generated]
+info: |
+ Additional Early Error Rules for Eval Inside Initializer
+ These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer.
+ ScriptBody : StatementList
+
+ ...
+ The remaining eval rules apply as outside a constructor, inside a method, and inside a function.
+
+ Additional Early Error Rules for Eval Outside Constructor Methods
+ These static semantics are applied by PerformEval when a direct eval call occurs outside of the constructor method of a ClassDeclaration or ClassExpression.
+ ScriptBody : StatementList
+
+ It is a Syntax Error if StatementList Contains SuperCall.
+
+---*/
+
+
+class A {}
+class C extends A {
+ #x = (0, eval)('() => super();');
+}
+
+assert.throws(SyntaxError, function() {
+ new C().x();
+});
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/arrow-body-private-direct-eval-err-contains-arguments.js b/js/src/tests/test262/language/statements/class/elements/arrow-body-private-direct-eval-err-contains-arguments.js
new file mode 100644
index 0000000000..f8639d98b6
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/arrow-body-private-direct-eval-err-contains-arguments.js
@@ -0,0 +1,41 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/eval-err-contains-arguments.case
+// - src/class-elements/initializer-direct-eval-arguments/cls-decl-private-fields-eval-arrow-body.template
+/*---
+description: error if `arguments` in StatementList of eval (direct eval)
+esid: sec-performeval-rules-in-initializer
+features: [class, class-fields-public, class-fields-private]
+flags: [generated]
+info: |
+ Additional Early Error Rules for Eval Inside Initializer
+ These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer.
+ ScriptBody : StatementList
+
+ It is a Syntax Error if ContainsArguments of StatementList is true.
+ ...
+
+ Static Semantics: ContainsArguments
+ IdentifierReference : Identifier
+
+ 1. If the StringValue of Identifier is "arguments", return true.
+ ...
+ For all other grammatical productions, recurse on all nonterminals. If any piece returns true, then return true. Otherwise return false.
+
+---*/
+
+
+var executed = false;
+class C {
+ #x = eval('executed = true; () => arguments;');
+ constructor() {
+ this.#x();
+ }
+}
+
+assert.throws(SyntaxError, function() {
+ new C();
+});
+
+assert.sameValue(executed, false);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/arrow-body-private-direct-eval-err-contains-newtarget.js b/js/src/tests/test262/language/statements/class/elements/arrow-body-private-direct-eval-err-contains-newtarget.js
new file mode 100644
index 0000000000..3689dc5744
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/arrow-body-private-direct-eval-err-contains-newtarget.js
@@ -0,0 +1,39 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/eval-err-contains-newtarget.case
+// - src/class-elements/initializer-eval-newtarget/cls-decl-private-fields-eval-arrow-body.template
+/*---
+description: error if `new.target` in StatementList of eval (direct eval)
+esid: sec-performeval-rules-in-initializer
+features: [class, new.target, class-fields-private]
+flags: [generated]
+info: |
+ Additional Early Error Rules for Eval Inside Initializer
+ These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer.
+ ScriptBody : StatementList
+
+ ...
+ The remaining eval rules apply as outside a constructor, inside a method, and inside a function.
+
+ Additional Early Error Rules for Eval Outside Functions
+ These static semantics are applied by PerformEval when a direct eval call occurs outside of any function.
+ ScriptBody : StatementList
+
+ It is a Syntax Error if StatementList Contains NewTarget.
+
+---*/
+
+
+var executed = false;
+class C {
+ #x = eval('executed = true; () => new.target;');
+ x() {
+ this.#x();
+ }
+}
+
+var c = new C();
+
+assert.sameValue(executed, true);
+assert.sameValue(c.x(), undefined);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/arrow-body-private-indirect-eval-err-contains-newtarget.js b/js/src/tests/test262/language/statements/class/elements/arrow-body-private-indirect-eval-err-contains-newtarget.js
new file mode 100644
index 0000000000..3e0afad630
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/arrow-body-private-indirect-eval-err-contains-newtarget.js
@@ -0,0 +1,35 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/eval-err-contains-newtarget.case
+// - src/class-elements/initializer-eval-newtarget/cls-decl-private-fields-indirect-eval-arrow-body.template
+/*---
+description: error if `new.target` in StatementList of eval (indirect eval)
+esid: sec-performeval-rules-in-initializer
+features: [class, new.target, class-fields-private]
+flags: [generated]
+info: |
+ Additional Early Error Rules for Eval Inside Initializer
+ These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer.
+ ScriptBody : StatementList
+
+ ...
+ The remaining eval rules apply as outside a constructor, inside a method, and inside a function.
+
+ Additional Early Error Rules for Eval Outside Functions
+ These static semantics are applied by PerformEval when a direct eval call occurs outside of any function.
+ ScriptBody : StatementList
+
+ It is a Syntax Error if StatementList Contains NewTarget.
+
+---*/
+
+
+class C {
+ #x = (0, eval)('() => new.target;');
+}
+
+assert.throws(SyntaxError, function() {
+ new C().x();
+});
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/arrow-fnc-init-err-contains-arguments.js b/js/src/tests/test262/language/statements/class/elements/arrow-fnc-init-err-contains-arguments.js
new file mode 100644
index 0000000000..04dfb47d0a
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/arrow-fnc-init-err-contains-arguments.js
@@ -0,0 +1,35 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/init-err-contains-arguments.case
+// - src/class-elements/initializer-error/cls-decl-fields-arrow-fnc.template
+/*---
+description: Syntax error if `arguments` used in class field (arrow function expression)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-public, arrow-function]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ FieldDefinition:
+ PropertyNameInitializeropt
+
+ - It is a Syntax Error if ContainsArguments of Initializer is true.
+
+ Static Semantics: ContainsArguments
+ IdentifierReference : Identifier
+
+ 1. If the StringValue of Identifier is "arguments", return true.
+ ...
+ For all other grammatical productions, recurse on all nonterminals. If any piece returns true, then return true. Otherwise return false.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ x = () => arguments;
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/arrow-fnc-init-err-contains-super.js b/js/src/tests/test262/language/statements/class/elements/arrow-fnc-init-err-contains-super.js
new file mode 100644
index 0000000000..14f8d6ce04
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/arrow-fnc-init-err-contains-super.js
@@ -0,0 +1,28 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/init-err-contains-super.case
+// - src/class-elements/initializer-error/cls-decl-fields-arrow-fnc.template
+/*---
+description: Syntax error if `super()` used in class field (arrow function expression)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-public, arrow-function]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ FieldDefinition:
+ PropertyNameInitializeropt
+
+ - It is a Syntax Error if Initializer is present and Initializer Contains SuperCall is true.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ x = () => super();
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/await-as-binding-identifier-escaped.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/await-as-binding-identifier-escaped.js
new file mode 100644
index 0000000000..0e0615f565
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/await-as-binding-identifier-escaped.js
@@ -0,0 +1,37 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/async-generators/await-as-binding-identifier-escaped.case
+// - src/async-generators/syntax/async-class-decl-static-private-method.template
+/*---
+description: await is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Static async generator private method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorMethod
+features: [async-iteration, class-static-methods-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * # PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ BindingIdentifier : Identifier
+
+ It is a Syntax Error if this production has a [Await] parameter and
+ StringValue of Identifier is "await".
+
+---*/
+$DONOTEVALUATE();
+
+
+class C { static async *#gen() {
+ var \u0061wait;
+}}
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/await-as-binding-identifier.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/await-as-binding-identifier.js
new file mode 100644
index 0000000000..503c9a6db4
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/await-as-binding-identifier.js
@@ -0,0 +1,37 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/async-generators/await-as-binding-identifier.case
+// - src/async-generators/syntax/async-class-decl-static-private-method.template
+/*---
+description: await is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Static async generator private method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorMethod
+features: [async-iteration, class-static-methods-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * # PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ BindingIdentifier : Identifier
+
+ It is a Syntax Error if this production has a [Await] parameter and
+ StringValue of Identifier is "await".
+
+---*/
+$DONOTEVALUATE();
+
+
+class C { static async *#gen() {
+ var await;
+}}
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/await-as-identifier-reference-escaped.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/await-as-identifier-reference-escaped.js
new file mode 100644
index 0000000000..2ddc243efa
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/await-as-identifier-reference-escaped.js
@@ -0,0 +1,37 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/async-generators/await-as-identifier-reference-escaped.case
+// - src/async-generators/syntax/async-class-decl-static-private-method.template
+/*---
+description: await is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Static async generator private method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorMethod
+features: [async-iteration, class-static-methods-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * # PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ IdentifierReference : Identifier
+
+ It is a Syntax Error if this production has a [Await] parameter and
+ StringValue of Identifier is "await".
+
+---*/
+$DONOTEVALUATE();
+
+
+class C { static async *#gen() {
+ void \u0061wait;
+}}
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/await-as-identifier-reference.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/await-as-identifier-reference.js
new file mode 100644
index 0000000000..309e88e2e3
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/await-as-identifier-reference.js
@@ -0,0 +1,37 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/async-generators/await-as-identifier-reference.case
+// - src/async-generators/syntax/async-class-decl-static-private-method.template
+/*---
+description: await is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Static async generator private method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorMethod
+features: [async-iteration, class-static-methods-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * # PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ IdentifierReference : Identifier
+
+ It is a Syntax Error if this production has a [Await] parameter and
+ StringValue of Identifier is "await".
+
+---*/
+$DONOTEVALUATE();
+
+
+class C { static async *#gen() {
+ void await;
+}}
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/await-as-label-identifier-escaped.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/await-as-label-identifier-escaped.js
new file mode 100644
index 0000000000..3c29401caf
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/await-as-label-identifier-escaped.js
@@ -0,0 +1,37 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/async-generators/await-as-label-identifier-escaped.case
+// - src/async-generators/syntax/async-class-decl-static-private-method.template
+/*---
+description: await is a reserved keyword within generator function bodies and may not be used as a label identifier. (Static async generator private method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorMethod
+features: [async-iteration, class-static-methods-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * # PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ LabelIdentifier : Identifier
+
+ It is a Syntax Error if this production has a [Await] parameter and
+ StringValue of Identifier is "await".
+
+---*/
+$DONOTEVALUATE();
+
+
+class C { static async *#gen() {
+ \u0061wait: ;
+}}
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/await-as-label-identifier.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/await-as-label-identifier.js
new file mode 100644
index 0000000000..e99c06f91f
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/await-as-label-identifier.js
@@ -0,0 +1,37 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/async-generators/await-as-label-identifier.case
+// - src/async-generators/syntax/async-class-decl-static-private-method.template
+/*---
+description: await is a reserved keyword within generator function bodies and may not be used as a label identifier. (Static async generator private method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorMethod
+features: [async-iteration, class-static-methods-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * # PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ LabelIdentifier : Identifier
+
+ It is a Syntax Error if this production has a [Await] parameter and
+ StringValue of Identifier is "await".
+
+---*/
+$DONOTEVALUATE();
+
+
+class C { static async *#gen() {
+ await: ;
+}}
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/browser.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/browser.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/browser.js
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/shell.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/shell.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/shell.js
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-as-binding-identifier-escaped.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-as-binding-identifier-escaped.js
new file mode 100644
index 0000000000..d219716f1f
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-as-binding-identifier-escaped.js
@@ -0,0 +1,37 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-as-binding-identifier-escaped.case
+// - src/async-generators/syntax/async-class-decl-static-private-method.template
+/*---
+description: yield is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Static async generator private method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorMethod
+features: [async-iteration, class-static-methods-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * # PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ BindingIdentifier : Identifier
+
+ It is a Syntax Error if this production has a [Yield] parameter and
+ StringValue of Identifier is "yield".
+
+---*/
+$DONOTEVALUATE();
+
+
+class C { static async *#gen() {
+ var yi\u0065ld;
+}}
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-as-binding-identifier.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-as-binding-identifier.js
new file mode 100644
index 0000000000..d27ae33299
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-as-binding-identifier.js
@@ -0,0 +1,37 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-as-binding-identifier.case
+// - src/async-generators/syntax/async-class-decl-static-private-method.template
+/*---
+description: yield is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Static async generator private method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorMethod
+features: [async-iteration, class-static-methods-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * # PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ BindingIdentifier : Identifier
+
+ It is a Syntax Error if this production has a [Yield] parameter and
+ StringValue of Identifier is "yield".
+
+---*/
+$DONOTEVALUATE();
+
+
+class C { static async *#gen() {
+ var yield;
+}}
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-as-identifier-reference-escaped.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-as-identifier-reference-escaped.js
new file mode 100644
index 0000000000..51d2a2d866
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-as-identifier-reference-escaped.js
@@ -0,0 +1,37 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-as-identifier-reference-escaped.case
+// - src/async-generators/syntax/async-class-decl-static-private-method.template
+/*---
+description: yield is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Static async generator private method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorMethod
+features: [async-iteration, class-static-methods-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * # PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ IdentifierReference : Identifier
+
+ It is a Syntax Error if this production has a [Yield] parameter and
+ StringValue of Identifier is "yield".
+
+---*/
+$DONOTEVALUATE();
+
+
+class C { static async *#gen() {
+ void yi\u0065ld;
+}}
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-as-identifier-reference.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-as-identifier-reference.js
new file mode 100644
index 0000000000..8c09fab99e
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-as-identifier-reference.js
@@ -0,0 +1,37 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-as-identifier-reference.case
+// - src/async-generators/syntax/async-class-decl-static-private-method.template
+/*---
+description: yield is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Static async generator private method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorMethod
+features: [async-iteration, class-static-methods-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * # PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ IdentifierReference : Identifier
+
+ It is a Syntax Error if this production has a [Yield] parameter and
+ StringValue of Identifier is "yield".
+
+---*/
+$DONOTEVALUATE();
+
+
+class C { static async *#gen() {
+ void yield;
+}}
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-as-label-identifier-escaped.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-as-label-identifier-escaped.js
new file mode 100644
index 0000000000..03401d007a
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-as-label-identifier-escaped.js
@@ -0,0 +1,37 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-as-label-identifier-escaped.case
+// - src/async-generators/syntax/async-class-decl-static-private-method.template
+/*---
+description: yield is a reserved keyword within generator function bodies and may not be used as a label identifier. (Static async generator private method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorMethod
+features: [async-iteration, class-static-methods-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * # PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ LabelIdentifier : Identifier
+
+ It is a Syntax Error if this production has a [Yield] parameter and
+ StringValue of Identifier is "yield".
+
+---*/
+$DONOTEVALUATE();
+
+
+class C { static async *#gen() {
+ yi\u0065ld: ;
+}}
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-as-label-identifier.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-as-label-identifier.js
new file mode 100644
index 0000000000..dde2b25edc
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-as-label-identifier.js
@@ -0,0 +1,37 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-as-label-identifier.case
+// - src/async-generators/syntax/async-class-decl-static-private-method.template
+/*---
+description: yield is a reserved keyword within generator function bodies and may not be used as a label identifier. (Static async generator private method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorMethod
+features: [async-iteration, class-static-methods-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * # PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ LabelIdentifier : Identifier
+
+ It is a Syntax Error if this production has a [Yield] parameter and
+ StringValue of Identifier is "yield".
+
+---*/
+$DONOTEVALUATE();
+
+
+class C { static async *#gen() {
+ yield: ;
+}}
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-identifier-spread-strict-strict.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-identifier-spread-strict-strict.js
new file mode 100644
index 0000000000..30ca50da2d
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-identifier-spread-strict-strict.js
@@ -0,0 +1,76 @@
+// |reftest| error:SyntaxError
+'use strict';
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-identifier-spread-strict.case
+// - src/async-generators/default/async-class-decl-static-private-method.template
+/*---
+description: It's an early error if the AssignmentExpression is a function body with yield as an identifier in strict mode. (Static async generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [object-spread, async-iteration, class-static-methods-private]
+flags: [generated, onlyStrict]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ Spread Properties
+
+ PropertyDefinition[Yield]:
+ (...)
+ ...AssignmentExpression[In, ?Yield]
+
+---*/
+$DONOTEVALUATE();
+
+
+var callCount = 0;
+
+class C {
+ static async *#gen() {
+ callCount += 1;
+ return {
+ ...(function() {
+ var yield;
+ throw new Test262Error();
+ }()),
+ }
+ }
+ static get gen() { return this.#gen; }
+}
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+
+var iter = C.gen();
+
+
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-identifier-strict-strict.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-identifier-strict-strict.js
new file mode 100644
index 0000000000..c942f0ba2c
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-identifier-strict-strict.js
@@ -0,0 +1,67 @@
+// |reftest| error:SyntaxError
+'use strict';
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-identifier-strict.case
+// - src/async-generators/default/async-class-decl-static-private-method.template
+/*---
+description: It's an early error if the generator body has another function body with yield as an identifier in strict mode. (Static async generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [async-iteration, class-static-methods-private]
+flags: [generated, onlyStrict]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+---*/
+$DONOTEVALUATE();
+
+
+var callCount = 0;
+
+class C {
+ static async *#gen() {
+ callCount += 1;
+ (function() {
+ var yield;
+ throw new Test262Error();
+ }())
+ }
+ static get gen() { return this.#gen; }
+}
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+
+var iter = C.gen();
+
+
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-promise-reject-next-catch.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-promise-reject-next-catch.js
new file mode 100644
index 0000000000..c2e2d7d1a2
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-promise-reject-next-catch.js
@@ -0,0 +1,72 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-promise-reject-next-catch.case
+// - src/async-generators/default/async-class-decl-static-private-method.template
+/*---
+description: yield Promise.reject(value) is treated as throw value (Static async generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [async-iteration, class-static-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+---*/
+let error = new Error();
+
+
+var callCount = 0;
+
+class C {
+ static async *#gen() {
+ callCount += 1;
+ yield Promise.reject(error);
+ yield "unreachable";
+ }
+ static get gen() { return this.#gen; }
+}
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+
+var iter = C.gen();
+
+iter.next().then(() => {
+ throw new Test262Error("Promise incorrectly resolved.");
+}).catch(rejectValue => {
+ // yield Promise.reject(error);
+ assert.sameValue(rejectValue, error);
+
+ iter.next().then(({done, value}) => {
+ // iter is closed now.
+ assert.sameValue(done, true, "The value of IteratorResult.done is `true`");
+ assert.sameValue(value, undefined, "The value of IteratorResult.value is `undefined`");
+ }).then($DONE, $DONE);
+});
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-promise-reject-next-for-await-of-async-iterator.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-promise-reject-next-for-await-of-async-iterator.js
new file mode 100644
index 0000000000..cc865c0f2f
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-promise-reject-next-for-await-of-async-iterator.js
@@ -0,0 +1,78 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-promise-reject-next-for-await-of-async-iterator.case
+// - src/async-generators/default/async-class-decl-static-private-method.template
+/*---
+description: yield * [Promise.reject(value)] is treated as throw value (Static async generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [async-iteration, class-static-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+---*/
+let error = new Error();
+async function * readFile() {
+ yield Promise.reject(error);
+ yield "unreachable";
+}
+
+
+var callCount = 0;
+
+class C {
+ static async *#gen() {
+ callCount += 1;
+ for await (let line of readFile()) {
+ yield line;
+ }
+ }
+ static get gen() { return this.#gen; }
+}
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+
+var iter = C.gen();
+
+iter.next().then(() => {
+ throw new Test262Error("Promise incorrectly resolved.");
+}, rejectValue => {
+
+ // yield Promise.reject(error);
+ assert.sameValue(rejectValue, error);
+
+ iter.next().then(({done, value}) => {
+ // iter is closed now.
+ assert.sameValue(done, true, "The value of IteratorResult.done is `true`");
+ assert.sameValue(value, undefined, "The value of IteratorResult.value is `undefined`");
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-promise-reject-next-for-await-of-sync-iterator.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-promise-reject-next-for-await-of-sync-iterator.js
new file mode 100644
index 0000000000..fb2ad34bf8
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-promise-reject-next-for-await-of-sync-iterator.js
@@ -0,0 +1,77 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-promise-reject-next-for-await-of-sync-iterator.case
+// - src/async-generators/default/async-class-decl-static-private-method.template
+/*---
+description: yield Promise.reject(value) in for-await-of is treated as throw value (Static async generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [async-iteration, class-static-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+---*/
+let error = new Error();
+let iterable = [
+ Promise.reject(error),
+ "unreachable"
+];
+
+
+var callCount = 0;
+
+class C {
+ static async *#gen() {
+ callCount += 1;
+ for await (let value of iterable) {
+ yield value;
+ }
+ }
+ static get gen() { return this.#gen; }
+}
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+
+var iter = C.gen();
+
+iter.next().then(() => {
+ throw new Test262Error("Promise incorrectly resolved.");
+}, rejectValue => {
+ // yield Promise.reject(error);
+ assert.sameValue(rejectValue, error);
+
+ iter.next().then(({done, value}) => {
+ // iter is closed now.
+ assert.sameValue(done, true, "The value of IteratorResult.done is `true`");
+ assert.sameValue(value, undefined, "The value of IteratorResult.value is `undefined`");
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-promise-reject-next-yield-star-async-iterator.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-promise-reject-next-yield-star-async-iterator.js
new file mode 100644
index 0000000000..748159fe28
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-promise-reject-next-yield-star-async-iterator.js
@@ -0,0 +1,76 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-promise-reject-next-yield-star-async-iterator.case
+// - src/async-generators/default/async-class-decl-static-private-method.template
+/*---
+description: yield * (async iterator) is treated as throw value (Static async generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [async-iteration, class-static-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+---*/
+let error = new Error();
+async function * readFile() {
+ yield Promise.reject(error);
+ yield "unreachable";
+}
+
+
+var callCount = 0;
+
+class C {
+ static async *#gen() {
+ callCount += 1;
+ yield * readFile();
+
+ }
+ static get gen() { return this.#gen; }
+}
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+
+var iter = C.gen();
+
+iter.next().then(() => {
+ throw new Test262Error("Promise incorrectly resolved.");
+}, rejectValue => {
+ // yield Promise.reject(error);
+ assert.sameValue(rejectValue, error);
+
+ iter.next().then(({done, value}) => {
+ // iter is closed now.
+ assert.sameValue(done, true, "The value of IteratorResult.done is `true`");
+ assert.sameValue(value, undefined, "The value of IteratorResult.value is `undefined`");
+ }).then($DONE, $DONE);
+}, $DONE).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-promise-reject-next-yield-star-sync-iterator.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-promise-reject-next-yield-star-sync-iterator.js
new file mode 100644
index 0000000000..9982495eb7
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-promise-reject-next-yield-star-sync-iterator.js
@@ -0,0 +1,75 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-promise-reject-next-yield-star-sync-iterator.case
+// - src/async-generators/default/async-class-decl-static-private-method.template
+/*---
+description: yield * (async iterator) is treated as throw value (Static async generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [async-iteration, class-static-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+---*/
+let error = new Error();
+let iterable = [
+ Promise.reject(error),
+ "unreachable"
+];
+
+
+var callCount = 0;
+
+class C {
+ static async *#gen() {
+ callCount += 1;
+ yield * iterable;
+ }
+ static get gen() { return this.#gen; }
+}
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+
+var iter = C.gen();
+
+iter.next().then(() => {
+ throw new Test262Error("Promise incorrectly resolved.");
+}, rejectValue => {
+ // yield Promise.reject(error);
+ assert.sameValue(rejectValue, error);
+
+ iter.next().then(({done, value}) => {
+ // iter is closed now.
+ assert.sameValue(done, true, "The value of IteratorResult.done is `true`");
+ assert.sameValue(value, undefined, "The value of IteratorResult.value is `undefined`");
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-promise-reject-next.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-promise-reject-next.js
new file mode 100644
index 0000000000..25f0f09a64
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-promise-reject-next.js
@@ -0,0 +1,72 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-promise-reject-next.case
+// - src/async-generators/default/async-class-decl-static-private-method.template
+/*---
+description: yield Promise.reject(value) is treated as throw value (Static async generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [async-iteration, class-static-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+---*/
+let error = new Error();
+
+
+var callCount = 0;
+
+class C {
+ static async *#gen() {
+ callCount += 1;
+ yield Promise.reject(error);
+ yield "unreachable";
+ }
+ static get gen() { return this.#gen; }
+}
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+
+var iter = C.gen();
+
+iter.next().then(() => {
+ throw new Test262Error("Promise incorrectly resolved.");
+}, rejectValue => {
+ // yield Promise.reject(error);
+ assert.sameValue(rejectValue, error);
+
+ iter.next().then(({done, value}) => {
+ // iter is closed now.
+ assert.sameValue(done, true, "The value of IteratorResult.done is `true`");
+ assert.sameValue(value, undefined, "The value of IteratorResult.value is `undefined`");
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-spread-arr-multiple.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-spread-arr-multiple.js
new file mode 100644
index 0000000000..65942b1931
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-spread-arr-multiple.js
@@ -0,0 +1,78 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-spread-arr-multiple.case
+// - src/async-generators/default/async-class-decl-static-private-method.template
+/*---
+description: Use yield value in a array spread position (Static async generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [async-iteration, class-static-methods-private]
+flags: [generated, async]
+includes: [compareArray.js]
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ Array Initializer
+
+ SpreadElement[Yield, Await]:
+ ...AssignmentExpression[+In, ?Yield, ?Await]
+
+---*/
+var arr = ['a', 'b', 'c'];
+var item;
+
+
+var callCount = 0;
+
+class C {
+ static async *#gen() {
+ callCount += 1;
+ yield [...yield yield];
+ }
+ static get gen() { return this.#gen; }
+}
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+
+var iter = C.gen();
+
+iter.next(false);
+item = iter.next(['a', 'b', 'c']);
+
+item.then(({ done, value }) => {
+ item = iter.next(value);
+
+ item.then(({ done, value }) => {
+ assert.compareArray(value, arr);
+ assert.sameValue(done, false);
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-spread-arr-single.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-spread-arr-single.js
new file mode 100644
index 0000000000..67b22e88e7
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-spread-arr-single.js
@@ -0,0 +1,77 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-spread-arr-single.case
+// - src/async-generators/default/async-class-decl-static-private-method.template
+/*---
+description: Use yield value in a array spread position (Static async generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [async-iteration, class-static-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ Array Initializer
+
+ SpreadElement[Yield, Await]:
+ ...AssignmentExpression[+In, ?Yield, ?Await]
+
+---*/
+var arr = ['a', 'b', 'c'];
+
+
+var callCount = 0;
+
+class C {
+ static async *#gen() {
+ callCount += 1;
+ yield [...yield];
+ }
+ static get gen() { return this.#gen; }
+}
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+
+var iter = C.gen();
+
+iter.next(false);
+var item = iter.next(arr);
+
+item.then(({ done, value }) => {
+ assert.notSameValue(value, arr, 'value is a new array');
+ assert(Array.isArray(value), 'value is an Array exotic object');
+ assert.sameValue(value.length, 3)
+ assert.sameValue(value[0], 'a');
+ assert.sameValue(value[1], 'b');
+ assert.sameValue(value[2], 'c');
+ assert.sameValue(done, false);
+}).then($DONE, $DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-spread-obj.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-spread-obj.js
new file mode 100644
index 0000000000..67812bf013
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-spread-obj.js
@@ -0,0 +1,80 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-spread-obj.case
+// - src/async-generators/default/async-class-decl-static-private-method.template
+/*---
+description: Use yield value in a object spread position (Static async generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [object-spread, async-iteration, class-static-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ Spread Properties
+
+ PropertyDefinition[Yield]:
+ (...)
+ ...AssignmentExpression[In, ?Yield]
+
+---*/
+
+
+var callCount = 0;
+
+class C {
+ static async *#gen() {
+ callCount += 1;
+ yield {
+ ...yield,
+ y: 1,
+ ...yield yield,
+ };
+ }
+ static get gen() { return this.#gen; }
+}
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+
+var iter = C.gen();
+
+iter.next();
+iter.next({ x: 42 });
+iter.next({ x: 'lol' });
+var item = iter.next({ y: 39 });
+
+item.then(({ done, value }) => {
+ assert.sameValue(value.x, 42);
+ assert.sameValue(value.y, 39);
+ assert.sameValue(Object.keys(value).length, 2);
+ assert.sameValue(done, false);
+}).then($DONE, $DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-async-next.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-async-next.js
new file mode 100644
index 0000000000..ddac13eccf
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-async-next.js
@@ -0,0 +1,247 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-async-next.case
+// - src/async-generators/default/async-class-decl-static-private-method.template
+/*---
+description: Execution order for yield* with async iterator and next() (Static async generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, async-iteration, Symbol.asyncIterator, class-static-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+
+---*/
+var log = [];
+var obj = {
+ get [Symbol.iterator]() {
+ log.push({ name: "get [Symbol.iterator]" });
+ },
+ get [Symbol.asyncIterator]() {
+ log.push({
+ name: "get [Symbol.asyncIterator]",
+ thisValue: this
+ });
+ return function() {
+ log.push({
+ name: "call [Symbol.asyncIterator]",
+ thisValue: this,
+ args: [...arguments]
+ });
+ var nextCount = 0;
+ return {
+ name: "asyncIterator",
+ get next() {
+ log.push({
+ name: "get next",
+ thisValue: this
+ });
+ return function() {
+ log.push({
+ name: "call next",
+ thisValue: this,
+ args: [...arguments]
+ });
+
+ nextCount++;
+ if (nextCount == 1) {
+ return {
+ name: "next-promise-1",
+ get then() {
+ log.push({
+ name: "get next then (1)",
+ thisValue: this
+ });
+ return function(resolve) {
+ log.push({
+ name: "call next then (1)",
+ thisValue: this,
+ args: [...arguments]
+ });
+
+ resolve({
+ name: "next-result-1",
+ get value() {
+ log.push({
+ name: "get next value (1)",
+ thisValue: this
+ });
+ return "next-value-1";
+ },
+ get done() {
+ log.push({
+ name: "get next done (1)",
+ thisValue: this
+ });
+ return false;
+ }
+ });
+ };
+ }
+ };
+ }
+
+ return {
+ name: "next-promise-2",
+ get then() {
+ log.push({
+ name: "get next then (2)",
+ thisValue: this
+ });
+ return function(resolve) {
+ log.push({
+ name: "call next then (2)",
+ thisValue: this,
+ args: [...arguments]
+ });
+
+ resolve({
+ name: "next-result-2",
+ get value() {
+ log.push({
+ name: "get next value (2)",
+ thisValue: this
+ });
+ return "next-value-2";
+ },
+ get done() {
+ log.push({
+ name: "get next done (2)",
+ thisValue: this
+ });
+ return true;
+ }
+ });
+ };
+ }
+ };
+ };
+ }
+ };
+ };
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ static async *#gen() {
+ callCount += 1;
+ log.push({ name: "before yield*" });
+ var v = yield* obj;
+ log.push({
+ name: "after yield*",
+ value: v
+ });
+ return "return-value";
+
+ }
+ static get gen() { return this.#gen; }
+}
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+
+var iter = C.gen();
+
+assert.sameValue(log.length, 0, "log.length");
+
+iter.next("next-arg-1").then(v => {
+ assert.sameValue(log[0].name, "before yield*");
+
+ assert.sameValue(log[1].name, "get [Symbol.asyncIterator]");
+ assert.sameValue(log[1].thisValue, obj, "get [Symbol.asyncIterator] thisValue");
+
+ assert.sameValue(log[2].name, "call [Symbol.asyncIterator]");
+ assert.sameValue(log[2].thisValue, obj, "[Symbol.asyncIterator] thisValue");
+ assert.sameValue(log[2].args.length, 0, "[Symbol.asyncIterator] args.length");
+
+ assert.sameValue(log[3].name, "get next");
+ assert.sameValue(log[3].thisValue.name, "asyncIterator", "get next thisValue");
+
+ assert.sameValue(log[4].name, "call next");
+ assert.sameValue(log[4].thisValue.name, "asyncIterator", "next thisValue");
+ assert.sameValue(log[4].args.length, 1, "next args.length");
+ assert.sameValue(log[4].args[0], undefined, "next args[0]");
+
+ assert.sameValue(log[5].name, "get next then (1)");
+ assert.sameValue(log[5].thisValue.name, "next-promise-1", "get next then thisValue");
+
+ assert.sameValue(log[6].name, "call next then (1)");
+ assert.sameValue(log[6].thisValue.name, "next-promise-1", "next then thisValue");
+ assert.sameValue(log[6].args.length, 2, "next then args.length");
+ assert.sameValue(typeof log[6].args[0], "function", "next then args[0]");
+ assert.sameValue(typeof log[6].args[1], "function", "next then args[1]");
+
+ assert.sameValue(log[7].name, "get next done (1)");
+ assert.sameValue(log[7].thisValue.name, "next-result-1", "get next done thisValue");
+
+ assert.sameValue(log[8].name, "get next value (1)");
+ assert.sameValue(log[8].thisValue.name, "next-result-1", "get next value thisValue");
+
+ assert.sameValue(v.value, "next-value-1");
+ assert.sameValue(v.done, false);
+
+ assert.sameValue(log.length, 9, "log.length");
+
+ iter.next("next-arg-2").then(v => {
+ assert.sameValue(log[9].name, "call next");
+ assert.sameValue(log[9].thisValue.name, "asyncIterator", "next thisValue");
+ assert.sameValue(log[9].args.length, 1, "next args.length");
+ assert.sameValue(log[9].args[0], "next-arg-2", "next args[0]");
+
+ assert.sameValue(log[10].name, "get next then (2)");
+ assert.sameValue(log[10].thisValue.name, "next-promise-2", "get next then thisValue");
+
+ assert.sameValue(log[11].name, "call next then (2)");
+ assert.sameValue(log[11].thisValue.name, "next-promise-2", "next then thisValue");
+ assert.sameValue(log[11].args.length, 2, "next then args.length");
+ assert.sameValue(typeof log[11].args[0], "function", "next then args[0]");
+ assert.sameValue(typeof log[11].args[1], "function", "next then args[1]");
+
+ assert.sameValue(log[12].name, "get next done (2)");
+ assert.sameValue(log[12].thisValue.name, "next-result-2", "get next done thisValue");
+
+ assert.sameValue(log[13].name, "get next value (2)");
+ assert.sameValue(log[13].thisValue.name, "next-result-2", "get next value thisValue");
+
+ assert.sameValue(log[14].name, "after yield*");
+ assert.sameValue(log[14].value, "next-value-2");
+
+ assert.sameValue(v.value, "return-value");
+ assert.sameValue(v.done, true);
+
+ assert.sameValue(log.length, 15, "log.length");
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-async-return.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-async-return.js
new file mode 100644
index 0000000000..3c4a474b2b
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-async-return.js
@@ -0,0 +1,263 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-async-return.case
+// - src/async-generators/default/async-class-decl-static-private-method.template
+/*---
+description: execution order for yield* with async iterator and return() (Static async generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [async-iteration, Symbol.asyncIterator, class-static-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+
+ ...
+ 6. Repeat
+ ...
+ c. Else,
+ i. Assert: received.[[Type]] is return.
+ ii. Let return be ? GetMethod(iterator, "return").
+ iii. If return is undefined, return Completion(received).
+ iv. Let innerReturnResult be ? Call(return, iterator, « received.[[Value]] »).
+ v. If generatorKind is async, then set innerReturnResult to ? Await(innerReturnResult).
+ ...
+ vii. Let done be ? IteratorComplete(innerReturnResult).
+ viii. If done is true, then
+ 1. Let value be ? IteratorValue(innerReturnResult).
+ 2. If generatorKind is async, then set value to ? Await(value).
+ 3. Return Completion{[[Type]]: return, [[Value]]: value, [[Target]]: empty}.
+ ix. If generatorKind is async, then let received be AsyncGeneratorYield(? IteratorValue(innerResult)).
+ ...
+
+ AsyncGeneratorYield ( value )
+ ...
+ 8. Return ! AsyncGeneratorResolve(generator, value, false).
+ ...
+
+---*/
+var log = [];
+var obj = {
+ [Symbol.asyncIterator]() {
+ var returnCount = 0;
+ return {
+ name: 'asyncIterator',
+ get next() {
+ log.push({ name: "get next" });
+ return function() {
+ return {
+ value: "next-value-1",
+ done: false
+ };
+ };
+ },
+ get return() {
+ log.push({
+ name: "get return",
+ thisValue: this
+ });
+ return function() {
+ log.push({
+ name: "call return",
+ thisValue: this,
+ args: [...arguments]
+ });
+
+ returnCount++;
+ if (returnCount == 1) {
+ return {
+ name: "return-promise-1",
+ get then() {
+ log.push({
+ name: "get return then (1)",
+ thisValue: this
+ });
+ return function(resolve) {
+ log.push({
+ name: "call return then (1)",
+ thisValue: this,
+ args: [...arguments]
+ });
+
+ resolve({
+ name: "return-result-1",
+ get value() {
+ log.push({
+ name: "get return value (1)",
+ thisValue: this
+ });
+ return "return-value-1";
+ },
+ get done() {
+ log.push({
+ name: "get return done (1)",
+ thisValue: this
+ });
+ return false;
+ }
+ });
+ };
+ }
+ };
+ }
+
+ return {
+ name: "return-promise-2",
+ get then() {
+ log.push({
+ name: "get return then (2)",
+ thisValue: this
+ });
+ return function(resolve) {
+ log.push({
+ name: "call return then (2)",
+ thisValue: this,
+ args: [...arguments]
+ });
+
+ resolve({
+ name: "return-result-2",
+ get value() {
+ log.push({
+ name: "get return value (2)",
+ thisValue: this
+ });
+ return "return-value-2";
+ },
+ get done() {
+ log.push({
+ name: "get return done (2)",
+ thisValue: this
+ });
+ return true;
+ }
+ });
+ };
+ }
+ };
+ };
+ }
+ };
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ static async *#gen() {
+ callCount += 1;
+ log.push({ name: "before yield*" });
+ yield* obj;
+
+ }
+ static get gen() { return this.#gen; }
+}
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+
+var iter = C.gen();
+
+assert.sameValue(log.length, 0, "log.length");
+
+iter.next().then(v => {
+ assert.sameValue(log[0].name, "before yield*");
+
+ assert.sameValue(log[1].name, "get next");
+
+ assert.sameValue(v.value, "next-value-1");
+ assert.sameValue(v.done, false);
+
+ assert.sameValue(log.length, 2, "log.length");
+
+ iter.return("return-arg-1").then(v => {
+ assert.sameValue(log[2].name, "get return");
+ assert.sameValue(log[2].thisValue.name, "asyncIterator", "get return thisValue");
+
+ assert.sameValue(log[3].name, "call return");
+ assert.sameValue(log[3].thisValue.name, "asyncIterator", "return thisValue");
+ assert.sameValue(log[3].args.length, 1, "return args.length");
+ assert.sameValue(log[3].args[0], "return-arg-1", "return args[0]");
+
+ assert.sameValue(log[4].name, "get return then (1)");
+ assert.sameValue(log[4].thisValue.name, "return-promise-1", "get return then thisValue");
+
+ assert.sameValue(log[5].name, "call return then (1)");
+ assert.sameValue(log[5].thisValue.name, "return-promise-1", "return then thisValue");
+ assert.sameValue(log[5].args.length, 2, "return then args.length");
+ assert.sameValue(typeof log[5].args[0], "function", "return then args[0]");
+ assert.sameValue(typeof log[5].args[1], "function", "return then args[1]");
+
+ assert.sameValue(log[6].name, "get return done (1)");
+ assert.sameValue(log[6].thisValue.name, "return-result-1", "get return done thisValue");
+
+ assert.sameValue(log[7].name, "get return value (1)");
+ assert.sameValue(log[7].thisValue.name, "return-result-1", "get return value thisValue");
+
+ assert.sameValue(v.value, "return-value-1");
+ assert.sameValue(v.done, false);
+
+ assert.sameValue(log.length, 8, "log.length");
+
+ iter.return("return-arg-2").then(v => {
+ assert.sameValue(log[8].name, "get return");
+ assert.sameValue(log[8].thisValue.name, "asyncIterator", "get return thisValue");
+
+ assert.sameValue(log[9].name, "call return");
+ assert.sameValue(log[9].thisValue.name, "asyncIterator", "return thisValue");
+ assert.sameValue(log[9].args.length, 1, "return args.length");
+ assert.sameValue(log[9].args[0], "return-arg-2", "return args[0]");
+
+ assert.sameValue(log[10].name, "get return then (2)");
+ assert.sameValue(log[10].thisValue.name, "return-promise-2", "get return then thisValue");
+
+ assert.sameValue(log[11].name, "call return then (2)");
+ assert.sameValue(log[11].thisValue.name, "return-promise-2", "return then thisValue");
+ assert.sameValue(log[11].args.length, 2, "return then args.length");
+ assert.sameValue(typeof log[11].args[0], "function", "return then args[0]");
+ assert.sameValue(typeof log[11].args[1], "function", "return then args[1]");
+
+ assert.sameValue(log[12].name, "get return done (2)");
+ assert.sameValue(log[12].thisValue.name, "return-result-2", "get return done thisValue");
+
+ assert.sameValue(log[13].name, "get return value (2)");
+ assert.sameValue(log[13].thisValue.name, "return-result-2", "get return value thisValue");
+
+ assert.sameValue(v.value, "return-value-2");
+ assert.sameValue(v.done, true);
+
+ assert.sameValue(log.length, 14, "log.length");
+ }).then($DONE, $DONE);
+ }).catch($DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-async-throw.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-async-throw.js
new file mode 100644
index 0000000000..6627b10e60
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-async-throw.js
@@ -0,0 +1,271 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-async-throw.case
+// - src/async-generators/default/async-class-decl-static-private-method.template
+/*---
+description: execution order for yield* with async iterator and throw() (Static async generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [async-iteration, Symbol.asyncIterator, class-static-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+
+ ...
+ 6. Repeat
+ ...
+ b. Else if received.[[Type]] is throw, then
+ i. Let throw be ? GetMethod(iterator, "throw").
+ ii. If throw is not undefined, then
+ 1. Let innerResult be ? Call(throw, iterator, « received.[[Value]] »).
+ 2. If generatorKind is async, then set innerResult to ? Await(innerResult).
+ ...
+ 5. Let done be ? IteratorComplete(innerResult).
+ 6. If done is true, then
+ a. Let resultValue be Return ? IteratorValue(innerResult).
+ b. If generatorKind is async, then set resultValue to ? Await(resultValue).
+ c. Return resultValue.
+ 7. If generatorKind is async, then let received be AsyncGeneratorYield(? IteratorValue(innerResult)).
+ ...
+
+ AsyncGeneratorYield ( value )
+
+ ...
+ 8. Return ! AsyncGeneratorResolve(generator, value, false).
+ ...
+
+---*/
+var log = [];
+var obj = {
+ [Symbol.asyncIterator]() {
+ var throwCount = 0;
+ return {
+ name: "asyncIterator",
+ get next() {
+ log.push({ name: "get next" });
+ return function() {
+ return {
+ value: "next-value-1",
+ done: false
+ };
+ };
+ },
+ get throw() {
+ log.push({
+ name: "get throw",
+ thisValue: this
+ });
+ return function() {
+ log.push({
+ name: "call throw",
+ thisValue: this,
+ args: [...arguments]
+ });
+
+ throwCount++;
+ if (throwCount == 1) {
+ return {
+ name: "throw-promise-1",
+ get then() {
+ log.push({
+ name: "get throw then (1)",
+ thisValue: this
+ });
+ return function(resolve) {
+ log.push({
+ name: "call throw then (1)",
+ thisValue: this,
+ args: [...arguments]
+ });
+
+ resolve({
+ name: "throw-result-1",
+ get value() {
+ log.push({
+ name: "get throw value (1)",
+ thisValue: this
+ });
+ return "throw-value-1";
+ },
+ get done() {
+ log.push({
+ name: "get throw done (1)",
+ thisValue: this
+ });
+ return false;
+ }
+ });
+ };
+ }
+ };
+ }
+
+ return {
+ name: "throw-promise-2",
+ get then() {
+ log.push({
+ name: "get throw then (2)",
+ thisValue: this
+ });
+ return function(resolve) {
+ log.push({
+ name: "call throw then (2)",
+ thisValue: this,
+ args: [...arguments]
+ });
+
+ resolve({
+ name: "throw-result-2",
+ get value() {
+ log.push({
+ name: "get throw value (2)",
+ thisValue: this
+ });
+ return "throw-value-2";
+ },
+ get done() {
+ log.push({
+ name: "get throw done (2)",
+ thisValue: this
+ });
+ return true;
+ }
+ });
+ };
+ }
+ };
+ };
+ }
+ };
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ static async *#gen() {
+ callCount += 1;
+ log.push({ name: "before yield*" });
+ var v = yield* obj;
+ log.push({
+ name: "after yield*",
+ value: v
+ });
+ return "return-value";
+
+ }
+ static get gen() { return this.#gen; }
+}
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+
+var iter = C.gen();
+
+assert.sameValue(log.length, 0, "log.length");
+
+iter.next().then(v => {
+ assert.sameValue(log[0].name, "before yield*");
+
+ assert.sameValue(log[1].name, "get next");
+
+ assert.sameValue(v.value, "next-value-1");
+ assert.sameValue(v.done, false);
+
+ assert.sameValue(log.length, 2, "log.length");
+
+ iter.throw("throw-arg-1").then(v => {
+ assert.sameValue(log[2].name, "get throw");
+ assert.sameValue(log[2].thisValue.name, "asyncIterator", "get throw thisValue");
+
+ assert.sameValue(log[3].name, "call throw");
+ assert.sameValue(log[3].thisValue.name, "asyncIterator", "throw thisValue");
+ assert.sameValue(log[3].args.length, 1, "throw args.length");
+ assert.sameValue(log[3].args[0], "throw-arg-1", "throw args[0]");
+
+ assert.sameValue(log[4].name, "get throw then (1)");
+ assert.sameValue(log[4].thisValue.name, "throw-promise-1", "get throw thisValue");
+
+ assert.sameValue(log[5].name, "call throw then (1)");
+ assert.sameValue(log[5].thisValue.name, "throw-promise-1", "throw thisValue");
+ assert.sameValue(log[5].args.length, 2, "throw then args.length");
+ assert.sameValue(typeof log[5].args[0], "function", "throw then args[0]");
+ assert.sameValue(typeof log[5].args[1], "function", "throw then args[1]");
+
+ assert.sameValue(log[6].name, "get throw done (1)");
+ assert.sameValue(log[6].thisValue.name, "throw-result-1", "get throw done thisValue");
+
+ assert.sameValue(log[7].name, "get throw value (1)");
+ assert.sameValue(log[7].thisValue.name, "throw-result-1", "get throw value thisValue");
+
+ assert.sameValue(v.value, "throw-value-1");
+ assert.sameValue(v.done, false);
+
+ assert.sameValue(log.length, 8, "log.length");
+
+ iter.throw("throw-arg-2").then(v => {
+ assert.sameValue(log[8].name, "get throw");
+ assert.sameValue(log[8].thisValue.name, "asyncIterator", "get throw thisValue");
+
+ assert.sameValue(log[9].name, "call throw");
+ assert.sameValue(log[9].thisValue.name, "asyncIterator", "throw thisValue");
+ assert.sameValue(log[9].args.length, 1, "throw args.length");
+ assert.sameValue(log[9].args[0], "throw-arg-2", "throw args[0]");
+
+ assert.sameValue(log[10].name, "get throw then (2)");
+ assert.sameValue(log[10].thisValue.name, "throw-promise-2", "get throw thisValue");
+
+ assert.sameValue(log[11].name, "call throw then (2)");
+ assert.sameValue(log[11].thisValue.name, "throw-promise-2", "throw thisValue");
+ assert.sameValue(log[11].args.length, 2, "throw then args.length");
+ assert.sameValue(typeof log[11].args[0], "function", "throw then args[0]");
+ assert.sameValue(typeof log[11].args[1], "function", "throw then args[1]");
+
+ assert.sameValue(log[12].name, "get throw done (2)");
+ assert.sameValue(log[12].thisValue.name, "throw-result-2", "get throw done thisValue");
+
+ assert.sameValue(log[13].name, "get throw value (2)");
+ assert.sameValue(log[13].thisValue.name, "throw-result-2", "get throw value thisValue");
+
+ assert.sameValue(log[14].name, "after yield*");
+ assert.sameValue(log[14].value, "throw-value-2");
+
+ assert.sameValue(v.value, "return-value");
+ assert.sameValue(v.done, true);
+
+ assert.sameValue(log.length, 15, "log.length");
+ }).then($DONE, $DONE);
+ }).catch($DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-expr-abrupt.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-expr-abrupt.js
new file mode 100644
index 0000000000..8e47406b79
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-expr-abrupt.js
@@ -0,0 +1,82 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-expr-abrupt.case
+// - src/async-generators/default/async-class-decl-static-private-method.template
+/*---
+description: Abrupt completion while getting yield* operand (Static async generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [async-iteration, class-static-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+
+ 1. Let exprRef be the result of evaluating AssignmentExpression.
+ 2. Let value be ? GetValue(exprRef).
+ ...
+
+---*/
+var obj = {};
+var abrupt = function() {
+ throw obj;
+};
+
+
+
+var callCount = 0;
+
+class C {
+ static async *#gen() {
+ callCount += 1;
+ yield* abrupt();
+ throw new Test262Error('abrupt completion closes iter');
+
+ }
+ static get gen() { return this.#gen; }
+}
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+
+var iter = C.gen();
+
+iter.next().then(() => {
+ throw new Test262Error('Promise incorrectly fulfilled.');
+}, v => {
+ assert.sameValue(v, obj, "reject reason");
+
+ iter.next().then(({ done, value }) => {
+ assert.sameValue(done, true, 'the iterator is completed');
+ assert.sameValue(value, undefined, 'value is undefined');
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-get-abrupt.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-get-abrupt.js
new file mode 100644
index 0000000000..c97c341790
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-get-abrupt.js
@@ -0,0 +1,102 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-getiter-async-get-abrupt.case
+// - src/async-generators/default/async-class-decl-static-private-method.template
+/*---
+description: Abrupt completion while getting [Symbol.asyncIterator] (Static async generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, Symbol.asyncIterator, async-iteration, class-static-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+
+ 1. Let exprRef be the result of evaluating AssignmentExpression.
+ 2. Let value be ? GetValue(exprRef).
+ 3. Let generatorKind be ! GetGeneratorKind().
+ 4. Let iterator be ? GetIterator(value, generatorKind).
+ ...
+
+ GetIterator ( obj [ , hint ] )
+
+ ...
+ 3. If hint is async,
+ a. Set method to ? GetMethod(obj, @@asyncIterator).
+ ...
+
+ GetMethod ( V, P )
+
+ ...
+ 2. Let func be ? GetV(V, P).
+ ...
+
+---*/
+var reason = {};
+var obj = {
+ get [Symbol.iterator]() {
+ throw new Test262Error('it should not get Symbol.iterator');
+ },
+ get [Symbol.asyncIterator]() {
+ throw reason;
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ static async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('abrupt completion closes iter');
+
+ }
+ static get gen() { return this.#gen; }
+}
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+
+var iter = C.gen();
+
+iter.next().then(() => {
+ throw new Test262Error('Promise incorrectly fulfilled.');
+}, v => {
+ assert.sameValue(v, reason, "reject reason");
+
+ iter.next().then(({ done, value }) => {
+ assert.sameValue(done, true, 'the iterator is completed');
+ assert.sameValue(value, undefined, 'value is undefined');
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-not-callable-boolean-throw.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-not-callable-boolean-throw.js
new file mode 100644
index 0000000000..55f538fe56
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-not-callable-boolean-throw.js
@@ -0,0 +1,101 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-getiter-async-not-callable-boolean-throw.case
+// - src/async-generators/default/async-class-decl-static-private-method.template
+/*---
+description: Throws a TypeError on a non-callable [Symbol.asyncIterator] (boolean) (Static async generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, Symbol.asyncIterator, async-iteration, class-static-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+
+ 1. Let exprRef be the result of evaluating AssignmentExpression.
+ 2. Let value be ? GetValue(exprRef).
+ 3. Let generatorKind be ! GetGeneratorKind().
+ 4. Let iterator be ? GetIterator(value, generatorKind).
+ ...
+
+ GetIterator ( obj [ , hint ] )
+
+ ...
+ 3. If hint is async,
+ a. Set method to ? GetMethod(obj, @@asyncIterator).
+ ...
+
+ GetMethod ( V, P )
+
+ ...
+ 2. Let func be ? GetV(V, P).
+ 3. If func is either undefined or null, return undefined.
+ 4. If IsCallable(func) is false, throw a TypeError exception.
+ ...
+
+---*/
+var obj = {
+ get [Symbol.iterator]() {
+ throw new Test262Error('it should not get Symbol.iterator');
+ },
+ [Symbol.asyncIterator]: false
+};
+
+
+
+var callCount = 0;
+
+class C {
+ static async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('abrupt completion closes iter');
+
+ }
+ static get gen() { return this.#gen; }
+}
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+
+var iter = C.gen();
+
+iter.next().then(() => {
+ throw new Test262Error('Promise incorrectly fulfilled.');
+}, v => {
+ assert.sameValue(v.constructor, TypeError, "TypeError");
+
+ iter.next().then(({ done, value }) => {
+ assert.sameValue(done, true, 'the iterator is completed');
+ assert.sameValue(value, undefined, 'value is undefined');
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-not-callable-number-throw.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-not-callable-number-throw.js
new file mode 100644
index 0000000000..1014533cbe
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-not-callable-number-throw.js
@@ -0,0 +1,101 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-getiter-async-not-callable-number-throw.case
+// - src/async-generators/default/async-class-decl-static-private-method.template
+/*---
+description: Throws a TypeError on a non-callable [Symbol.asyncIterator] (number) (Static async generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, Symbol.asyncIterator, async-iteration, class-static-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+
+ 1. Let exprRef be the result of evaluating AssignmentExpression.
+ 2. Let value be ? GetValue(exprRef).
+ 3. Let generatorKind be ! GetGeneratorKind().
+ 4. Let iterator be ? GetIterator(value, generatorKind).
+ ...
+
+ GetIterator ( obj [ , hint ] )
+
+ ...
+ 3. If hint is async,
+ a. Set method to ? GetMethod(obj, @@asyncIterator).
+ ...
+
+ GetMethod ( V, P )
+
+ ...
+ 2. Let func be ? GetV(V, P).
+ 3. If func is either undefined or null, return undefined.
+ 4. If IsCallable(func) is false, throw a TypeError exception.
+ ...
+
+---*/
+var obj = {
+ get [Symbol.iterator]() {
+ throw new Test262Error('it should not get Symbol.iterator');
+ },
+ [Symbol.asyncIterator]: 0
+};
+
+
+
+var callCount = 0;
+
+class C {
+ static async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('abrupt completion closes iter');
+
+ }
+ static get gen() { return this.#gen; }
+}
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+
+var iter = C.gen();
+
+iter.next().then(() => {
+ throw new Test262Error('Promise incorrectly fulfilled.');
+}, v => {
+ assert.sameValue(v.constructor, TypeError, "TypeError");
+
+ iter.next().then(({ done, value }) => {
+ assert.sameValue(done, true, 'the iterator is completed');
+ assert.sameValue(value, undefined, 'value is undefined');
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-not-callable-object-throw.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-not-callable-object-throw.js
new file mode 100644
index 0000000000..d883087711
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-not-callable-object-throw.js
@@ -0,0 +1,101 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-getiter-async-not-callable-object-throw.case
+// - src/async-generators/default/async-class-decl-static-private-method.template
+/*---
+description: Throws a TypeError on a non-callable [Symbol.asyncIterator] (object) (Static async generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, Symbol.asyncIterator, async-iteration, class-static-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+
+ 1. Let exprRef be the result of evaluating AssignmentExpression.
+ 2. Let value be ? GetValue(exprRef).
+ 3. Let generatorKind be ! GetGeneratorKind().
+ 4. Let iterator be ? GetIterator(value, generatorKind).
+ ...
+
+ GetIterator ( obj [ , hint ] )
+
+ ...
+ 3. If hint is async,
+ a. Set method to ? GetMethod(obj, @@asyncIterator).
+ ...
+
+ GetMethod ( V, P )
+
+ ...
+ 2. Let func be ? GetV(V, P).
+ 3. If func is either undefined or null, return undefined.
+ 4. If IsCallable(func) is false, throw a TypeError exception.
+ ...
+
+---*/
+var obj = {
+ get [Symbol.iterator]() {
+ throw new Test262Error('it should not get Symbol.iterator');
+ },
+ [Symbol.asyncIterator]: {}
+};
+
+
+
+var callCount = 0;
+
+class C {
+ static async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('abrupt completion closes iter');
+
+ }
+ static get gen() { return this.#gen; }
+}
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+
+var iter = C.gen();
+
+iter.next().then(() => {
+ throw new Test262Error('Promise incorrectly fulfilled.');
+}, v => {
+ assert.sameValue(v.constructor, TypeError, "TypeError");
+
+ iter.next().then(({ done, value }) => {
+ assert.sameValue(done, true, 'the iterator is completed');
+ assert.sameValue(value, undefined, 'value is undefined');
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-not-callable-string-throw.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-not-callable-string-throw.js
new file mode 100644
index 0000000000..0c93ce30d0
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-not-callable-string-throw.js
@@ -0,0 +1,101 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-getiter-async-not-callable-string-throw.case
+// - src/async-generators/default/async-class-decl-static-private-method.template
+/*---
+description: Throws a TypeError on a non-callable [Symbol.asyncIterator] (string) (Static async generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, Symbol.asyncIterator, async-iteration, class-static-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+
+ 1. Let exprRef be the result of evaluating AssignmentExpression.
+ 2. Let value be ? GetValue(exprRef).
+ 3. Let generatorKind be ! GetGeneratorKind().
+ 4. Let iterator be ? GetIterator(value, generatorKind).
+ ...
+
+ GetIterator ( obj [ , hint ] )
+
+ ...
+ 3. If hint is async,
+ a. Set method to ? GetMethod(obj, @@asyncIterator).
+ ...
+
+ GetMethod ( V, P )
+
+ ...
+ 2. Let func be ? GetV(V, P).
+ 3. If func is either undefined or null, return undefined.
+ 4. If IsCallable(func) is false, throw a TypeError exception.
+ ...
+
+---*/
+var obj = {
+ get [Symbol.iterator]() {
+ throw new Test262Error('it should not get Symbol.iterator');
+ },
+ [Symbol.asyncIterator]: ''
+};
+
+
+
+var callCount = 0;
+
+class C {
+ static async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('abrupt completion closes iter');
+
+ }
+ static get gen() { return this.#gen; }
+}
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+
+var iter = C.gen();
+
+iter.next().then(() => {
+ throw new Test262Error('Promise incorrectly fulfilled.');
+}, v => {
+ assert.sameValue(v.constructor, TypeError, "TypeError");
+
+ iter.next().then(({ done, value }) => {
+ assert.sameValue(done, true, 'the iterator is completed');
+ assert.sameValue(value, undefined, 'value is undefined');
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-not-callable-symbol-throw.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-not-callable-symbol-throw.js
new file mode 100644
index 0000000000..671d88533b
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-not-callable-symbol-throw.js
@@ -0,0 +1,101 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-getiter-async-not-callable-symbol-throw.case
+// - src/async-generators/default/async-class-decl-static-private-method.template
+/*---
+description: Throws a TypeError on a non-callable [Symbol.asyncIterator] (symbol) (Static async generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, Symbol.asyncIterator, async-iteration, class-static-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+
+ 1. Let exprRef be the result of evaluating AssignmentExpression.
+ 2. Let value be ? GetValue(exprRef).
+ 3. Let generatorKind be ! GetGeneratorKind().
+ 4. Let iterator be ? GetIterator(value, generatorKind).
+ ...
+
+ GetIterator ( obj [ , hint ] )
+
+ ...
+ 3. If hint is async,
+ a. Set method to ? GetMethod(obj, @@asyncIterator).
+ ...
+
+ GetMethod ( V, P )
+
+ ...
+ 2. Let func be ? GetV(V, P).
+ 3. If func is either undefined or null, return undefined.
+ 4. If IsCallable(func) is false, throw a TypeError exception.
+ ...
+
+---*/
+var obj = {
+ get [Symbol.iterator]() {
+ throw new Test262Error('it should not get Symbol.iterator');
+ },
+ [Symbol.asyncIterator]: Symbol.asyncIterator
+};
+
+
+
+var callCount = 0;
+
+class C {
+ static async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('abrupt completion closes iter');
+
+ }
+ static get gen() { return this.#gen; }
+}
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+
+var iter = C.gen();
+
+iter.next().then(() => {
+ throw new Test262Error('Promise incorrectly fulfilled.');
+}, v => {
+ assert.sameValue(v.constructor, TypeError, "TypeError");
+
+ iter.next().then(({ done, value }) => {
+ assert.sameValue(done, true, 'the iterator is completed');
+ assert.sameValue(value, undefined, 'value is undefined');
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-null-sync-get-abrupt.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-null-sync-get-abrupt.js
new file mode 100644
index 0000000000..6bfab44818
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-null-sync-get-abrupt.js
@@ -0,0 +1,107 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-getiter-async-null-sync-get-abrupt.case
+// - src/async-generators/default/async-class-decl-static-private-method.template
+/*---
+description: Abrupt completion while getting @@iterator after null @@asyncIterator (Static async generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, Symbol.asyncIterator, async-iteration, class-static-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+
+ 1. Let exprRef be the result of evaluating AssignmentExpression.
+ 2. Let value be ? GetValue(exprRef).
+ 3. Let generatorKind be ! GetGeneratorKind().
+ 4. Let iterator be ? GetIterator(value, generatorKind).
+ ...
+
+ GetIterator ( obj [ , hint ] )
+
+ ...
+ 3. If hint is async,
+ a. Set method to ? GetMethod(obj, @@asyncIterator).
+ b. If method is undefined,
+ i. Let syncMethod be ? GetMethod(obj, @@iterator).
+ ...
+
+ GetMethod ( V, P )
+
+ ...
+ 2. Let func be ? GetV(V, P).
+ ...
+
+---*/
+var calls = 0;
+var reason = {};
+var obj = {
+ get [Symbol.iterator]() {
+ throw reason;
+ },
+ get [Symbol.asyncIterator]() {
+ calls += 1;
+ return null;
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ static async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('abrupt completion closes iter');
+
+ }
+ static get gen() { return this.#gen; }
+}
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+
+var iter = C.gen();
+
+iter.next().then(() => {
+ throw new Test262Error('Promise incorrectly fulfilled.');
+}, v => {
+ assert.sameValue(v, reason, 'reject reason');
+ assert.sameValue(calls, 1);
+
+ iter.next().then(({ done, value }) => {
+ assert.sameValue(done, true, 'the iterator is completed');
+ assert.sameValue(value, undefined, 'value is undefined');
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-returns-abrupt.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-returns-abrupt.js
new file mode 100644
index 0000000000..59c737afa7
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-returns-abrupt.js
@@ -0,0 +1,98 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-getiter-async-returns-abrupt.case
+// - src/async-generators/default/async-class-decl-static-private-method.template
+/*---
+description: Abrupt completion while calling [Symbol.asyncIterator] (Static async generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, Symbol.asyncIterator, async-iteration, class-static-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+
+ 1. Let exprRef be the result of evaluating AssignmentExpression.
+ 2. Let value be ? GetValue(exprRef).
+ 3. Let generatorKind be ! GetGeneratorKind().
+ 4. Let iterator be ? GetIterator(value, generatorKind).
+ ...
+
+ GetIterator ( obj [ , hint ] )
+
+ ...
+ 3. If hint is async,
+ a. Set method to ? GetMethod(obj, @@asyncIterator).
+ ...
+ 6. Let iterator be ? Call(method, obj).
+ ...
+
+---*/
+var reason = {};
+var obj = {
+ get [Symbol.iterator]() {
+ throw new Test262Error('it should not get Symbol.iterator');
+ },
+ [Symbol.asyncIterator]() {
+ throw reason;
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ static async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('abrupt completion closes iter');
+
+ }
+ static get gen() { return this.#gen; }
+}
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+
+var iter = C.gen();
+
+iter.next().then(() => {
+ throw new Test262Error('Promise incorrectly fulfilled.');
+}, v => {
+ assert.sameValue(v, reason, "reject reason");
+
+ iter.next().then(({ done, value }) => {
+ assert.sameValue(done, true, 'the iterator is completed');
+ assert.sameValue(value, undefined, 'value is undefined');
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-returns-boolean-throw.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-returns-boolean-throw.js
new file mode 100644
index 0000000000..bb47a63b8e
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-returns-boolean-throw.js
@@ -0,0 +1,98 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-getiter-async-returns-boolean-throw.case
+// - src/async-generators/default/async-class-decl-static-private-method.template
+/*---
+description: Non object returned by [Symbol.asyncIterator]() - boolean (Static async generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, Symbol.asyncIterator, async-iteration, class-static-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+
+ 1. Let exprRef be the result of evaluating AssignmentExpression.
+ 2. Let value be ? GetValue(exprRef).
+ 3. Let generatorKind be ! GetGeneratorKind().
+ 4. Let iterator be ? GetIterator(value, generatorKind).
+ ...
+
+ GetIterator ( obj [ , hint ] )
+
+ ...
+ 3. If hint is async,
+ a. Set method to ? GetMethod(obj, @@asyncIterator).
+ ...
+ 6. Let iterator be ? Call(method, obj).
+ 7. If Type(iterator) is not Object, throw a TypeError exception.
+ ...
+
+---*/
+var obj = {
+ get [Symbol.iterator]() {
+ throw new Test262Error('it should not get Symbol.iterator');
+ },
+ [Symbol.asyncIterator]() {
+ return true;
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ static async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('abrupt completion closes iter');
+
+ }
+ static get gen() { return this.#gen; }
+}
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+
+var iter = C.gen();
+
+iter.next().then(() => {
+ throw new Test262Error('Promise incorrectly fulfilled.');
+}, v => {
+ assert.sameValue(v.constructor, TypeError, "TypeError");
+
+ iter.next().then(({ done, value }) => {
+ assert.sameValue(done, true, 'the iterator is completed');
+ assert.sameValue(value, undefined, 'value is undefined');
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-returns-null-throw.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-returns-null-throw.js
new file mode 100644
index 0000000000..3d714358e0
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-returns-null-throw.js
@@ -0,0 +1,98 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-getiter-async-returns-null-throw.case
+// - src/async-generators/default/async-class-decl-static-private-method.template
+/*---
+description: Non object returned by [Symbol.asyncIterator]() - null (Static async generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, Symbol.asyncIterator, async-iteration, class-static-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+
+ 1. Let exprRef be the result of evaluating AssignmentExpression.
+ 2. Let value be ? GetValue(exprRef).
+ 3. Let generatorKind be ! GetGeneratorKind().
+ 4. Let iterator be ? GetIterator(value, generatorKind).
+ ...
+
+ GetIterator ( obj [ , hint ] )
+
+ ...
+ 3. If hint is async,
+ a. Set method to ? GetMethod(obj, @@asyncIterator).
+ ...
+ 6. Let iterator be ? Call(method, obj).
+ 7. If Type(iterator) is not Object, throw a TypeError exception.
+ ...
+
+---*/
+var obj = {
+ get [Symbol.iterator]() {
+ throw new Test262Error('it should not get Symbol.iterator');
+ },
+ [Symbol.asyncIterator]() {
+ return null;
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ static async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('abrupt completion closes iter');
+
+ }
+ static get gen() { return this.#gen; }
+}
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+
+var iter = C.gen();
+
+iter.next().then(() => {
+ throw new Test262Error('Promise incorrectly fulfilled.');
+}, v => {
+ assert.sameValue(v.constructor, TypeError, "TypeError");
+
+ iter.next().then(({ done, value }) => {
+ assert.sameValue(done, true, 'the iterator is completed');
+ assert.sameValue(value, undefined, 'value is undefined');
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-returns-number-throw.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-returns-number-throw.js
new file mode 100644
index 0000000000..2ef5888a9c
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-returns-number-throw.js
@@ -0,0 +1,98 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-getiter-async-returns-number-throw.case
+// - src/async-generators/default/async-class-decl-static-private-method.template
+/*---
+description: Non object returned by [Symbol.asyncIterator]() - number (Static async generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, Symbol.asyncIterator, async-iteration, class-static-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+
+ 1. Let exprRef be the result of evaluating AssignmentExpression.
+ 2. Let value be ? GetValue(exprRef).
+ 3. Let generatorKind be ! GetGeneratorKind().
+ 4. Let iterator be ? GetIterator(value, generatorKind).
+ ...
+
+ GetIterator ( obj [ , hint ] )
+
+ ...
+ 3. If hint is async,
+ a. Set method to ? GetMethod(obj, @@asyncIterator).
+ ...
+ 6. Let iterator be ? Call(method, obj).
+ 7. If Type(iterator) is not Object, throw a TypeError exception.
+ ...
+
+---*/
+var obj = {
+ get [Symbol.iterator]() {
+ throw new Test262Error('it should not get Symbol.iterator');
+ },
+ [Symbol.asyncIterator]() {
+ return 42;
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ static async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('abrupt completion closes iter');
+
+ }
+ static get gen() { return this.#gen; }
+}
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+
+var iter = C.gen();
+
+iter.next().then(() => {
+ throw new Test262Error('Promise incorrectly fulfilled.');
+}, v => {
+ assert.sameValue(v.constructor, TypeError, "TypeError");
+
+ iter.next().then(({ done, value }) => {
+ assert.sameValue(done, true, 'the iterator is completed');
+ assert.sameValue(value, undefined, 'value is undefined');
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-returns-string-throw.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-returns-string-throw.js
new file mode 100644
index 0000000000..dca0dd2b18
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-returns-string-throw.js
@@ -0,0 +1,98 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-getiter-async-returns-string-throw.case
+// - src/async-generators/default/async-class-decl-static-private-method.template
+/*---
+description: Non object returned by [Symbol.asyncIterator]() - string (Static async generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, Symbol.asyncIterator, async-iteration, class-static-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+
+ 1. Let exprRef be the result of evaluating AssignmentExpression.
+ 2. Let value be ? GetValue(exprRef).
+ 3. Let generatorKind be ! GetGeneratorKind().
+ 4. Let iterator be ? GetIterator(value, generatorKind).
+ ...
+
+ GetIterator ( obj [ , hint ] )
+
+ ...
+ 3. If hint is async,
+ a. Set method to ? GetMethod(obj, @@asyncIterator).
+ ...
+ 6. Let iterator be ? Call(method, obj).
+ 7. If Type(iterator) is not Object, throw a TypeError exception.
+ ...
+
+---*/
+var obj = {
+ get [Symbol.iterator]() {
+ throw new Test262Error('it should not get Symbol.iterator');
+ },
+ [Symbol.asyncIterator]() {
+ return '42';
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ static async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('abrupt completion closes iter');
+
+ }
+ static get gen() { return this.#gen; }
+}
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+
+var iter = C.gen();
+
+iter.next().then(() => {
+ throw new Test262Error('Promise incorrectly fulfilled.');
+}, v => {
+ assert.sameValue(v.constructor, TypeError, "TypeError");
+
+ iter.next().then(({ done, value }) => {
+ assert.sameValue(done, true, 'the iterator is completed');
+ assert.sameValue(value, undefined, 'value is undefined');
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-returns-symbol-throw.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-returns-symbol-throw.js
new file mode 100644
index 0000000000..b1f79aad56
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-returns-symbol-throw.js
@@ -0,0 +1,98 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-getiter-async-returns-symbol-throw.case
+// - src/async-generators/default/async-class-decl-static-private-method.template
+/*---
+description: Non object returned by [Symbol.asyncIterator]() - symbol (Static async generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, Symbol.asyncIterator, async-iteration, class-static-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+
+ 1. Let exprRef be the result of evaluating AssignmentExpression.
+ 2. Let value be ? GetValue(exprRef).
+ 3. Let generatorKind be ! GetGeneratorKind().
+ 4. Let iterator be ? GetIterator(value, generatorKind).
+ ...
+
+ GetIterator ( obj [ , hint ] )
+
+ ...
+ 3. If hint is async,
+ a. Set method to ? GetMethod(obj, @@asyncIterator).
+ ...
+ 6. Let iterator be ? Call(method, obj).
+ 7. If Type(iterator) is not Object, throw a TypeError exception.
+ ...
+
+---*/
+var obj = {
+ get [Symbol.iterator]() {
+ throw new Test262Error('it should not get Symbol.iterator');
+ },
+ [Symbol.asyncIterator]() {
+ return Symbol.asyncIterator;
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ static async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('abrupt completion closes iter');
+
+ }
+ static get gen() { return this.#gen; }
+}
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+
+var iter = C.gen();
+
+iter.next().then(() => {
+ throw new Test262Error('Promise incorrectly fulfilled.');
+}, v => {
+ assert.sameValue(v.constructor, TypeError, "TypeError");
+
+ iter.next().then(({ done, value }) => {
+ assert.sameValue(done, true, 'the iterator is completed');
+ assert.sameValue(value, undefined, 'value is undefined');
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-returns-undefined-throw.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-returns-undefined-throw.js
new file mode 100644
index 0000000000..d242e4b5af
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-returns-undefined-throw.js
@@ -0,0 +1,98 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-getiter-async-returns-undefined-throw.case
+// - src/async-generators/default/async-class-decl-static-private-method.template
+/*---
+description: Non object returned by [Symbol.asyncIterator]() - undefined (Static async generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, Symbol.asyncIterator, async-iteration, class-static-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+
+ 1. Let exprRef be the result of evaluating AssignmentExpression.
+ 2. Let value be ? GetValue(exprRef).
+ 3. Let generatorKind be ! GetGeneratorKind().
+ 4. Let iterator be ? GetIterator(value, generatorKind).
+ ...
+
+ GetIterator ( obj [ , hint ] )
+
+ ...
+ 3. If hint is async,
+ a. Set method to ? GetMethod(obj, @@asyncIterator).
+ ...
+ 6. Let iterator be ? Call(method, obj).
+ 7. If Type(iterator) is not Object, throw a TypeError exception.
+ ...
+
+---*/
+var obj = {
+ get [Symbol.iterator]() {
+ throw new Test262Error('it should not get Symbol.iterator');
+ },
+ [Symbol.asyncIterator]() {
+ return undefined;
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ static async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('abrupt completion closes iter');
+
+ }
+ static get gen() { return this.#gen; }
+}
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+
+var iter = C.gen();
+
+iter.next().then(() => {
+ throw new Test262Error('Promise incorrectly fulfilled.');
+}, v => {
+ assert.sameValue(v.constructor, TypeError, "TypeError");
+
+ iter.next().then(({ done, value }) => {
+ assert.sameValue(done, true, 'the iterator is completed');
+ assert.sameValue(value, undefined, 'value is undefined');
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-undefined-sync-get-abrupt.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-undefined-sync-get-abrupt.js
new file mode 100644
index 0000000000..c4697dc91e
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-async-undefined-sync-get-abrupt.js
@@ -0,0 +1,107 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-getiter-async-undefined-sync-get-abrupt.case
+// - src/async-generators/default/async-class-decl-static-private-method.template
+/*---
+description: Abrupt completion while getting @@iterator after undefined @@asyncIterator (Static async generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, Symbol.asyncIterator, async-iteration, class-static-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+
+ 1. Let exprRef be the result of evaluating AssignmentExpression.
+ 2. Let value be ? GetValue(exprRef).
+ 3. Let generatorKind be ! GetGeneratorKind().
+ 4. Let iterator be ? GetIterator(value, generatorKind).
+ ...
+
+ GetIterator ( obj [ , hint ] )
+
+ ...
+ 3. If hint is async,
+ a. Set method to ? GetMethod(obj, @@asyncIterator).
+ b. If method is undefined,
+ i. Let syncMethod be ? GetMethod(obj, @@iterator).
+ ...
+
+ GetMethod ( V, P )
+
+ ...
+ 2. Let func be ? GetV(V, P).
+ ...
+
+---*/
+var calls = 0;
+var reason = {};
+var obj = {
+ get [Symbol.iterator]() {
+ throw reason;
+ },
+ get [Symbol.asyncIterator]() {
+ calls += 1;
+ return undefined;
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ static async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('abrupt completion closes iter');
+
+ }
+ static get gen() { return this.#gen; }
+}
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+
+var iter = C.gen();
+
+iter.next().then(() => {
+ throw new Test262Error('Promise incorrectly fulfilled.');
+}, v => {
+ assert.sameValue(v, reason, 'reject reason');
+ assert.sameValue(calls, 1);
+
+ iter.next().then(({ done, value }) => {
+ assert.sameValue(done, true, 'the iterator is completed');
+ assert.sameValue(value, undefined, 'value is undefined');
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-sync-get-abrupt.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-sync-get-abrupt.js
new file mode 100644
index 0000000000..f2166f1822
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-sync-get-abrupt.js
@@ -0,0 +1,101 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-getiter-sync-get-abrupt.case
+// - src/async-generators/default/async-class-decl-static-private-method.template
+/*---
+description: Abrupt completion while getting [Symbol.iterator] (Static async generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, Symbol.asyncIterator, async-iteration, class-static-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+
+ 1. Let exprRef be the result of evaluating AssignmentExpression.
+ 2. Let value be ? GetValue(exprRef).
+ 3. Let generatorKind be ! GetGeneratorKind().
+ 4. Let iterator be ? GetIterator(value, generatorKind).
+ ...
+
+ GetIterator ( obj [ , hint ] )
+
+ ...
+ 3. If hint is async,
+ a. Set method to ? GetMethod(obj, @@asyncIterator).
+ b. If method is undefined,
+ i. Let syncMethod be ? GetMethod(obj, @@iterator).
+ ...
+
+ GetMethod ( V, P )
+
+ ...
+ 2. Let func be ? GetV(V, P).
+ ...
+
+---*/
+var reason = {};
+var obj = {
+ get [Symbol.iterator]() {
+ throw reason;
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ static async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('abrupt completion closes iter');
+
+ }
+ static get gen() { return this.#gen; }
+}
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+
+var iter = C.gen();
+
+iter.next().then(() => {
+ throw new Test262Error('Promise incorrectly fulfilled.');
+}, v => {
+ assert.sameValue(v, reason, "reject reason");
+
+ iter.next().then(({ done, value }) => {
+ assert.sameValue(done, true, 'the iterator is completed');
+ assert.sameValue(value, undefined, 'value is undefined');
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-sync-not-callable-boolean-throw.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-sync-not-callable-boolean-throw.js
new file mode 100644
index 0000000000..a51bb1dc62
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-sync-not-callable-boolean-throw.js
@@ -0,0 +1,100 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-getiter-sync-not-callable-boolean-throw.case
+// - src/async-generators/default/async-class-decl-static-private-method.template
+/*---
+description: Throws a TypeError on a non-callable [Symbol.iterator] (boolean) (Static async generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, async-iteration, class-static-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+
+ 1. Let exprRef be the result of evaluating AssignmentExpression.
+ 2. Let value be ? GetValue(exprRef).
+ 3. Let generatorKind be ! GetGeneratorKind().
+ 4. Let iterator be ? GetIterator(value, generatorKind).
+ ...
+
+ GetIterator ( obj [ , hint ] )
+
+ ...
+ 3. If hint is async,
+ a. Set method to ? GetMethod(obj, @@asyncIterator).
+ b. If method is undefined,
+ i. Let syncMethod be ? GetMethod(obj, @@iterator).
+ ...
+
+ GetMethod ( V, P )
+
+ ...
+ 2. Let func be ? GetV(V, P).
+ ...
+ 4. If IsCallable(func) is false, throw a TypeError exception.
+ ...
+
+---*/
+var obj = {
+ [Symbol.iterator]: false
+};
+
+
+
+var callCount = 0;
+
+class C {
+ static async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('abrupt completion closes iter');
+
+ }
+ static get gen() { return this.#gen; }
+}
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+
+var iter = C.gen();
+
+iter.next().then(() => {
+ throw new Test262Error('Promise incorrectly fulfilled.');
+}, v => {
+ assert.sameValue(v.constructor, TypeError, "TypeError");
+
+ iter.next().then(({ done, value }) => {
+ assert.sameValue(done, true, 'the iterator is completed');
+ assert.sameValue(value, undefined, 'value is undefined');
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-sync-not-callable-number-throw.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-sync-not-callable-number-throw.js
new file mode 100644
index 0000000000..9ee061597c
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-sync-not-callable-number-throw.js
@@ -0,0 +1,100 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-getiter-sync-not-callable-number-throw.case
+// - src/async-generators/default/async-class-decl-static-private-method.template
+/*---
+description: Throws a TypeError on a non-callable [Symbol.iterator] (number) (Static async generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, async-iteration, class-static-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+
+ 1. Let exprRef be the result of evaluating AssignmentExpression.
+ 2. Let value be ? GetValue(exprRef).
+ 3. Let generatorKind be ! GetGeneratorKind().
+ 4. Let iterator be ? GetIterator(value, generatorKind).
+ ...
+
+ GetIterator ( obj [ , hint ] )
+
+ ...
+ 3. If hint is async,
+ a. Set method to ? GetMethod(obj, @@asyncIterator).
+ b. If method is undefined,
+ i. Let syncMethod be ? GetMethod(obj, @@iterator).
+ ...
+
+ GetMethod ( V, P )
+
+ ...
+ 2. Let func be ? GetV(V, P).
+ ...
+ 4. If IsCallable(func) is false, throw a TypeError exception.
+ ...
+
+---*/
+var obj = {
+ [Symbol.iterator]: 0
+};
+
+
+
+var callCount = 0;
+
+class C {
+ static async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('abrupt completion closes iter');
+
+ }
+ static get gen() { return this.#gen; }
+}
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+
+var iter = C.gen();
+
+iter.next().then(() => {
+ throw new Test262Error('Promise incorrectly fulfilled.');
+}, v => {
+ assert.sameValue(v.constructor, TypeError, "TypeError");
+
+ iter.next().then(({ done, value }) => {
+ assert.sameValue(done, true, 'the iterator is completed');
+ assert.sameValue(value, undefined, 'value is undefined');
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-sync-not-callable-object-throw.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-sync-not-callable-object-throw.js
new file mode 100644
index 0000000000..cdb8723bed
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-sync-not-callable-object-throw.js
@@ -0,0 +1,100 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-getiter-sync-not-callable-object-throw.case
+// - src/async-generators/default/async-class-decl-static-private-method.template
+/*---
+description: Throws a TypeError on a non-callable [Symbol.iterator] (object) (Static async generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, async-iteration, class-static-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+
+ 1. Let exprRef be the result of evaluating AssignmentExpression.
+ 2. Let value be ? GetValue(exprRef).
+ 3. Let generatorKind be ! GetGeneratorKind().
+ 4. Let iterator be ? GetIterator(value, generatorKind).
+ ...
+
+ GetIterator ( obj [ , hint ] )
+
+ ...
+ 3. If hint is async,
+ a. Set method to ? GetMethod(obj, @@asyncIterator).
+ b. If method is undefined,
+ i. Let syncMethod be ? GetMethod(obj, @@iterator).
+ ...
+
+ GetMethod ( V, P )
+
+ ...
+ 2. Let func be ? GetV(V, P).
+ ...
+ 4. If IsCallable(func) is false, throw a TypeError exception.
+ ...
+
+---*/
+var obj = {
+ [Symbol.iterator]: {}
+};
+
+
+
+var callCount = 0;
+
+class C {
+ static async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('abrupt completion closes iter');
+
+ }
+ static get gen() { return this.#gen; }
+}
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+
+var iter = C.gen();
+
+iter.next().then(() => {
+ throw new Test262Error('Promise incorrectly fulfilled.');
+}, v => {
+ assert.sameValue(v.constructor, TypeError, "TypeError");
+
+ iter.next().then(({ done, value }) => {
+ assert.sameValue(done, true, 'the iterator is completed');
+ assert.sameValue(value, undefined, 'value is undefined');
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-sync-not-callable-string-throw.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-sync-not-callable-string-throw.js
new file mode 100644
index 0000000000..21ea26481e
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-sync-not-callable-string-throw.js
@@ -0,0 +1,100 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-getiter-sync-not-callable-string-throw.case
+// - src/async-generators/default/async-class-decl-static-private-method.template
+/*---
+description: Throws a TypeError on a non-callable [Symbol.iterator] (string) (Static async generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, async-iteration, class-static-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+
+ 1. Let exprRef be the result of evaluating AssignmentExpression.
+ 2. Let value be ? GetValue(exprRef).
+ 3. Let generatorKind be ! GetGeneratorKind().
+ 4. Let iterator be ? GetIterator(value, generatorKind).
+ ...
+
+ GetIterator ( obj [ , hint ] )
+
+ ...
+ 3. If hint is async,
+ a. Set method to ? GetMethod(obj, @@asyncIterator).
+ b. If method is undefined,
+ i. Let syncMethod be ? GetMethod(obj, @@iterator).
+ ...
+
+ GetMethod ( V, P )
+
+ ...
+ 2. Let func be ? GetV(V, P).
+ ...
+ 4. If IsCallable(func) is false, throw a TypeError exception.
+ ...
+
+---*/
+var obj = {
+ [Symbol.iterator]: ''
+};
+
+
+
+var callCount = 0;
+
+class C {
+ static async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('abrupt completion closes iter');
+
+ }
+ static get gen() { return this.#gen; }
+}
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+
+var iter = C.gen();
+
+iter.next().then(() => {
+ throw new Test262Error('Promise incorrectly fulfilled.');
+}, v => {
+ assert.sameValue(v.constructor, TypeError, "TypeError");
+
+ iter.next().then(({ done, value }) => {
+ assert.sameValue(done, true, 'the iterator is completed');
+ assert.sameValue(value, undefined, 'value is undefined');
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-sync-not-callable-symbol-throw.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-sync-not-callable-symbol-throw.js
new file mode 100644
index 0000000000..b43852feb2
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-sync-not-callable-symbol-throw.js
@@ -0,0 +1,100 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-getiter-sync-not-callable-symbol-throw.case
+// - src/async-generators/default/async-class-decl-static-private-method.template
+/*---
+description: Throws a TypeError on a non-callable [Symbol.iterator] (symbol) (Static async generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, Symbol.asyncIterator, async-iteration, class-static-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+
+ 1. Let exprRef be the result of evaluating AssignmentExpression.
+ 2. Let value be ? GetValue(exprRef).
+ 3. Let generatorKind be ! GetGeneratorKind().
+ 4. Let iterator be ? GetIterator(value, generatorKind).
+ ...
+
+ GetIterator ( obj [ , hint ] )
+
+ ...
+ 3. If hint is async,
+ a. Set method to ? GetMethod(obj, @@asyncIterator).
+ b. If method is undefined,
+ i. Let syncMethod be ? GetMethod(obj, @@iterator).
+ ...
+
+ GetMethod ( V, P )
+
+ ...
+ 2. Let func be ? GetV(V, P).
+ ...
+ 4. If IsCallable(func) is false, throw a TypeError exception.
+ ...
+
+---*/
+var obj = {
+ [Symbol.iterator]: Symbol.iterator
+};
+
+
+
+var callCount = 0;
+
+class C {
+ static async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('abrupt completion closes iter');
+
+ }
+ static get gen() { return this.#gen; }
+}
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+
+var iter = C.gen();
+
+iter.next().then(() => {
+ throw new Test262Error('Promise incorrectly fulfilled.');
+}, v => {
+ assert.sameValue(v.constructor, TypeError, "TypeError");
+
+ iter.next().then(({ done, value }) => {
+ assert.sameValue(done, true, 'the iterator is completed');
+ assert.sameValue(value, undefined, 'value is undefined');
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-sync-returns-abrupt.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-sync-returns-abrupt.js
new file mode 100644
index 0000000000..676d38e67d
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-sync-returns-abrupt.js
@@ -0,0 +1,95 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-getiter-sync-returns-abrupt.case
+// - src/async-generators/default/async-class-decl-static-private-method.template
+/*---
+description: Abrupt completion while calling [Symbol.iterator] (Static async generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, Symbol.asyncIterator, async-iteration, class-static-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+
+ 1. Let exprRef be the result of evaluating AssignmentExpression.
+ 2. Let value be ? GetValue(exprRef).
+ 3. Let generatorKind be ! GetGeneratorKind().
+ 4. Let iterator be ? GetIterator(value, generatorKind).
+ ...
+
+ GetIterator ( obj [ , hint ] )
+
+ ...
+ 3. If hint is async,
+ a. Set method to ? GetMethod(obj, @@asyncIterator).
+ i. Let syncMethod be ? GetMethod(obj, @@iterator).
+ ii. Let syncIterator be ? Call(syncMethod, obj).
+ ...
+
+---*/
+var reason = {};
+var obj = {
+ [Symbol.iterator]() {
+ throw reason;
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ static async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('abrupt completion closes iter');
+
+ }
+ static get gen() { return this.#gen; }
+}
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+
+var iter = C.gen();
+
+iter.next().then(() => {
+ throw new Test262Error('Promise incorrectly fulfilled.');
+}, v => {
+ assert.sameValue(v, reason, "reject reason");
+
+ iter.next().then(({ done, value }) => {
+ assert.sameValue(done, true, 'the iterator is completed');
+ assert.sameValue(value, undefined, 'value is undefined');
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-sync-returns-boolean-throw.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-sync-returns-boolean-throw.js
new file mode 100644
index 0000000000..ff94fc055e
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-sync-returns-boolean-throw.js
@@ -0,0 +1,100 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-getiter-sync-returns-boolean-throw.case
+// - src/async-generators/default/async-class-decl-static-private-method.template
+/*---
+description: Non object returned by [Symbol.iterator]() - boolean (Static async generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, async-iteration, class-static-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+
+ 1. Let exprRef be the result of evaluating AssignmentExpression.
+ 2. Let value be ? GetValue(exprRef).
+ 3. Let generatorKind be ! GetGeneratorKind().
+ 4. Let iterator be ? GetIterator(value, generatorKind).
+ ...
+
+ GetIterator ( obj [ , hint ] )
+
+ ...
+ 3. If hint is async,
+ a. Set method to ? GetMethod(obj, @@asyncIterator).
+ i. Let syncMethod be ? GetMethod(obj, @@iterator).
+ ii. Let syncIterator be ? Call(syncMethod, obj).
+ iii. Return ? CreateAsyncFromSyncIterator(syncIterator).
+ ...
+
+ CreateAsyncFromSyncIterator(syncIterator)
+
+ 1. If Type(syncIterator) is not Object, throw a TypeError exception.
+ ...
+
+---*/
+var obj = {
+ [Symbol.iterator]() {
+ return true;
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ static async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('abrupt completion closes iter');
+
+ }
+ static get gen() { return this.#gen; }
+}
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+
+var iter = C.gen();
+
+iter.next().then(() => {
+ throw new Test262Error('Promise incorrectly fulfilled.');
+}, v => {
+ assert.sameValue(v.constructor, TypeError, "TypeError");
+
+ iter.next().then(({ done, value }) => {
+ assert.sameValue(done, true, 'the iterator is completed');
+ assert.sameValue(value, undefined, 'value is undefined');
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-sync-returns-null-throw.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-sync-returns-null-throw.js
new file mode 100644
index 0000000000..d6da5ff2fa
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-sync-returns-null-throw.js
@@ -0,0 +1,100 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-getiter-sync-returns-null-throw.case
+// - src/async-generators/default/async-class-decl-static-private-method.template
+/*---
+description: Non object returned by [Symbol.iterator]() - null (Static async generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, async-iteration, class-static-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+
+ 1. Let exprRef be the result of evaluating AssignmentExpression.
+ 2. Let value be ? GetValue(exprRef).
+ 3. Let generatorKind be ! GetGeneratorKind().
+ 4. Let iterator be ? GetIterator(value, generatorKind).
+ ...
+
+ GetIterator ( obj [ , hint ] )
+
+ ...
+ 3. If hint is async,
+ a. Set method to ? GetMethod(obj, @@asyncIterator).
+ i. Let syncMethod be ? GetMethod(obj, @@iterator).
+ ii. Let syncIterator be ? Call(syncMethod, obj).
+ iii. Return ? CreateAsyncFromSyncIterator(syncIterator).
+ ...
+
+ CreateAsyncFromSyncIterator(syncIterator)
+
+ 1. If Type(syncIterator) is not Object, throw a TypeError exception.
+ ...
+
+---*/
+var obj = {
+ [Symbol.iterator]() {
+ return null;
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ static async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('abrupt completion closes iter');
+
+ }
+ static get gen() { return this.#gen; }
+}
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+
+var iter = C.gen();
+
+iter.next().then(() => {
+ throw new Test262Error('Promise incorrectly fulfilled.');
+}, v => {
+ assert.sameValue(v.constructor, TypeError, "TypeError");
+
+ iter.next().then(({ done, value }) => {
+ assert.sameValue(done, true, 'the iterator is completed');
+ assert.sameValue(value, undefined, 'value is undefined');
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-sync-returns-number-throw.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-sync-returns-number-throw.js
new file mode 100644
index 0000000000..db0e8b7ef8
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-sync-returns-number-throw.js
@@ -0,0 +1,100 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-getiter-sync-returns-number-throw.case
+// - src/async-generators/default/async-class-decl-static-private-method.template
+/*---
+description: Non object returned by [Symbol.iterator]() - number (Static async generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, async-iteration, class-static-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+
+ 1. Let exprRef be the result of evaluating AssignmentExpression.
+ 2. Let value be ? GetValue(exprRef).
+ 3. Let generatorKind be ! GetGeneratorKind().
+ 4. Let iterator be ? GetIterator(value, generatorKind).
+ ...
+
+ GetIterator ( obj [ , hint ] )
+
+ ...
+ 3. If hint is async,
+ a. Set method to ? GetMethod(obj, @@asyncIterator).
+ i. Let syncMethod be ? GetMethod(obj, @@iterator).
+ ii. Let syncIterator be ? Call(syncMethod, obj).
+ iii. Return ? CreateAsyncFromSyncIterator(syncIterator).
+ ...
+
+ CreateAsyncFromSyncIterator(syncIterator)
+
+ 1. If Type(syncIterator) is not Object, throw a TypeError exception.
+ ...
+
+---*/
+var obj = {
+ [Symbol.iterator]() {
+ return 0;
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ static async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('abrupt completion closes iter');
+
+ }
+ static get gen() { return this.#gen; }
+}
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+
+var iter = C.gen();
+
+iter.next().then(() => {
+ throw new Test262Error('Promise incorrectly fulfilled.');
+}, v => {
+ assert.sameValue(v.constructor, TypeError, "TypeError");
+
+ iter.next().then(({ done, value }) => {
+ assert.sameValue(done, true, 'the iterator is completed');
+ assert.sameValue(value, undefined, 'value is undefined');
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-sync-returns-string-throw.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-sync-returns-string-throw.js
new file mode 100644
index 0000000000..906b3fb983
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-sync-returns-string-throw.js
@@ -0,0 +1,100 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-getiter-sync-returns-string-throw.case
+// - src/async-generators/default/async-class-decl-static-private-method.template
+/*---
+description: Non object returned by [Symbol.iterator]() - string (Static async generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, async-iteration, class-static-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+
+ 1. Let exprRef be the result of evaluating AssignmentExpression.
+ 2. Let value be ? GetValue(exprRef).
+ 3. Let generatorKind be ! GetGeneratorKind().
+ 4. Let iterator be ? GetIterator(value, generatorKind).
+ ...
+
+ GetIterator ( obj [ , hint ] )
+
+ ...
+ 3. If hint is async,
+ a. Set method to ? GetMethod(obj, @@asyncIterator).
+ i. Let syncMethod be ? GetMethod(obj, @@iterator).
+ ii. Let syncIterator be ? Call(syncMethod, obj).
+ iii. Return ? CreateAsyncFromSyncIterator(syncIterator).
+ ...
+
+ CreateAsyncFromSyncIterator(syncIterator)
+
+ 1. If Type(syncIterator) is not Object, throw a TypeError exception.
+ ...
+
+---*/
+var obj = {
+ [Symbol.iterator]() {
+ return '';
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ static async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('abrupt completion closes iter');
+
+ }
+ static get gen() { return this.#gen; }
+}
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+
+var iter = C.gen();
+
+iter.next().then(() => {
+ throw new Test262Error('Promise incorrectly fulfilled.');
+}, v => {
+ assert.sameValue(v.constructor, TypeError, "TypeError");
+
+ iter.next().then(({ done, value }) => {
+ assert.sameValue(done, true, 'the iterator is completed');
+ assert.sameValue(value, undefined, 'value is undefined');
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-sync-returns-symbol-throw.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-sync-returns-symbol-throw.js
new file mode 100644
index 0000000000..b98f887f1d
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-sync-returns-symbol-throw.js
@@ -0,0 +1,100 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-getiter-sync-returns-symbol-throw.case
+// - src/async-generators/default/async-class-decl-static-private-method.template
+/*---
+description: Non object returned by [Symbol.iterator]() - symbol (Static async generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, async-iteration, class-static-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+
+ 1. Let exprRef be the result of evaluating AssignmentExpression.
+ 2. Let value be ? GetValue(exprRef).
+ 3. Let generatorKind be ! GetGeneratorKind().
+ 4. Let iterator be ? GetIterator(value, generatorKind).
+ ...
+
+ GetIterator ( obj [ , hint ] )
+
+ ...
+ 3. If hint is async,
+ a. Set method to ? GetMethod(obj, @@asyncIterator).
+ i. Let syncMethod be ? GetMethod(obj, @@iterator).
+ ii. Let syncIterator be ? Call(syncMethod, obj).
+ iii. Return ? CreateAsyncFromSyncIterator(syncIterator).
+ ...
+
+ CreateAsyncFromSyncIterator(syncIterator)
+
+ 1. If Type(syncIterator) is not Object, throw a TypeError exception.
+ ...
+
+---*/
+var obj = {
+ [Symbol.iterator]() {
+ return Symbol.iterator;
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ static async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('abrupt completion closes iter');
+
+ }
+ static get gen() { return this.#gen; }
+}
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+
+var iter = C.gen();
+
+iter.next().then(() => {
+ throw new Test262Error('Promise incorrectly fulfilled.');
+}, v => {
+ assert.sameValue(v.constructor, TypeError, "TypeError");
+
+ iter.next().then(({ done, value }) => {
+ assert.sameValue(done, true, 'the iterator is completed');
+ assert.sameValue(value, undefined, 'value is undefined');
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-sync-returns-undefined-throw.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-sync-returns-undefined-throw.js
new file mode 100644
index 0000000000..df045b3506
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-getiter-sync-returns-undefined-throw.js
@@ -0,0 +1,100 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-getiter-sync-returns-undefined-throw.case
+// - src/async-generators/default/async-class-decl-static-private-method.template
+/*---
+description: Non object returned by [Symbol.iterator]() - undefined (Static async generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, async-iteration, class-static-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+
+ 1. Let exprRef be the result of evaluating AssignmentExpression.
+ 2. Let value be ? GetValue(exprRef).
+ 3. Let generatorKind be ! GetGeneratorKind().
+ 4. Let iterator be ? GetIterator(value, generatorKind).
+ ...
+
+ GetIterator ( obj [ , hint ] )
+
+ ...
+ 3. If hint is async,
+ a. Set method to ? GetMethod(obj, @@asyncIterator).
+ i. Let syncMethod be ? GetMethod(obj, @@iterator).
+ ii. Let syncIterator be ? Call(syncMethod, obj).
+ iii. Return ? CreateAsyncFromSyncIterator(syncIterator).
+ ...
+
+ CreateAsyncFromSyncIterator(syncIterator)
+
+ 1. If Type(syncIterator) is not Object, throw a TypeError exception.
+ ...
+
+---*/
+var obj = {
+ [Symbol.iterator]() {
+ return undefined;
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ static async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('abrupt completion closes iter');
+
+ }
+ static get gen() { return this.#gen; }
+}
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+
+var iter = C.gen();
+
+iter.next().then(() => {
+ throw new Test262Error('Promise incorrectly fulfilled.');
+}, v => {
+ assert.sameValue(v.constructor, TypeError, "TypeError");
+
+ iter.next().then(({ done, value }) => {
+ assert.sameValue(done, true, 'the iterator is completed');
+ assert.sameValue(value, undefined, 'value is undefined');
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-next-call-done-get-abrupt.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-next-call-done-get-abrupt.js
new file mode 100644
index 0000000000..f4f4bfcaa2
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-next-call-done-get-abrupt.js
@@ -0,0 +1,101 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-next-call-done-get-abrupt.case
+// - src/async-generators/default/async-class-decl-static-private-method.template
+/*---
+description: Abrupt completion while getting done (Static async generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, Symbol.asyncIterator, async-iteration, class-static-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+ ...
+ 6. Repeat
+ a. If received.[[Type]] is normal, then
+ ii. Let innerResult be ? Invoke(iterator, "next",
+ « received.[[Value]] »).
+ iii. If generatorKind is async, then set innerResult to
+ ? Await(innerResult).
+ ...
+ v. Let done be ? IteratorComplete(innerResult).
+ ...
+
+---*/
+var reason = {};
+var obj = {
+ get [Symbol.iterator]() {
+ throw new Test262Error('it should not get Symbol.iterator');
+ },
+ [Symbol.asyncIterator]() {
+ return {
+ next() {
+ return {
+ get done() {
+ throw reason;
+ }
+ };
+ }
+ };
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ static async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('abrupt completion closes iter');
+
+ }
+ static get gen() { return this.#gen; }
+}
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+
+var iter = C.gen();
+
+iter.next().then(() => {
+ throw new Test262Error('Promise incorrectly fulfilled.');
+}, v => {
+ assert.sameValue(v, reason, "reject reason");
+
+ iter.next().then(({ done, value }) => {
+ assert.sameValue(done, true, 'the iterator is completed');
+ assert.sameValue(value, undefined, 'value is undefined');
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-next-call-returns-abrupt.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-next-call-returns-abrupt.js
new file mode 100644
index 0000000000..44d53c9aeb
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-next-call-returns-abrupt.js
@@ -0,0 +1,93 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-next-call-returns-abrupt.case
+// - src/async-generators/default/async-class-decl-static-private-method.template
+/*---
+description: Abrupt completion while calling next (Static async generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, Symbol.asyncIterator, async-iteration, class-static-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+ ...
+ 6. Repeat
+ a. If received.[[Type]] is normal, then
+ ii. Let innerResult be ? Invoke(iterator, "next",
+ « received.[[Value]] »).
+ ...
+
+---*/
+var reason = {};
+var obj = {
+ get [Symbol.iterator]() {
+ throw new Test262Error('it should not get Symbol.iterator');
+ },
+ [Symbol.asyncIterator]() {
+ return {
+ next() {
+ throw reason;
+ }
+ };
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ static async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('abrupt completion closes iter');
+
+ }
+ static get gen() { return this.#gen; }
+}
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+
+var iter = C.gen();
+
+iter.next().then(() => {
+ throw new Test262Error('Promise incorrectly fulfilled.');
+}, v => {
+ assert.sameValue(v, reason, "reject reason");
+
+ iter.next().then(({ done, value }) => {
+ assert.sameValue(done, true, 'the iterator is completed');
+ assert.sameValue(value, undefined, 'value is undefined');
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-next-call-value-get-abrupt.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-next-call-value-get-abrupt.js
new file mode 100644
index 0000000000..c67b429835
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-next-call-value-get-abrupt.js
@@ -0,0 +1,103 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-next-call-value-get-abrupt.case
+// - src/async-generators/default/async-class-decl-static-private-method.template
+/*---
+description: Abrupt completion while getting value (Static async generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, Symbol.asyncIterator, async-iteration, class-static-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+ ...
+ 6. Repeat
+ a. If received.[[Type]] is normal, then
+ ii. Let innerResult be ? Invoke(iterator, "next",
+ « received.[[Value]] »).
+ iii. If generatorKind is async, then set innerResult to
+ ? Await(innerResult).
+ ...
+ vi. If done is true, then
+ 1. Return ? IteratorValue(innerResult).
+ ...
+
+---*/
+var reason = {};
+var obj = {
+ get [Symbol.iterator]() {
+ throw new Test262Error('it should not get Symbol.iterator');
+ },
+ [Symbol.asyncIterator]() {
+ return {
+ next() {
+ return {
+ done: true,
+ get value() {
+ throw reason;
+ }
+ };
+ }
+ };
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ static async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('abrupt completion closes iter');
+
+ }
+ static get gen() { return this.#gen; }
+}
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+
+var iter = C.gen();
+
+iter.next().then(() => {
+ throw new Test262Error('Promise incorrectly fulfilled.');
+}, v => {
+ assert.sameValue(v, reason, "reject reason");
+
+ iter.next().then(({ done, value }) => {
+ assert.sameValue(done, true, 'the iterator is completed');
+ assert.sameValue(value, undefined, 'value is undefined');
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-next-get-abrupt.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-next-get-abrupt.js
new file mode 100644
index 0000000000..08dffdc7f2
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-next-get-abrupt.js
@@ -0,0 +1,93 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-next-get-abrupt.case
+// - src/async-generators/default/async-class-decl-static-private-method.template
+/*---
+description: Abrupt completion while getting next (Static async generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, Symbol.asyncIterator, async-iteration, class-static-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+ ...
+ 6. Repeat
+ a. If received.[[Type]] is normal, then
+ ii. Let innerResult be ? Invoke(iterator, "next",
+ « received.[[Value]] »).
+ ...
+
+---*/
+var reason = {};
+var obj = {
+ get [Symbol.iterator]() {
+ throw new Test262Error('it should not get Symbol.iterator');
+ },
+ [Symbol.asyncIterator]() {
+ return {
+ get next() {
+ throw reason;
+ }
+ };
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ static async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('abrupt completion closes iter');
+
+ }
+ static get gen() { return this.#gen; }
+}
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+
+var iter = C.gen();
+
+iter.next().then(() => {
+ throw new Test262Error('Promise incorrectly fulfilled.');
+}, v => {
+ assert.sameValue(v, reason, "reject reason");
+
+ iter.next().then(({ done, value }) => {
+ assert.sameValue(done, true, 'the iterator is completed');
+ assert.sameValue(value, undefined, 'value is undefined');
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-next-non-object-ignores-then.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-next-non-object-ignores-then.js
new file mode 100644
index 0000000000..3f0aa165b1
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-next-non-object-ignores-then.js
@@ -0,0 +1,113 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-next-non-object-ignores-then.case
+// - src/async-generators/default/async-class-decl-static-private-method.template
+/*---
+description: If next() value is not-object, do not access respective then property (Static async generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, Symbol.asyncIterator, async-iteration, class-static-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+ ...
+ 6. Repeat
+ a. If received.[[Type]] is normal, then
+ ii. Let innerResult be ? Invoke(iterator, "next",
+ « received.[[Value]] »).
+ iii. If generatorKind is async, then set innerResult to
+ ? Await(innerResult).
+ iv. If Type(innerResult) is not Object, throw a TypeError exception.
+ ...
+
+ Await
+
+ ...
+ 2. Let promiseCapability be ! NewPromiseCapability(%Promise%).
+ 3. Perform ! Call(promiseCapability.[[Resolve]], undefined, « promise »).
+ ...
+
+ Promise Resolve Functions
+
+ ...
+ 7. If Type(resolution) is not Object, then
+ a. Return FulfillPromise(promise, resolution).
+ 8. Let then be Get(resolution, "then").
+ ...
+
+---*/
+Number.prototype.then = function() {
+ throw new Test262Error('Number#then should not be used');
+};
+var obj = {
+ get [Symbol.iterator]() {
+ throw new Test262Error('it should not get Symbol.iterator');
+ },
+ [Symbol.asyncIterator]() {
+ return {
+ next() {
+ return 42;
+ }
+ };
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ static async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('abrupt completion closes iter');
+
+ }
+ static get gen() { return this.#gen; }
+}
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+
+var iter = C.gen();
+
+iter.next().then(() => {
+ throw new Test262Error('Promise incorrectly fulfilled.');
+}, v => {
+ assert.sameValue(v.constructor, TypeError, 'TypeError');
+
+ iter.next().then(({ done, value }) => {
+ assert.sameValue(done, true, 'the iterator is completed');
+ assert.sameValue(value, undefined, 'value is undefined');
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-next-not-callable-boolean-throw.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-next-not-callable-boolean-throw.js
new file mode 100644
index 0000000000..3464f628ef
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-next-not-callable-boolean-throw.js
@@ -0,0 +1,90 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-next-not-callable-boolean-throw.case
+// - src/async-generators/default/async-class-decl-static-private-method.template
+/*---
+description: Not-callable next value in a yield star position - boolean (Static async generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, Symbol.asyncIterator, async-iteration, class-static-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+ ...
+ 6. Repeat
+ a. If received.[[Type]] is normal, then
+ ii. Let innerResult be ? Invoke(iterator, "next",
+ « received.[[Value]] »).
+ ...
+
+---*/
+var obj = {
+ get [Symbol.iterator]() {
+ throw new Test262Error('it should not get Symbol.iterator');
+ },
+ [Symbol.asyncIterator]() {
+ return {
+ next: true
+ };
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ static async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('abrupt completion closes iter');
+
+ }
+ static get gen() { return this.#gen; }
+}
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+
+var iter = C.gen();
+
+iter.next().then(() => {
+ throw new Test262Error('Promise incorrectly fulfilled.');
+}, v => {
+ assert.sameValue(v.constructor, TypeError, "TypeError");
+
+ iter.next().then(({ done, value }) => {
+ assert.sameValue(done, true, 'the iterator is completed');
+ assert.sameValue(value, undefined, 'value is undefined');
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-next-not-callable-null-throw.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-next-not-callable-null-throw.js
new file mode 100644
index 0000000000..57da39aeca
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-next-not-callable-null-throw.js
@@ -0,0 +1,90 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-next-not-callable-null-throw.case
+// - src/async-generators/default/async-class-decl-static-private-method.template
+/*---
+description: Not-callable next value in a yield star position - null (Static async generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, Symbol.asyncIterator, async-iteration, class-static-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+ ...
+ 6. Repeat
+ a. If received.[[Type]] is normal, then
+ ii. Let innerResult be ? Invoke(iterator, "next",
+ « received.[[Value]] »).
+ ...
+
+---*/
+var obj = {
+ get [Symbol.iterator]() {
+ throw new Test262Error('it should not get Symbol.iterator');
+ },
+ [Symbol.asyncIterator]() {
+ return {
+ next: null
+ };
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ static async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('abrupt completion closes iter');
+
+ }
+ static get gen() { return this.#gen; }
+}
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+
+var iter = C.gen();
+
+iter.next().then(() => {
+ throw new Test262Error('Promise incorrectly fulfilled.');
+}, v => {
+ assert.sameValue(v.constructor, TypeError, "TypeError");
+
+ iter.next().then(({ done, value }) => {
+ assert.sameValue(done, true, 'the iterator is completed');
+ assert.sameValue(value, undefined, 'value is undefined');
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-next-not-callable-number-throw.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-next-not-callable-number-throw.js
new file mode 100644
index 0000000000..8085cdc57a
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-next-not-callable-number-throw.js
@@ -0,0 +1,90 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-next-not-callable-number-throw.case
+// - src/async-generators/default/async-class-decl-static-private-method.template
+/*---
+description: Not-callable next value in a yield star position - number (Static async generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, Symbol.asyncIterator, async-iteration, class-static-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+ ...
+ 6. Repeat
+ a. If received.[[Type]] is normal, then
+ ii. Let innerResult be ? Invoke(iterator, "next",
+ « received.[[Value]] »).
+ ...
+
+---*/
+var obj = {
+ get [Symbol.iterator]() {
+ throw new Test262Error('it should not get Symbol.iterator');
+ },
+ [Symbol.asyncIterator]() {
+ return {
+ next: 42
+ };
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ static async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('abrupt completion closes iter');
+
+ }
+ static get gen() { return this.#gen; }
+}
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+
+var iter = C.gen();
+
+iter.next().then(() => {
+ throw new Test262Error('Promise incorrectly fulfilled.');
+}, v => {
+ assert.sameValue(v.constructor, TypeError, "TypeError");
+
+ iter.next().then(({ done, value }) => {
+ assert.sameValue(done, true, 'the iterator is completed');
+ assert.sameValue(value, undefined, 'value is undefined');
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-next-not-callable-object-throw.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-next-not-callable-object-throw.js
new file mode 100644
index 0000000000..c6a88ebefe
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-next-not-callable-object-throw.js
@@ -0,0 +1,90 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-next-not-callable-object-throw.case
+// - src/async-generators/default/async-class-decl-static-private-method.template
+/*---
+description: Not-callable next value in a yield star position - object (Static async generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, Symbol.asyncIterator, async-iteration, class-static-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+ ...
+ 6. Repeat
+ a. If received.[[Type]] is normal, then
+ ii. Let innerResult be ? Invoke(iterator, "next",
+ « received.[[Value]] »).
+ ...
+
+---*/
+var obj = {
+ get [Symbol.iterator]() {
+ throw new Test262Error('it should not get Symbol.iterator');
+ },
+ [Symbol.asyncIterator]() {
+ return {
+ next: {}
+ };
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ static async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('abrupt completion closes iter');
+
+ }
+ static get gen() { return this.#gen; }
+}
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+
+var iter = C.gen();
+
+iter.next().then(() => {
+ throw new Test262Error('Promise incorrectly fulfilled.');
+}, v => {
+ assert.sameValue(v.constructor, TypeError, "TypeError");
+
+ iter.next().then(({ done, value }) => {
+ assert.sameValue(done, true, 'the iterator is completed');
+ assert.sameValue(value, undefined, 'value is undefined');
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-next-not-callable-string-throw.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-next-not-callable-string-throw.js
new file mode 100644
index 0000000000..d4a7d99cbd
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-next-not-callable-string-throw.js
@@ -0,0 +1,90 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-next-not-callable-string-throw.case
+// - src/async-generators/default/async-class-decl-static-private-method.template
+/*---
+description: Not-callable next value in a yield star position - string (Static async generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, Symbol.asyncIterator, async-iteration, class-static-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+ ...
+ 6. Repeat
+ a. If received.[[Type]] is normal, then
+ ii. Let innerResult be ? Invoke(iterator, "next",
+ « received.[[Value]] »).
+ ...
+
+---*/
+var obj = {
+ get [Symbol.iterator]() {
+ throw new Test262Error('it should not get Symbol.iterator');
+ },
+ [Symbol.asyncIterator]() {
+ return {
+ next: ''
+ };
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ static async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('abrupt completion closes iter');
+
+ }
+ static get gen() { return this.#gen; }
+}
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+
+var iter = C.gen();
+
+iter.next().then(() => {
+ throw new Test262Error('Promise incorrectly fulfilled.');
+}, v => {
+ assert.sameValue(v.constructor, TypeError, "TypeError");
+
+ iter.next().then(({ done, value }) => {
+ assert.sameValue(done, true, 'the iterator is completed');
+ assert.sameValue(value, undefined, 'value is undefined');
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-next-not-callable-symbol-throw.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-next-not-callable-symbol-throw.js
new file mode 100644
index 0000000000..c1af4d3e4a
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-next-not-callable-symbol-throw.js
@@ -0,0 +1,90 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-next-not-callable-symbol-throw.case
+// - src/async-generators/default/async-class-decl-static-private-method.template
+/*---
+description: Not-callable next value in a yield star position - symbol (Static async generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, Symbol.asyncIterator, async-iteration, class-static-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+ ...
+ 6. Repeat
+ a. If received.[[Type]] is normal, then
+ ii. Let innerResult be ? Invoke(iterator, "next",
+ « received.[[Value]] »).
+ ...
+
+---*/
+var obj = {
+ get [Symbol.iterator]() {
+ throw new Test262Error('it should not get Symbol.iterator');
+ },
+ [Symbol.asyncIterator]() {
+ return {
+ next: Symbol('oi')
+ };
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ static async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('abrupt completion closes iter');
+
+ }
+ static get gen() { return this.#gen; }
+}
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+
+var iter = C.gen();
+
+iter.next().then(() => {
+ throw new Test262Error('Promise incorrectly fulfilled.');
+}, v => {
+ assert.sameValue(v.constructor, TypeError, "TypeError");
+
+ iter.next().then(({ done, value }) => {
+ assert.sameValue(done, true, 'the iterator is completed');
+ assert.sameValue(value, undefined, 'value is undefined');
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-next-not-callable-undefined-throw.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-next-not-callable-undefined-throw.js
new file mode 100644
index 0000000000..642e08097b
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-next-not-callable-undefined-throw.js
@@ -0,0 +1,90 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-next-not-callable-undefined-throw.case
+// - src/async-generators/default/async-class-decl-static-private-method.template
+/*---
+description: Not-callable next value in a yield star position - undefined (Static async generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, Symbol.asyncIterator, async-iteration, class-static-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+ ...
+ 6. Repeat
+ a. If received.[[Type]] is normal, then
+ ii. Let innerResult be ? Invoke(iterator, "next",
+ « received.[[Value]] »).
+ ...
+
+---*/
+var obj = {
+ get [Symbol.iterator]() {
+ throw new Test262Error('it should not get Symbol.iterator');
+ },
+ [Symbol.asyncIterator]() {
+ return {
+ next: undefined
+ };
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ static async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('abrupt completion closes iter');
+
+ }
+ static get gen() { return this.#gen; }
+}
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+
+var iter = C.gen();
+
+iter.next().then(() => {
+ throw new Test262Error('Promise incorrectly fulfilled.');
+}, v => {
+ assert.sameValue(v.constructor, TypeError, "TypeError");
+
+ iter.next().then(({ done, value }) => {
+ assert.sameValue(done, true, 'the iterator is completed');
+ assert.sameValue(value, undefined, 'value is undefined');
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-next-then-get-abrupt.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-next-then-get-abrupt.js
new file mode 100644
index 0000000000..03d1fb048b
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-next-then-get-abrupt.js
@@ -0,0 +1,117 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-next-then-get-abrupt.case
+// - src/async-generators/default/async-class-decl-static-private-method.template
+/*---
+description: Return abrupt after getting next().then (Static async generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, Symbol.asyncIterator, async-iteration, class-static-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+ ...
+ 6. Repeat
+ a. If received.[[Type]] is normal, then
+ ii. Let innerResult be ? Invoke(iterator, "next",
+ « received.[[Value]] »).
+ iii. If generatorKind is async, then set innerResult to
+ ? Await(innerResult).
+ ...
+
+ Await
+
+ ...
+ 2. Let promiseCapability be ! NewPromiseCapability(%Promise%).
+ 3. Perform ! Call(promiseCapability.[[Resolve]], undefined, « promise »).
+ ...
+
+ Promise Resolve Functions
+
+ ...
+ 8. Let then be Get(resolution, "then").
+ ...
+ 10. Get thenAction be then.[[Value]].
+ ...
+ 12. Perform EnqueueJob("PromiseJobs", PromiseResolveThenableJob, « promise,
+ resolution, thenAction »).
+ ...
+
+---*/
+var reason = {};
+var obj = {
+ get [Symbol.iterator]() {
+ throw new Test262Error('it should not get Symbol.iterator');
+ },
+ [Symbol.asyncIterator]() {
+ return {
+ next() {
+ return {
+ get then() {
+ throw reason;
+ }
+ };
+ }
+ };
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ static async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('abrupt completion closes iter');
+
+ }
+ static get gen() { return this.#gen; }
+}
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+
+var iter = C.gen();
+
+iter.next().then(() => {
+ throw new Test262Error('Promise incorrectly fulfilled.');
+}, v => {
+ assert.sameValue(v, reason, 'reject reason');
+
+ iter.next().then(({ done, value }) => {
+ assert.sameValue(done, true, 'the iterator is completed');
+ assert.sameValue(value, undefined, 'value is undefined');
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-next-then-non-callable-boolean-fulfillpromise.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-next-then-non-callable-boolean-fulfillpromise.js
new file mode 100644
index 0000000000..25c210f1bf
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-next-then-non-callable-boolean-fulfillpromise.js
@@ -0,0 +1,111 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-next-then-non-callable-boolean-fulfillpromise.case
+// - src/async-generators/default/async-class-decl-static-private-method.template
+/*---
+description: FulfillPromise if next().then is not-callable (boolean) (Static async generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, Symbol.asyncIterator, async-iteration, class-static-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+ ...
+ 6. Repeat
+ a. If received.[[Type]] is normal, then
+ ii. Let innerResult be ? Invoke(iterator, "next",
+ « received.[[Value]] »).
+ iii. If generatorKind is async, then set innerResult to
+ ? Await(innerResult).
+ iv. If Type(innerResult) is not Object, throw a TypeError exception.
+ ...
+
+ Await
+
+ ...
+ 2. Let promiseCapability be ! NewPromiseCapability(%Promise%).
+ 3. Perform ! Call(promiseCapability.[[Resolve]], undefined, « promise »).
+ ...
+
+ Promise Resolve Functions
+
+ ...
+ 7. If Type(resolution) is not Object, then
+ a. Return FulfillPromise(promise, resolution).
+ 8. Let then be Get(resolution, "then").
+ ...
+ 11. If IsCallable(thenAction) is false, then
+ a. Return FulfillPromise(promise, resolution).
+ ...
+
+---*/
+var obj = {
+ get [Symbol.iterator]() {
+ throw new Test262Error('it should not get Symbol.iterator');
+ },
+ [Symbol.asyncIterator]() {
+ return {
+ next() {
+ return {
+ then: true,
+ value: 42,
+ done: false
+ }
+ }
+ };
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ static async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('completion closes iter');
+
+ }
+ static get gen() { return this.#gen; }
+}
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+
+var iter = C.gen();
+
+iter.next().then(({ value, done }) => {
+ assert.sameValue(value, 42);
+ assert.sameValue(done, false);
+}).then($DONE, $DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-next-then-non-callable-null-fulfillpromise.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-next-then-non-callable-null-fulfillpromise.js
new file mode 100644
index 0000000000..b3f296d63a
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-next-then-non-callable-null-fulfillpromise.js
@@ -0,0 +1,111 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-next-then-non-callable-null-fulfillpromise.case
+// - src/async-generators/default/async-class-decl-static-private-method.template
+/*---
+description: FulfillPromise if next().then is not-callable (null) (Static async generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, Symbol.asyncIterator, async-iteration, class-static-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+ ...
+ 6. Repeat
+ a. If received.[[Type]] is normal, then
+ ii. Let innerResult be ? Invoke(iterator, "next",
+ « received.[[Value]] »).
+ iii. If generatorKind is async, then set innerResult to
+ ? Await(innerResult).
+ iv. If Type(innerResult) is not Object, throw a TypeError exception.
+ ...
+
+ Await
+
+ ...
+ 2. Let promiseCapability be ! NewPromiseCapability(%Promise%).
+ 3. Perform ! Call(promiseCapability.[[Resolve]], undefined, « promise »).
+ ...
+
+ Promise Resolve Functions
+
+ ...
+ 7. If Type(resolution) is not Object, then
+ a. Return FulfillPromise(promise, resolution).
+ 8. Let then be Get(resolution, "then").
+ ...
+ 11. If IsCallable(thenAction) is false, then
+ a. Return FulfillPromise(promise, resolution).
+ ...
+
+---*/
+var obj = {
+ get [Symbol.iterator]() {
+ throw new Test262Error('it should not get Symbol.iterator');
+ },
+ [Symbol.asyncIterator]() {
+ return {
+ next() {
+ return {
+ then: null,
+ value: 42,
+ done: false
+ }
+ }
+ };
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ static async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('completion closes iter');
+
+ }
+ static get gen() { return this.#gen; }
+}
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+
+var iter = C.gen();
+
+iter.next().then(({ value, done }) => {
+ assert.sameValue(value, 42);
+ assert.sameValue(done, false);
+}).then($DONE, $DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-next-then-non-callable-number-fulfillpromise.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-next-then-non-callable-number-fulfillpromise.js
new file mode 100644
index 0000000000..ba523fd14b
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-next-then-non-callable-number-fulfillpromise.js
@@ -0,0 +1,111 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-next-then-non-callable-number-fulfillpromise.case
+// - src/async-generators/default/async-class-decl-static-private-method.template
+/*---
+description: FulfillPromise if next().then is not-callable (number) (Static async generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, Symbol.asyncIterator, async-iteration, class-static-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+ ...
+ 6. Repeat
+ a. If received.[[Type]] is normal, then
+ ii. Let innerResult be ? Invoke(iterator, "next",
+ « received.[[Value]] »).
+ iii. If generatorKind is async, then set innerResult to
+ ? Await(innerResult).
+ iv. If Type(innerResult) is not Object, throw a TypeError exception.
+ ...
+
+ Await
+
+ ...
+ 2. Let promiseCapability be ! NewPromiseCapability(%Promise%).
+ 3. Perform ! Call(promiseCapability.[[Resolve]], undefined, « promise »).
+ ...
+
+ Promise Resolve Functions
+
+ ...
+ 7. If Type(resolution) is not Object, then
+ a. Return FulfillPromise(promise, resolution).
+ 8. Let then be Get(resolution, "then").
+ ...
+ 11. If IsCallable(thenAction) is false, then
+ a. Return FulfillPromise(promise, resolution).
+ ...
+
+---*/
+var obj = {
+ get [Symbol.iterator]() {
+ throw new Test262Error('it should not get Symbol.iterator');
+ },
+ [Symbol.asyncIterator]() {
+ return {
+ next() {
+ return {
+ then: 39,
+ value: 42,
+ done: false
+ }
+ }
+ };
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ static async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('completion closes iter');
+
+ }
+ static get gen() { return this.#gen; }
+}
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+
+var iter = C.gen();
+
+iter.next().then(({ value, done }) => {
+ assert.sameValue(value, 42);
+ assert.sameValue(done, false);
+}).then($DONE, $DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-next-then-non-callable-object-fulfillpromise.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-next-then-non-callable-object-fulfillpromise.js
new file mode 100644
index 0000000000..d333662616
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-next-then-non-callable-object-fulfillpromise.js
@@ -0,0 +1,111 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-next-then-non-callable-object-fulfillpromise.case
+// - src/async-generators/default/async-class-decl-static-private-method.template
+/*---
+description: FulfillPromise if next().then is not-callable (object) (Static async generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, Symbol.asyncIterator, async-iteration, class-static-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+ ...
+ 6. Repeat
+ a. If received.[[Type]] is normal, then
+ ii. Let innerResult be ? Invoke(iterator, "next",
+ « received.[[Value]] »).
+ iii. If generatorKind is async, then set innerResult to
+ ? Await(innerResult).
+ iv. If Type(innerResult) is not Object, throw a TypeError exception.
+ ...
+
+ Await
+
+ ...
+ 2. Let promiseCapability be ! NewPromiseCapability(%Promise%).
+ 3. Perform ! Call(promiseCapability.[[Resolve]], undefined, « promise »).
+ ...
+
+ Promise Resolve Functions
+
+ ...
+ 7. If Type(resolution) is not Object, then
+ a. Return FulfillPromise(promise, resolution).
+ 8. Let then be Get(resolution, "then").
+ ...
+ 11. If IsCallable(thenAction) is false, then
+ a. Return FulfillPromise(promise, resolution).
+ ...
+
+---*/
+var obj = {
+ get [Symbol.iterator]() {
+ throw new Test262Error('it should not get Symbol.iterator');
+ },
+ [Symbol.asyncIterator]() {
+ return {
+ next() {
+ return {
+ then: {},
+ value: 42,
+ done: false
+ }
+ }
+ };
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ static async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('completion closes iter');
+
+ }
+ static get gen() { return this.#gen; }
+}
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+
+var iter = C.gen();
+
+iter.next().then(({ value, done }) => {
+ assert.sameValue(value, 42);
+ assert.sameValue(done, false);
+}).then($DONE, $DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-next-then-non-callable-string-fulfillpromise.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-next-then-non-callable-string-fulfillpromise.js
new file mode 100644
index 0000000000..b5b2c43cfc
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-next-then-non-callable-string-fulfillpromise.js
@@ -0,0 +1,111 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-next-then-non-callable-string-fulfillpromise.case
+// - src/async-generators/default/async-class-decl-static-private-method.template
+/*---
+description: FulfillPromise if next().then is not-callable (string) (Static async generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, Symbol.asyncIterator, async-iteration, class-static-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+ ...
+ 6. Repeat
+ a. If received.[[Type]] is normal, then
+ ii. Let innerResult be ? Invoke(iterator, "next",
+ « received.[[Value]] »).
+ iii. If generatorKind is async, then set innerResult to
+ ? Await(innerResult).
+ iv. If Type(innerResult) is not Object, throw a TypeError exception.
+ ...
+
+ Await
+
+ ...
+ 2. Let promiseCapability be ! NewPromiseCapability(%Promise%).
+ 3. Perform ! Call(promiseCapability.[[Resolve]], undefined, « promise »).
+ ...
+
+ Promise Resolve Functions
+
+ ...
+ 7. If Type(resolution) is not Object, then
+ a. Return FulfillPromise(promise, resolution).
+ 8. Let then be Get(resolution, "then").
+ ...
+ 11. If IsCallable(thenAction) is false, then
+ a. Return FulfillPromise(promise, resolution).
+ ...
+
+---*/
+var obj = {
+ get [Symbol.iterator]() {
+ throw new Test262Error('it should not get Symbol.iterator');
+ },
+ [Symbol.asyncIterator]() {
+ return {
+ next() {
+ return {
+ then: '',
+ value: 42,
+ done: false
+ }
+ }
+ };
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ static async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('completion closes iter');
+
+ }
+ static get gen() { return this.#gen; }
+}
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+
+var iter = C.gen();
+
+iter.next().then(({ value, done }) => {
+ assert.sameValue(value, 42);
+ assert.sameValue(done, false);
+}).then($DONE, $DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-next-then-non-callable-symbol-fulfillpromise.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-next-then-non-callable-symbol-fulfillpromise.js
new file mode 100644
index 0000000000..3a79a2c162
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-next-then-non-callable-symbol-fulfillpromise.js
@@ -0,0 +1,111 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-next-then-non-callable-symbol-fulfillpromise.case
+// - src/async-generators/default/async-class-decl-static-private-method.template
+/*---
+description: FulfillPromise if next().then is not-callable (symbol) (Static async generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, Symbol.asyncIterator, async-iteration, class-static-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+ ...
+ 6. Repeat
+ a. If received.[[Type]] is normal, then
+ ii. Let innerResult be ? Invoke(iterator, "next",
+ « received.[[Value]] »).
+ iii. If generatorKind is async, then set innerResult to
+ ? Await(innerResult).
+ iv. If Type(innerResult) is not Object, throw a TypeError exception.
+ ...
+
+ Await
+
+ ...
+ 2. Let promiseCapability be ! NewPromiseCapability(%Promise%).
+ 3. Perform ! Call(promiseCapability.[[Resolve]], undefined, « promise »).
+ ...
+
+ Promise Resolve Functions
+
+ ...
+ 7. If Type(resolution) is not Object, then
+ a. Return FulfillPromise(promise, resolution).
+ 8. Let then be Get(resolution, "then").
+ ...
+ 11. If IsCallable(thenAction) is false, then
+ a. Return FulfillPromise(promise, resolution).
+ ...
+
+---*/
+var obj = {
+ get [Symbol.iterator]() {
+ throw new Test262Error('it should not get Symbol.iterator');
+ },
+ [Symbol.asyncIterator]() {
+ return {
+ next() {
+ return {
+ then: Symbol('oi'),
+ value: 42,
+ done: false
+ }
+ }
+ };
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ static async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('completion closes iter');
+
+ }
+ static get gen() { return this.#gen; }
+}
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+
+var iter = C.gen();
+
+iter.next().then(({ value, done }) => {
+ assert.sameValue(value, 42);
+ assert.sameValue(done, false);
+}).then($DONE, $DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-next-then-non-callable-undefined-fulfillpromise.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-next-then-non-callable-undefined-fulfillpromise.js
new file mode 100644
index 0000000000..dfbd1f5642
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-next-then-non-callable-undefined-fulfillpromise.js
@@ -0,0 +1,111 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-next-then-non-callable-undefined-fulfillpromise.case
+// - src/async-generators/default/async-class-decl-static-private-method.template
+/*---
+description: FulfillPromise if next().then is not-callable (undefined) (Static async generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, Symbol.asyncIterator, async-iteration, class-static-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+ ...
+ 6. Repeat
+ a. If received.[[Type]] is normal, then
+ ii. Let innerResult be ? Invoke(iterator, "next",
+ « received.[[Value]] »).
+ iii. If generatorKind is async, then set innerResult to
+ ? Await(innerResult).
+ iv. If Type(innerResult) is not Object, throw a TypeError exception.
+ ...
+
+ Await
+
+ ...
+ 2. Let promiseCapability be ! NewPromiseCapability(%Promise%).
+ 3. Perform ! Call(promiseCapability.[[Resolve]], undefined, « promise »).
+ ...
+
+ Promise Resolve Functions
+
+ ...
+ 7. If Type(resolution) is not Object, then
+ a. Return FulfillPromise(promise, resolution).
+ 8. Let then be Get(resolution, "then").
+ ...
+ 11. If IsCallable(thenAction) is false, then
+ a. Return FulfillPromise(promise, resolution).
+ ...
+
+---*/
+var obj = {
+ get [Symbol.iterator]() {
+ throw new Test262Error('it should not get Symbol.iterator');
+ },
+ [Symbol.asyncIterator]() {
+ return {
+ next() {
+ return {
+ then: undefined,
+ value: 42,
+ done: false
+ }
+ }
+ };
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ static async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('completion closes iter');
+
+ }
+ static get gen() { return this.#gen; }
+}
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+
+var iter = C.gen();
+
+iter.next().then(({ value, done }) => {
+ assert.sameValue(value, 42);
+ assert.sameValue(done, false);
+}).then($DONE, $DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-next-then-returns-abrupt.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-next-then-returns-abrupt.js
new file mode 100644
index 0000000000..5b23bd00c5
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-next-then-returns-abrupt.js
@@ -0,0 +1,117 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-next-then-returns-abrupt.case
+// - src/async-generators/default/async-class-decl-static-private-method.template
+/*---
+description: Return abrupt after calling next().then (Static async generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, Symbol.asyncIterator, async-iteration, class-static-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+ ...
+ 6. Repeat
+ a. If received.[[Type]] is normal, then
+ ii. Let innerResult be ? Invoke(iterator, "next",
+ « received.[[Value]] »).
+ iii. If generatorKind is async, then set innerResult to
+ ? Await(innerResult).
+ ...
+
+ Await
+
+ ...
+ 2. Let promiseCapability be ! NewPromiseCapability(%Promise%).
+ 3. Perform ! Call(promiseCapability.[[Resolve]], undefined, « promise »).
+ ...
+
+ Promise Resolve Functions
+
+ ...
+ 8. Let then be Get(resolution, "then").
+ ...
+ 10. Get thenAction be then.[[Value]].
+ ...
+ 12. Perform EnqueueJob("PromiseJobs", PromiseResolveThenableJob, « promise,
+ resolution, thenAction »).
+ ...
+
+---*/
+var reason = {};
+var obj = {
+ get [Symbol.iterator]() {
+ throw new Test262Error('it should not get Symbol.iterator');
+ },
+ [Symbol.asyncIterator]() {
+ return {
+ next() {
+ return {
+ then() {
+ throw reason;
+ }
+ };
+ }
+ };
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ static async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('abrupt completion closes iter');
+
+ }
+ static get gen() { return this.#gen; }
+}
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+
+var iter = C.gen();
+
+iter.next().then(() => {
+ throw new Test262Error('Promise incorrectly fulfilled.');
+}, v => {
+ assert.sameValue(v, reason, 'reject reason');
+
+ iter.next().then(({ done, value }) => {
+ assert.sameValue(done, true, 'the iterator is completed');
+ assert.sameValue(value, undefined, 'value is undefined');
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-sync-next.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-sync-next.js
new file mode 100644
index 0000000000..b89eab149d
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-sync-next.js
@@ -0,0 +1,250 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-sync-next.case
+// - src/async-generators/default/async-class-decl-static-private-method.template
+/*---
+description: execution order for yield* with sync iterator and next() (Static async generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, async-iteration, Symbol.asyncIterator, class-static-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+
+ ...
+ 2. Let value be ? GetValue(exprRef).
+ 3. Let generatorKind be ! GetGeneratorKind().
+ 4. Let iterator be ? GetIterator(value, generatorKind).
+ 5. Let received be NormalCompletion(undefined).
+ 6. Repeat
+ a. If received.[[Type]] is normal, then
+ i. Let innerResult be ? IteratorNext(iterator, received.[[Value]]).
+ ii. Let innerResult be ? Invoke(iterator, "next",
+ « received.[[Value]] »).
+ iii. If generatorKind is async, then set innerResult to
+ ? Await(innerResult).
+ ...
+ v. Let done be ? IteratorComplete(innerResult).
+ vi. If done is true, then
+ 1. Return ? IteratorValue(innerResult).
+ vii. Let received be GeneratorYield(innerResult).
+ ...
+
+ GetIterator ( obj [ , hint ] )
+
+ ...
+ 3. If hint is async,
+ a. Set method to ? GetMethod(obj, @@asyncIterator).
+ b. If method is undefined,
+ i. Let syncMethod be ? GetMethod(obj, @@iterator).
+ ii. Let syncIterator be ? Call(syncMethod, obj).
+ iii. Return ? CreateAsyncFromSyncIterator(syncIterator).
+ ...
+
+ %AsyncFromSyncIteratorPrototype%.next ( value )
+
+ ...
+ 5. Let nextResult be IteratorNext(syncIterator, value).
+ ...
+ 7. Let nextValue be IteratorValue(nextResult).
+ ...
+ 9. Let nextDone be IteratorComplete(nextResult).
+ ...
+ 12. Perform ! Call(valueWrapperCapability.[[Resolve]], undefined,
+ « nextValue »).
+ ...
+ 14. Set onFulfilled.[[Done]] to nextDone.
+ 15. Perform ! PerformPromiseThen(valueWrapperCapability.[[Promise]],
+ onFulfilled, undefined, promiseCapability).
+ ...
+
+ Async Iterator Value Unwrap Functions
+
+ 1. Return ! CreateIterResultObject(value, F.[[Done]]).
+
+---*/
+var log = [];
+var obj = {
+ get [Symbol.iterator]() {
+ log.push({
+ name: "get [Symbol.iterator]",
+ thisValue: this
+ });
+ return function() {
+ log.push({
+ name: "call [Symbol.iterator]",
+ thisValue: this,
+ args: [...arguments]
+ });
+ var nextCount = 0;
+ return {
+ name: "syncIterator",
+ get next() {
+ log.push({
+ name: "get next",
+ thisValue: this
+ });
+ return function() {
+ log.push({
+ name: "call next",
+ thisValue: this,
+ args: [...arguments]
+ });
+
+ nextCount++;
+ if (nextCount == 1) {
+ return {
+ name: "next-result-1",
+ get value() {
+ log.push({
+ name: "get next value (1)",
+ thisValue: this
+ });
+ return "next-value-1";
+ },
+ get done() {
+ log.push({
+ name: "get next done (1)",
+ thisValue: this
+ });
+ return false;
+ }
+ };
+ }
+
+ return {
+ name: "next-result-2",
+ get value() {
+ log.push({
+ name: "get next value (2)",
+ thisValue: this
+ });
+ return "next-value-2";
+ },
+ get done() {
+ log.push({
+ name: "get next done (2)",
+ thisValue: this
+ });
+ return true;
+ }
+ };
+ };
+ }
+ };
+ };
+ },
+ get [Symbol.asyncIterator]() {
+ log.push({ name: "get [Symbol.asyncIterator]" });
+ return null;
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ static async *#gen() {
+ callCount += 1;
+ log.push({ name: "before yield*" });
+ var v = yield* obj;
+ log.push({
+ name: "after yield*",
+ value: v
+ });
+ return "return-value";
+
+ }
+ static get gen() { return this.#gen; }
+}
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+
+var iter = C.gen();
+
+assert.sameValue(log.length, 0, "log.length");
+
+iter.next("next-arg-1").then(v => {
+ assert.sameValue(log[0].name, "before yield*");
+
+ assert.sameValue(log[1].name, "get [Symbol.asyncIterator]");
+
+ assert.sameValue(log[2].name, "get [Symbol.iterator]");
+ assert.sameValue(log[2].thisValue, obj, "get [Symbol.iterator] thisValue");
+
+ assert.sameValue(log[3].name, "call [Symbol.iterator]");
+ assert.sameValue(log[3].thisValue, obj, "[Symbol.iterator] thisValue");
+ assert.sameValue(log[3].args.length, 0, "[Symbol.iterator] args.length");
+
+ assert.sameValue(log[4].name, "get next");
+ assert.sameValue(log[4].thisValue.name, "syncIterator", "get next thisValue");
+
+ assert.sameValue(log[5].name, "call next");
+ assert.sameValue(log[5].thisValue.name, "syncIterator", "next thisValue");
+ assert.sameValue(log[5].args.length, 1, "next args.length");
+ assert.sameValue(log[5].args[0], undefined, "next args[0]");
+
+ assert.sameValue(log[6].name, "get next done (1)");
+ assert.sameValue(log[6].thisValue.name, "next-result-1", "get next done thisValue");
+
+ assert.sameValue(log[7].name, "get next value (1)");
+ assert.sameValue(log[7].thisValue.name, "next-result-1", "get next value thisValue");
+
+ assert.sameValue(v.value, "next-value-1");
+ assert.sameValue(v.done, false);
+
+ assert.sameValue(log.length, 8, "log.length");
+
+ iter.next("next-arg-2").then(v => {
+ assert.sameValue(log[8].name, "call next");
+ assert.sameValue(log[8].thisValue.name, "syncIterator", "next thisValue");
+ assert.sameValue(log[8].args.length, 1, "next args.length");
+ assert.sameValue(log[8].args[0], "next-arg-2", "next args[0]");
+
+ assert.sameValue(log[9].name, "get next done (2)");
+ assert.sameValue(log[9].thisValue.name, "next-result-2", "get next done thisValue");
+
+ assert.sameValue(log[10].name, "get next value (2)");
+ assert.sameValue(log[10].thisValue.name, "next-result-2", "get next value thisValue");
+
+ assert.sameValue(log[11].name, "after yield*");
+ assert.sameValue(log[11].value, "next-value-2");
+
+ assert.sameValue(v.value, "return-value");
+ assert.sameValue(v.done, true);
+
+ assert.sameValue(log.length, 12, "log.length");
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-sync-return.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-sync-return.js
new file mode 100644
index 0000000000..77a9271528
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-sync-return.js
@@ -0,0 +1,225 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-sync-return.case
+// - src/async-generators/default/async-class-decl-static-private-method.template
+/*---
+description: execution order for yield* with sync iterator and return() (Static async generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, async-iteration, Symbol.asyncIterator, class-static-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+
+ ...
+ 6. Repeat
+ ...
+ c. Else,
+ i. Assert: received.[[Type]] is return.
+ ii. Let return be ? GetMethod(iterator, "return").
+ iii. If return is undefined, return Completion(received).
+ iv. Let innerReturnResult be ? Call(return, iterator,
+ « received.[[Value]] »).
+ v. If generatorKind is async, then set innerReturnResult to
+ ? Await(innerReturnResult).
+ ...
+ vii. Let done be ? IteratorComplete(innerReturnResult).
+ viii. If done is true, then
+ 1. Let value be ? IteratorValue(innerReturnResult).
+ 2. Return Completion{[[Type]]: return, [[Value]]: value,
+ [[Target]]: empty}.
+ ix. Let received be GeneratorYield(innerResult).
+
+ %AsyncFromSyncIteratorPrototype%.return ( value )
+
+ 5. Let return be GetMethod(syncIterator, "return").
+ ...
+ ...
+ 8. Let returnResult be Call(return, syncIterator, « value »).
+ ...
+ 11. Let returnValue be IteratorValue(returnResult).
+ ..
+ 13. Let returnDone be IteratorComplete(returnResult).
+ ...
+ 16. Perform ! Call(valueWrapperCapability.[[Resolve]], undefined, « returnValue »).
+ ...
+ 18. Set onFulfilled.[[Done]] to returnDone.
+ 19. Perform ! PerformPromiseThen(valueWrapperCapability.[[Promise]],
+ onFulfilled, undefined, promiseCapability).
+ ...
+
+---*/
+var log = [];
+var obj = {
+ [Symbol.iterator]() {
+ var returnCount = 0;
+ return {
+ name: "syncIterator",
+ get next() {
+ log.push({ name: "get next" });
+ return function() {
+ return {
+ value: "next-value-1",
+ done: false
+ };
+ };
+ },
+ get return() {
+ log.push({
+ name: "get return",
+ thisValue: this
+ });
+ return function() {
+ log.push({
+ name: "call return",
+ thisValue: this,
+ args: [...arguments]
+ });
+
+ returnCount++;
+ if (returnCount == 1) {
+ return {
+ name: "return-result-1",
+ get value() {
+ log.push({
+ name: "get return value (1)",
+ thisValue: this
+ });
+ return "return-value-1";
+ },
+ get done() {
+ log.push({
+ name: "get return done (1)",
+ thisValue: this
+ });
+ return false;
+ }
+ };
+ }
+
+ return {
+ name: "return-result-2",
+ get value() {
+ log.push({
+ name: "get return value (2)",
+ thisValue: this
+ });
+ return "return-value-2";
+ },
+ get done() {
+ log.push({
+ name: "get return done (2)",
+ thisValue: this
+ });
+ return true;
+ }
+ };
+ };
+ }
+ };
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ static async *#gen() {
+ callCount += 1;
+ log.push({ name: "before yield*" });
+ yield* obj;
+
+ }
+ static get gen() { return this.#gen; }
+}
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+
+var iter = C.gen();
+
+assert.sameValue(log.length, 0, "log.length");
+
+iter.next().then(v => {
+ assert.sameValue(log[0].name, "before yield*");
+
+ assert.sameValue(log[1].name, "get next");
+
+ assert.sameValue(v.value, "next-value-1");
+ assert.sameValue(v.done, false);
+
+ assert.sameValue(log.length, 2, "log.length");
+
+ iter.return("return-arg-1").then(v => {
+ assert.sameValue(log[2].name, "get return");
+ assert.sameValue(log[2].thisValue.name, "syncIterator", "get return thisValue");
+
+ assert.sameValue(log[3].name, "call return");
+ assert.sameValue(log[3].thisValue.name, "syncIterator", "return thisValue");
+ assert.sameValue(log[3].args.length, 1, "return args.length");
+ assert.sameValue(log[3].args[0], "return-arg-1", "return args[0]");
+
+ assert.sameValue(log[4].name, "get return done (1)");
+ assert.sameValue(log[4].thisValue.name, "return-result-1", "get return done thisValue");
+
+ assert.sameValue(log[5].name, "get return value (1)");
+ assert.sameValue(log[5].thisValue.name, "return-result-1", "get return value thisValue");
+
+ assert.sameValue(v.value, "return-value-1");
+ assert.sameValue(v.done, false);
+
+ assert.sameValue(log.length, 6, "log.length");
+
+ iter.return().then(v => {
+ assert.sameValue(log[6].name, "get return");
+ assert.sameValue(log[6].thisValue.name, "syncIterator", "get return thisValue");
+
+ assert.sameValue(log[7].name, "call return");
+ assert.sameValue(log[7].thisValue.name, "syncIterator", "get return thisValue");
+ assert.sameValue(log[7].args.length, 1, "return args.length");
+ assert.sameValue(log[7].args[0], undefined, "return args[0]");
+
+ assert.sameValue(log[8].name, "get return done (2)");
+ assert.sameValue(log[8].thisValue.name, "return-result-2", "get return done thisValue");
+
+ assert.sameValue(log[9].name, "get return value (2)");
+ assert.sameValue(log[9].thisValue.name, "return-result-2", "get return value thisValue");
+
+ assert.sameValue(v.value, "return-value-2");
+ assert.sameValue(v.done, true);
+
+ assert.sameValue(log.length, 10, "log.length");
+ }).then($DONE, $DONE);
+ }).catch($DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-sync-throw.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-sync-throw.js
new file mode 100644
index 0000000000..dfb64cf844
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method-static/yield-star-sync-throw.js
@@ -0,0 +1,231 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-sync-throw.case
+// - src/async-generators/default/async-class-decl-static-private-method.template
+/*---
+description: execution order for yield* with sync iterator and throw() (Static async generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, async-iteration, class-static-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+
+ ...
+ 6. Repeat
+ ...
+ b. Else if received.[[Type]] is throw, then
+ i. Let throw be ? GetMethod(iterator, "throw").
+ ii. If throw is not undefined, then
+ 1. Let innerResult be ? Call(throw, iterator, « received.[[Value]] »).
+ 2. If generatorKind is async, then set innerResult to
+ ? Await(innerResult).
+ ...
+ 5. Let done be ? IteratorComplete(innerResult).
+ 6. If done is true, then
+ a. Return ? IteratorValue(innerResult).
+ 7. Let received be GeneratorYield(innerResult).
+ ...
+
+ %AsyncFromSyncIteratorPrototype%.throw ( value )
+
+ ...
+ 5. Let throw be GetMethod(syncIterator, "throw").
+ ...
+ 8. Let throwResult be Call(throw, syncIterator, « value »).
+ ...
+ 11. Let throwValue be IteratorValue(throwResult).
+ ...
+ 13. Let throwDone be IteratorComplete(throwResult).
+ ...
+ 16. Perform ! Call(valueWrapperCapability.[[Resolve]], undefined,
+ « throwValue »).
+ ...
+ 18. Set onFulfilled.[[Done]] to throwDone.
+ 19. Perform ! PerformPromiseThen(valueWrapperCapability.[[Promise]],
+ onFulfilled, undefined, promiseCapability).
+ ...
+
+---*/
+var log = [];
+var obj = {
+ [Symbol.iterator]() {
+ var throwCount = 0;
+ return {
+ name: "syncIterator",
+ get next() {
+ log.push({ name: "get next" });
+ return function() {
+ return {
+ value: "next-value-1",
+ done: false
+ };
+ };
+ },
+ get throw() {
+ log.push({
+ name: "get throw",
+ thisValue: this
+ });
+ return function() {
+ log.push({
+ name: "call throw",
+ thisValue: this,
+ args: [...arguments]
+ });
+
+ throwCount++;
+ if (throwCount == 1) {
+ return {
+ name: "throw-result-1",
+ get value() {
+ log.push({
+ name: "get throw value (1)",
+ thisValue: this
+ });
+ return "throw-value-1";
+ },
+ get done() {
+ log.push({
+ name: "get throw done (1)",
+ thisValue: this
+ });
+ return false;
+ }
+ };
+ }
+
+ return {
+ name: "throw-result-2",
+ get value() {
+ log.push({
+ name: "get throw value (2)",
+ thisValue: this
+ });
+ return "throw-value-2";
+ },
+ get done() {
+ log.push({
+ name: "get throw done (2)",
+ thisValue: this
+ });
+ return true;
+ }
+ };
+ };
+ }
+ };
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ static async *#gen() {
+ callCount += 1;
+ log.push({ name: "before yield*" });
+ var v = yield* obj;
+ log.push({
+ name: "after yield*",
+ value: v
+ });
+ return "return-value";
+
+ }
+ static get gen() { return this.#gen; }
+}
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+
+var iter = C.gen();
+
+assert.sameValue(log.length, 0, "log.length");
+
+iter.next().then(v => {
+ assert.sameValue(log[0].name, "before yield*");
+
+ assert.sameValue(log[1].name, "get next");
+
+ assert.sameValue(v.value, "next-value-1");
+ assert.sameValue(v.done, false);
+
+ assert.sameValue(log.length, 2, "log.length");
+
+ iter.throw("throw-arg-1").then(v => {
+ assert.sameValue(log[2].name, "get throw");
+ assert.sameValue(log[2].thisValue.name, "syncIterator", "get throw thisValue");
+
+ assert.sameValue(log[3].name, "call throw");
+ assert.sameValue(log[3].thisValue.name, "syncIterator", "throw thisValue");
+ assert.sameValue(log[3].args.length, 1, "throw args.length");
+ assert.sameValue(log[3].args[0], "throw-arg-1", "throw args[0]");
+
+ assert.sameValue(log[4].name, "get throw done (1)");
+ assert.sameValue(log[4].thisValue.name, "throw-result-1", "get throw done thisValue");
+
+ assert.sameValue(log[5].name, "get throw value (1)");
+ assert.sameValue(log[5].thisValue.name, "throw-result-1", "get throw value thisValue");
+
+ assert.sameValue(v.value, "throw-value-1");
+ assert.sameValue(v.done, false);
+
+ assert.sameValue(log.length, 6, "log.length");
+
+ iter.throw().then(v => {
+ assert.sameValue(log[6].name, "get throw");
+ assert.sameValue(log[6].thisValue.name, "syncIterator", "get throw thisValue");
+
+ assert.sameValue(log[7].name, "call throw");
+ assert.sameValue(log[7].thisValue.name, "syncIterator", "throw thisValue");
+ assert.sameValue(log[7].args.length, 1, "throw args.length");
+ assert.sameValue(log[7].args[0], undefined, "throw args[0]");
+
+ assert.sameValue(log[8].name, "get throw done (2)");
+ assert.sameValue(log[8].thisValue.name, "throw-result-2", "get throw done thisValue");
+
+ assert.sameValue(log[9].name, "get throw value (2)");
+ assert.sameValue(log[9].thisValue.name, "throw-result-2", "get throw value thisValue");
+
+ assert.sameValue(log[10].name, "after yield*");
+ assert.sameValue(log[10].value, "throw-value-2");
+
+ assert.sameValue(v.value, "return-value");
+ assert.sameValue(v.done, true);
+
+ assert.sameValue(log.length, 11, "log.length");
+ }).then($DONE, $DONE);
+ }).catch($DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/await-as-binding-identifier-escaped.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/await-as-binding-identifier-escaped.js
new file mode 100644
index 0000000000..9e78aaed3e
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/await-as-binding-identifier-escaped.js
@@ -0,0 +1,37 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/async-generators/await-as-binding-identifier-escaped.case
+// - src/async-generators/syntax/async-class-decl-private-method.template
+/*---
+description: await is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Async Generator private method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorMethod
+features: [async-iteration, class-methods-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * # PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ BindingIdentifier : Identifier
+
+ It is a Syntax Error if this production has a [Await] parameter and
+ StringValue of Identifier is "await".
+
+---*/
+$DONOTEVALUATE();
+
+
+class C { async *#gen() {
+ var \u0061wait;
+}}
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/await-as-binding-identifier.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/await-as-binding-identifier.js
new file mode 100644
index 0000000000..1e8be0a40c
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/await-as-binding-identifier.js
@@ -0,0 +1,37 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/async-generators/await-as-binding-identifier.case
+// - src/async-generators/syntax/async-class-decl-private-method.template
+/*---
+description: await is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Async Generator private method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorMethod
+features: [async-iteration, class-methods-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * # PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ BindingIdentifier : Identifier
+
+ It is a Syntax Error if this production has a [Await] parameter and
+ StringValue of Identifier is "await".
+
+---*/
+$DONOTEVALUATE();
+
+
+class C { async *#gen() {
+ var await;
+}}
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/await-as-identifier-reference-escaped.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/await-as-identifier-reference-escaped.js
new file mode 100644
index 0000000000..3946d6a560
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/await-as-identifier-reference-escaped.js
@@ -0,0 +1,37 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/async-generators/await-as-identifier-reference-escaped.case
+// - src/async-generators/syntax/async-class-decl-private-method.template
+/*---
+description: await is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Async Generator private method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorMethod
+features: [async-iteration, class-methods-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * # PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ IdentifierReference : Identifier
+
+ It is a Syntax Error if this production has a [Await] parameter and
+ StringValue of Identifier is "await".
+
+---*/
+$DONOTEVALUATE();
+
+
+class C { async *#gen() {
+ void \u0061wait;
+}}
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/await-as-identifier-reference.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/await-as-identifier-reference.js
new file mode 100644
index 0000000000..7eab728df7
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/await-as-identifier-reference.js
@@ -0,0 +1,37 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/async-generators/await-as-identifier-reference.case
+// - src/async-generators/syntax/async-class-decl-private-method.template
+/*---
+description: await is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Async Generator private method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorMethod
+features: [async-iteration, class-methods-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * # PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ IdentifierReference : Identifier
+
+ It is a Syntax Error if this production has a [Await] parameter and
+ StringValue of Identifier is "await".
+
+---*/
+$DONOTEVALUATE();
+
+
+class C { async *#gen() {
+ void await;
+}}
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/await-as-label-identifier-escaped.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/await-as-label-identifier-escaped.js
new file mode 100644
index 0000000000..94641fd63d
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/await-as-label-identifier-escaped.js
@@ -0,0 +1,37 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/async-generators/await-as-label-identifier-escaped.case
+// - src/async-generators/syntax/async-class-decl-private-method.template
+/*---
+description: await is a reserved keyword within generator function bodies and may not be used as a label identifier. (Async Generator private method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorMethod
+features: [async-iteration, class-methods-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * # PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ LabelIdentifier : Identifier
+
+ It is a Syntax Error if this production has a [Await] parameter and
+ StringValue of Identifier is "await".
+
+---*/
+$DONOTEVALUATE();
+
+
+class C { async *#gen() {
+ \u0061wait: ;
+}}
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/await-as-label-identifier.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/await-as-label-identifier.js
new file mode 100644
index 0000000000..5af287c972
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/await-as-label-identifier.js
@@ -0,0 +1,37 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/async-generators/await-as-label-identifier.case
+// - src/async-generators/syntax/async-class-decl-private-method.template
+/*---
+description: await is a reserved keyword within generator function bodies and may not be used as a label identifier. (Async Generator private method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorMethod
+features: [async-iteration, class-methods-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * # PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ LabelIdentifier : Identifier
+
+ It is a Syntax Error if this production has a [Await] parameter and
+ StringValue of Identifier is "await".
+
+---*/
+$DONOTEVALUATE();
+
+
+class C { async *#gen() {
+ await: ;
+}}
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/browser.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/browser.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/browser.js
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/shell.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/shell.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/shell.js
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-as-binding-identifier-escaped.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-as-binding-identifier-escaped.js
new file mode 100644
index 0000000000..589fa48c4e
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-as-binding-identifier-escaped.js
@@ -0,0 +1,37 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-as-binding-identifier-escaped.case
+// - src/async-generators/syntax/async-class-decl-private-method.template
+/*---
+description: yield is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Async Generator private method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorMethod
+features: [async-iteration, class-methods-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * # PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ BindingIdentifier : Identifier
+
+ It is a Syntax Error if this production has a [Yield] parameter and
+ StringValue of Identifier is "yield".
+
+---*/
+$DONOTEVALUATE();
+
+
+class C { async *#gen() {
+ var yi\u0065ld;
+}}
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-as-binding-identifier.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-as-binding-identifier.js
new file mode 100644
index 0000000000..27697e049c
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-as-binding-identifier.js
@@ -0,0 +1,37 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-as-binding-identifier.case
+// - src/async-generators/syntax/async-class-decl-private-method.template
+/*---
+description: yield is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Async Generator private method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorMethod
+features: [async-iteration, class-methods-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * # PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ BindingIdentifier : Identifier
+
+ It is a Syntax Error if this production has a [Yield] parameter and
+ StringValue of Identifier is "yield".
+
+---*/
+$DONOTEVALUATE();
+
+
+class C { async *#gen() {
+ var yield;
+}}
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-as-identifier-reference-escaped.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-as-identifier-reference-escaped.js
new file mode 100644
index 0000000000..d67ee05eb5
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-as-identifier-reference-escaped.js
@@ -0,0 +1,37 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-as-identifier-reference-escaped.case
+// - src/async-generators/syntax/async-class-decl-private-method.template
+/*---
+description: yield is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Async Generator private method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorMethod
+features: [async-iteration, class-methods-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * # PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ IdentifierReference : Identifier
+
+ It is a Syntax Error if this production has a [Yield] parameter and
+ StringValue of Identifier is "yield".
+
+---*/
+$DONOTEVALUATE();
+
+
+class C { async *#gen() {
+ void yi\u0065ld;
+}}
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-as-identifier-reference.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-as-identifier-reference.js
new file mode 100644
index 0000000000..110db6d7e9
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-as-identifier-reference.js
@@ -0,0 +1,37 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-as-identifier-reference.case
+// - src/async-generators/syntax/async-class-decl-private-method.template
+/*---
+description: yield is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Async Generator private method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorMethod
+features: [async-iteration, class-methods-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * # PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ IdentifierReference : Identifier
+
+ It is a Syntax Error if this production has a [Yield] parameter and
+ StringValue of Identifier is "yield".
+
+---*/
+$DONOTEVALUATE();
+
+
+class C { async *#gen() {
+ void yield;
+}}
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-as-label-identifier-escaped.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-as-label-identifier-escaped.js
new file mode 100644
index 0000000000..6f91bff379
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-as-label-identifier-escaped.js
@@ -0,0 +1,37 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-as-label-identifier-escaped.case
+// - src/async-generators/syntax/async-class-decl-private-method.template
+/*---
+description: yield is a reserved keyword within generator function bodies and may not be used as a label identifier. (Async Generator private method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorMethod
+features: [async-iteration, class-methods-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * # PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ LabelIdentifier : Identifier
+
+ It is a Syntax Error if this production has a [Yield] parameter and
+ StringValue of Identifier is "yield".
+
+---*/
+$DONOTEVALUATE();
+
+
+class C { async *#gen() {
+ yi\u0065ld: ;
+}}
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-as-label-identifier.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-as-label-identifier.js
new file mode 100644
index 0000000000..a35f903c9c
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-as-label-identifier.js
@@ -0,0 +1,37 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-as-label-identifier.case
+// - src/async-generators/syntax/async-class-decl-private-method.template
+/*---
+description: yield is a reserved keyword within generator function bodies and may not be used as a label identifier. (Async Generator private method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorMethod
+features: [async-iteration, class-methods-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * # PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ LabelIdentifier : Identifier
+
+ It is a Syntax Error if this production has a [Yield] parameter and
+ StringValue of Identifier is "yield".
+
+---*/
+$DONOTEVALUATE();
+
+
+class C { async *#gen() {
+ yield: ;
+}}
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-identifier-spread-strict-strict.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-identifier-spread-strict-strict.js
new file mode 100644
index 0000000000..ae61f6aca5
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-identifier-spread-strict-strict.js
@@ -0,0 +1,86 @@
+// |reftest| error:SyntaxError
+'use strict';
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-identifier-spread-strict.case
+// - src/async-generators/default/async-class-decl-private-method.template
+/*---
+description: It's an early error if the AssignmentExpression is a function body with yield as an identifier in strict mode. (Async Generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [object-spread, async-iteration, class-methods-private]
+flags: [generated, onlyStrict]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ Spread Properties
+
+ PropertyDefinition[Yield]:
+ (...)
+ ...AssignmentExpression[In, ?Yield]
+
+---*/
+$DONOTEVALUATE();
+
+
+var callCount = 0;
+
+class C {
+ async *#gen() {
+ callCount += 1;
+ return {
+ ...(function() {
+ var yield;
+ throw new Test262Error();
+ }()),
+ }
+ }
+ get gen() { return this.#gen; }
+}
+
+const c = new C();
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
+
+var iter = c.gen();
+
+
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-identifier-strict-strict.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-identifier-strict-strict.js
new file mode 100644
index 0000000000..3f4c11a46a
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-identifier-strict-strict.js
@@ -0,0 +1,77 @@
+// |reftest| error:SyntaxError
+'use strict';
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-identifier-strict.case
+// - src/async-generators/default/async-class-decl-private-method.template
+/*---
+description: It's an early error if the generator body has another function body with yield as an identifier in strict mode. (Async Generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [async-iteration, class-methods-private]
+flags: [generated, onlyStrict]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+---*/
+$DONOTEVALUATE();
+
+
+var callCount = 0;
+
+class C {
+ async *#gen() {
+ callCount += 1;
+ (function() {
+ var yield;
+ throw new Test262Error();
+ }())
+ }
+ get gen() { return this.#gen; }
+}
+
+const c = new C();
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
+
+var iter = c.gen();
+
+
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-promise-reject-next-catch.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-promise-reject-next-catch.js
new file mode 100644
index 0000000000..8d8733af64
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-promise-reject-next-catch.js
@@ -0,0 +1,82 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-promise-reject-next-catch.case
+// - src/async-generators/default/async-class-decl-private-method.template
+/*---
+description: yield Promise.reject(value) is treated as throw value (Async Generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [async-iteration, class-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+---*/
+let error = new Error();
+
+
+var callCount = 0;
+
+class C {
+ async *#gen() {
+ callCount += 1;
+ yield Promise.reject(error);
+ yield "unreachable";
+ }
+ get gen() { return this.#gen; }
+}
+
+const c = new C();
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
+
+var iter = c.gen();
+
+iter.next().then(() => {
+ throw new Test262Error("Promise incorrectly resolved.");
+}).catch(rejectValue => {
+ // yield Promise.reject(error);
+ assert.sameValue(rejectValue, error);
+
+ iter.next().then(({done, value}) => {
+ // iter is closed now.
+ assert.sameValue(done, true, "The value of IteratorResult.done is `true`");
+ assert.sameValue(value, undefined, "The value of IteratorResult.value is `undefined`");
+ }).then($DONE, $DONE);
+});
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-promise-reject-next-for-await-of-async-iterator.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-promise-reject-next-for-await-of-async-iterator.js
new file mode 100644
index 0000000000..04582ff261
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-promise-reject-next-for-await-of-async-iterator.js
@@ -0,0 +1,88 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-promise-reject-next-for-await-of-async-iterator.case
+// - src/async-generators/default/async-class-decl-private-method.template
+/*---
+description: yield * [Promise.reject(value)] is treated as throw value (Async Generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [async-iteration, class-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+---*/
+let error = new Error();
+async function * readFile() {
+ yield Promise.reject(error);
+ yield "unreachable";
+}
+
+
+var callCount = 0;
+
+class C {
+ async *#gen() {
+ callCount += 1;
+ for await (let line of readFile()) {
+ yield line;
+ }
+ }
+ get gen() { return this.#gen; }
+}
+
+const c = new C();
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
+
+var iter = c.gen();
+
+iter.next().then(() => {
+ throw new Test262Error("Promise incorrectly resolved.");
+}, rejectValue => {
+
+ // yield Promise.reject(error);
+ assert.sameValue(rejectValue, error);
+
+ iter.next().then(({done, value}) => {
+ // iter is closed now.
+ assert.sameValue(done, true, "The value of IteratorResult.done is `true`");
+ assert.sameValue(value, undefined, "The value of IteratorResult.value is `undefined`");
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-promise-reject-next-for-await-of-sync-iterator.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-promise-reject-next-for-await-of-sync-iterator.js
new file mode 100644
index 0000000000..50f8910ce2
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-promise-reject-next-for-await-of-sync-iterator.js
@@ -0,0 +1,87 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-promise-reject-next-for-await-of-sync-iterator.case
+// - src/async-generators/default/async-class-decl-private-method.template
+/*---
+description: yield Promise.reject(value) in for-await-of is treated as throw value (Async Generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [async-iteration, class-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+---*/
+let error = new Error();
+let iterable = [
+ Promise.reject(error),
+ "unreachable"
+];
+
+
+var callCount = 0;
+
+class C {
+ async *#gen() {
+ callCount += 1;
+ for await (let value of iterable) {
+ yield value;
+ }
+ }
+ get gen() { return this.#gen; }
+}
+
+const c = new C();
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
+
+var iter = c.gen();
+
+iter.next().then(() => {
+ throw new Test262Error("Promise incorrectly resolved.");
+}, rejectValue => {
+ // yield Promise.reject(error);
+ assert.sameValue(rejectValue, error);
+
+ iter.next().then(({done, value}) => {
+ // iter is closed now.
+ assert.sameValue(done, true, "The value of IteratorResult.done is `true`");
+ assert.sameValue(value, undefined, "The value of IteratorResult.value is `undefined`");
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-promise-reject-next-yield-star-async-iterator.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-promise-reject-next-yield-star-async-iterator.js
new file mode 100644
index 0000000000..c169a9cfd1
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-promise-reject-next-yield-star-async-iterator.js
@@ -0,0 +1,86 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-promise-reject-next-yield-star-async-iterator.case
+// - src/async-generators/default/async-class-decl-private-method.template
+/*---
+description: yield * (async iterator) is treated as throw value (Async Generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [async-iteration, class-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+---*/
+let error = new Error();
+async function * readFile() {
+ yield Promise.reject(error);
+ yield "unreachable";
+}
+
+
+var callCount = 0;
+
+class C {
+ async *#gen() {
+ callCount += 1;
+ yield * readFile();
+
+ }
+ get gen() { return this.#gen; }
+}
+
+const c = new C();
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
+
+var iter = c.gen();
+
+iter.next().then(() => {
+ throw new Test262Error("Promise incorrectly resolved.");
+}, rejectValue => {
+ // yield Promise.reject(error);
+ assert.sameValue(rejectValue, error);
+
+ iter.next().then(({done, value}) => {
+ // iter is closed now.
+ assert.sameValue(done, true, "The value of IteratorResult.done is `true`");
+ assert.sameValue(value, undefined, "The value of IteratorResult.value is `undefined`");
+ }).then($DONE, $DONE);
+}, $DONE).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-promise-reject-next-yield-star-sync-iterator.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-promise-reject-next-yield-star-sync-iterator.js
new file mode 100644
index 0000000000..dab0435550
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-promise-reject-next-yield-star-sync-iterator.js
@@ -0,0 +1,85 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-promise-reject-next-yield-star-sync-iterator.case
+// - src/async-generators/default/async-class-decl-private-method.template
+/*---
+description: yield * (async iterator) is treated as throw value (Async Generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [async-iteration, class-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+---*/
+let error = new Error();
+let iterable = [
+ Promise.reject(error),
+ "unreachable"
+];
+
+
+var callCount = 0;
+
+class C {
+ async *#gen() {
+ callCount += 1;
+ yield * iterable;
+ }
+ get gen() { return this.#gen; }
+}
+
+const c = new C();
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
+
+var iter = c.gen();
+
+iter.next().then(() => {
+ throw new Test262Error("Promise incorrectly resolved.");
+}, rejectValue => {
+ // yield Promise.reject(error);
+ assert.sameValue(rejectValue, error);
+
+ iter.next().then(({done, value}) => {
+ // iter is closed now.
+ assert.sameValue(done, true, "The value of IteratorResult.done is `true`");
+ assert.sameValue(value, undefined, "The value of IteratorResult.value is `undefined`");
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-promise-reject-next.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-promise-reject-next.js
new file mode 100644
index 0000000000..8501934ec7
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-promise-reject-next.js
@@ -0,0 +1,82 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-promise-reject-next.case
+// - src/async-generators/default/async-class-decl-private-method.template
+/*---
+description: yield Promise.reject(value) is treated as throw value (Async Generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [async-iteration, class-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+---*/
+let error = new Error();
+
+
+var callCount = 0;
+
+class C {
+ async *#gen() {
+ callCount += 1;
+ yield Promise.reject(error);
+ yield "unreachable";
+ }
+ get gen() { return this.#gen; }
+}
+
+const c = new C();
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
+
+var iter = c.gen();
+
+iter.next().then(() => {
+ throw new Test262Error("Promise incorrectly resolved.");
+}, rejectValue => {
+ // yield Promise.reject(error);
+ assert.sameValue(rejectValue, error);
+
+ iter.next().then(({done, value}) => {
+ // iter is closed now.
+ assert.sameValue(done, true, "The value of IteratorResult.done is `true`");
+ assert.sameValue(value, undefined, "The value of IteratorResult.value is `undefined`");
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-spread-arr-multiple.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-spread-arr-multiple.js
new file mode 100644
index 0000000000..eaad1ac942
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-spread-arr-multiple.js
@@ -0,0 +1,88 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-spread-arr-multiple.case
+// - src/async-generators/default/async-class-decl-private-method.template
+/*---
+description: Use yield value in a array spread position (Async Generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [async-iteration, class-methods-private]
+flags: [generated, async]
+includes: [compareArray.js]
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ Array Initializer
+
+ SpreadElement[Yield, Await]:
+ ...AssignmentExpression[+In, ?Yield, ?Await]
+
+---*/
+var arr = ['a', 'b', 'c'];
+var item;
+
+
+var callCount = 0;
+
+class C {
+ async *#gen() {
+ callCount += 1;
+ yield [...yield yield];
+ }
+ get gen() { return this.#gen; }
+}
+
+const c = new C();
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
+
+var iter = c.gen();
+
+iter.next(false);
+item = iter.next(['a', 'b', 'c']);
+
+item.then(({ done, value }) => {
+ item = iter.next(value);
+
+ item.then(({ done, value }) => {
+ assert.compareArray(value, arr);
+ assert.sameValue(done, false);
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-spread-arr-single.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-spread-arr-single.js
new file mode 100644
index 0000000000..760230055e
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-spread-arr-single.js
@@ -0,0 +1,87 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-spread-arr-single.case
+// - src/async-generators/default/async-class-decl-private-method.template
+/*---
+description: Use yield value in a array spread position (Async Generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [async-iteration, class-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ Array Initializer
+
+ SpreadElement[Yield, Await]:
+ ...AssignmentExpression[+In, ?Yield, ?Await]
+
+---*/
+var arr = ['a', 'b', 'c'];
+
+
+var callCount = 0;
+
+class C {
+ async *#gen() {
+ callCount += 1;
+ yield [...yield];
+ }
+ get gen() { return this.#gen; }
+}
+
+const c = new C();
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
+
+var iter = c.gen();
+
+iter.next(false);
+var item = iter.next(arr);
+
+item.then(({ done, value }) => {
+ assert.notSameValue(value, arr, 'value is a new array');
+ assert(Array.isArray(value), 'value is an Array exotic object');
+ assert.sameValue(value.length, 3)
+ assert.sameValue(value[0], 'a');
+ assert.sameValue(value[1], 'b');
+ assert.sameValue(value[2], 'c');
+ assert.sameValue(done, false);
+}).then($DONE, $DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-spread-obj.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-spread-obj.js
new file mode 100644
index 0000000000..bb1db84550
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-spread-obj.js
@@ -0,0 +1,90 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-spread-obj.case
+// - src/async-generators/default/async-class-decl-private-method.template
+/*---
+description: Use yield value in a object spread position (Async Generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [object-spread, async-iteration, class-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ Spread Properties
+
+ PropertyDefinition[Yield]:
+ (...)
+ ...AssignmentExpression[In, ?Yield]
+
+---*/
+
+
+var callCount = 0;
+
+class C {
+ async *#gen() {
+ callCount += 1;
+ yield {
+ ...yield,
+ y: 1,
+ ...yield yield,
+ };
+ }
+ get gen() { return this.#gen; }
+}
+
+const c = new C();
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
+
+var iter = c.gen();
+
+iter.next();
+iter.next({ x: 42 });
+iter.next({ x: 'lol' });
+var item = iter.next({ y: 39 });
+
+item.then(({ done, value }) => {
+ assert.sameValue(value.x, 42);
+ assert.sameValue(value.y, 39);
+ assert.sameValue(Object.keys(value).length, 2);
+ assert.sameValue(done, false);
+}).then($DONE, $DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-async-next.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-async-next.js
new file mode 100644
index 0000000000..fa862ba92d
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-async-next.js
@@ -0,0 +1,257 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-async-next.case
+// - src/async-generators/default/async-class-decl-private-method.template
+/*---
+description: Execution order for yield* with async iterator and next() (Async Generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, async-iteration, Symbol.asyncIterator, class-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+
+---*/
+var log = [];
+var obj = {
+ get [Symbol.iterator]() {
+ log.push({ name: "get [Symbol.iterator]" });
+ },
+ get [Symbol.asyncIterator]() {
+ log.push({
+ name: "get [Symbol.asyncIterator]",
+ thisValue: this
+ });
+ return function() {
+ log.push({
+ name: "call [Symbol.asyncIterator]",
+ thisValue: this,
+ args: [...arguments]
+ });
+ var nextCount = 0;
+ return {
+ name: "asyncIterator",
+ get next() {
+ log.push({
+ name: "get next",
+ thisValue: this
+ });
+ return function() {
+ log.push({
+ name: "call next",
+ thisValue: this,
+ args: [...arguments]
+ });
+
+ nextCount++;
+ if (nextCount == 1) {
+ return {
+ name: "next-promise-1",
+ get then() {
+ log.push({
+ name: "get next then (1)",
+ thisValue: this
+ });
+ return function(resolve) {
+ log.push({
+ name: "call next then (1)",
+ thisValue: this,
+ args: [...arguments]
+ });
+
+ resolve({
+ name: "next-result-1",
+ get value() {
+ log.push({
+ name: "get next value (1)",
+ thisValue: this
+ });
+ return "next-value-1";
+ },
+ get done() {
+ log.push({
+ name: "get next done (1)",
+ thisValue: this
+ });
+ return false;
+ }
+ });
+ };
+ }
+ };
+ }
+
+ return {
+ name: "next-promise-2",
+ get then() {
+ log.push({
+ name: "get next then (2)",
+ thisValue: this
+ });
+ return function(resolve) {
+ log.push({
+ name: "call next then (2)",
+ thisValue: this,
+ args: [...arguments]
+ });
+
+ resolve({
+ name: "next-result-2",
+ get value() {
+ log.push({
+ name: "get next value (2)",
+ thisValue: this
+ });
+ return "next-value-2";
+ },
+ get done() {
+ log.push({
+ name: "get next done (2)",
+ thisValue: this
+ });
+ return true;
+ }
+ });
+ };
+ }
+ };
+ };
+ }
+ };
+ };
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ async *#gen() {
+ callCount += 1;
+ log.push({ name: "before yield*" });
+ var v = yield* obj;
+ log.push({
+ name: "after yield*",
+ value: v
+ });
+ return "return-value";
+
+ }
+ get gen() { return this.#gen; }
+}
+
+const c = new C();
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
+
+var iter = c.gen();
+
+assert.sameValue(log.length, 0, "log.length");
+
+iter.next("next-arg-1").then(v => {
+ assert.sameValue(log[0].name, "before yield*");
+
+ assert.sameValue(log[1].name, "get [Symbol.asyncIterator]");
+ assert.sameValue(log[1].thisValue, obj, "get [Symbol.asyncIterator] thisValue");
+
+ assert.sameValue(log[2].name, "call [Symbol.asyncIterator]");
+ assert.sameValue(log[2].thisValue, obj, "[Symbol.asyncIterator] thisValue");
+ assert.sameValue(log[2].args.length, 0, "[Symbol.asyncIterator] args.length");
+
+ assert.sameValue(log[3].name, "get next");
+ assert.sameValue(log[3].thisValue.name, "asyncIterator", "get next thisValue");
+
+ assert.sameValue(log[4].name, "call next");
+ assert.sameValue(log[4].thisValue.name, "asyncIterator", "next thisValue");
+ assert.sameValue(log[4].args.length, 1, "next args.length");
+ assert.sameValue(log[4].args[0], undefined, "next args[0]");
+
+ assert.sameValue(log[5].name, "get next then (1)");
+ assert.sameValue(log[5].thisValue.name, "next-promise-1", "get next then thisValue");
+
+ assert.sameValue(log[6].name, "call next then (1)");
+ assert.sameValue(log[6].thisValue.name, "next-promise-1", "next then thisValue");
+ assert.sameValue(log[6].args.length, 2, "next then args.length");
+ assert.sameValue(typeof log[6].args[0], "function", "next then args[0]");
+ assert.sameValue(typeof log[6].args[1], "function", "next then args[1]");
+
+ assert.sameValue(log[7].name, "get next done (1)");
+ assert.sameValue(log[7].thisValue.name, "next-result-1", "get next done thisValue");
+
+ assert.sameValue(log[8].name, "get next value (1)");
+ assert.sameValue(log[8].thisValue.name, "next-result-1", "get next value thisValue");
+
+ assert.sameValue(v.value, "next-value-1");
+ assert.sameValue(v.done, false);
+
+ assert.sameValue(log.length, 9, "log.length");
+
+ iter.next("next-arg-2").then(v => {
+ assert.sameValue(log[9].name, "call next");
+ assert.sameValue(log[9].thisValue.name, "asyncIterator", "next thisValue");
+ assert.sameValue(log[9].args.length, 1, "next args.length");
+ assert.sameValue(log[9].args[0], "next-arg-2", "next args[0]");
+
+ assert.sameValue(log[10].name, "get next then (2)");
+ assert.sameValue(log[10].thisValue.name, "next-promise-2", "get next then thisValue");
+
+ assert.sameValue(log[11].name, "call next then (2)");
+ assert.sameValue(log[11].thisValue.name, "next-promise-2", "next then thisValue");
+ assert.sameValue(log[11].args.length, 2, "next then args.length");
+ assert.sameValue(typeof log[11].args[0], "function", "next then args[0]");
+ assert.sameValue(typeof log[11].args[1], "function", "next then args[1]");
+
+ assert.sameValue(log[12].name, "get next done (2)");
+ assert.sameValue(log[12].thisValue.name, "next-result-2", "get next done thisValue");
+
+ assert.sameValue(log[13].name, "get next value (2)");
+ assert.sameValue(log[13].thisValue.name, "next-result-2", "get next value thisValue");
+
+ assert.sameValue(log[14].name, "after yield*");
+ assert.sameValue(log[14].value, "next-value-2");
+
+ assert.sameValue(v.value, "return-value");
+ assert.sameValue(v.done, true);
+
+ assert.sameValue(log.length, 15, "log.length");
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-async-return.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-async-return.js
new file mode 100644
index 0000000000..eb160aa548
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-async-return.js
@@ -0,0 +1,273 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-async-return.case
+// - src/async-generators/default/async-class-decl-private-method.template
+/*---
+description: execution order for yield* with async iterator and return() (Async Generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [async-iteration, Symbol.asyncIterator, class-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+
+ ...
+ 6. Repeat
+ ...
+ c. Else,
+ i. Assert: received.[[Type]] is return.
+ ii. Let return be ? GetMethod(iterator, "return").
+ iii. If return is undefined, return Completion(received).
+ iv. Let innerReturnResult be ? Call(return, iterator, « received.[[Value]] »).
+ v. If generatorKind is async, then set innerReturnResult to ? Await(innerReturnResult).
+ ...
+ vii. Let done be ? IteratorComplete(innerReturnResult).
+ viii. If done is true, then
+ 1. Let value be ? IteratorValue(innerReturnResult).
+ 2. If generatorKind is async, then set value to ? Await(value).
+ 3. Return Completion{[[Type]]: return, [[Value]]: value, [[Target]]: empty}.
+ ix. If generatorKind is async, then let received be AsyncGeneratorYield(? IteratorValue(innerResult)).
+ ...
+
+ AsyncGeneratorYield ( value )
+ ...
+ 8. Return ! AsyncGeneratorResolve(generator, value, false).
+ ...
+
+---*/
+var log = [];
+var obj = {
+ [Symbol.asyncIterator]() {
+ var returnCount = 0;
+ return {
+ name: 'asyncIterator',
+ get next() {
+ log.push({ name: "get next" });
+ return function() {
+ return {
+ value: "next-value-1",
+ done: false
+ };
+ };
+ },
+ get return() {
+ log.push({
+ name: "get return",
+ thisValue: this
+ });
+ return function() {
+ log.push({
+ name: "call return",
+ thisValue: this,
+ args: [...arguments]
+ });
+
+ returnCount++;
+ if (returnCount == 1) {
+ return {
+ name: "return-promise-1",
+ get then() {
+ log.push({
+ name: "get return then (1)",
+ thisValue: this
+ });
+ return function(resolve) {
+ log.push({
+ name: "call return then (1)",
+ thisValue: this,
+ args: [...arguments]
+ });
+
+ resolve({
+ name: "return-result-1",
+ get value() {
+ log.push({
+ name: "get return value (1)",
+ thisValue: this
+ });
+ return "return-value-1";
+ },
+ get done() {
+ log.push({
+ name: "get return done (1)",
+ thisValue: this
+ });
+ return false;
+ }
+ });
+ };
+ }
+ };
+ }
+
+ return {
+ name: "return-promise-2",
+ get then() {
+ log.push({
+ name: "get return then (2)",
+ thisValue: this
+ });
+ return function(resolve) {
+ log.push({
+ name: "call return then (2)",
+ thisValue: this,
+ args: [...arguments]
+ });
+
+ resolve({
+ name: "return-result-2",
+ get value() {
+ log.push({
+ name: "get return value (2)",
+ thisValue: this
+ });
+ return "return-value-2";
+ },
+ get done() {
+ log.push({
+ name: "get return done (2)",
+ thisValue: this
+ });
+ return true;
+ }
+ });
+ };
+ }
+ };
+ };
+ }
+ };
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ async *#gen() {
+ callCount += 1;
+ log.push({ name: "before yield*" });
+ yield* obj;
+
+ }
+ get gen() { return this.#gen; }
+}
+
+const c = new C();
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
+
+var iter = c.gen();
+
+assert.sameValue(log.length, 0, "log.length");
+
+iter.next().then(v => {
+ assert.sameValue(log[0].name, "before yield*");
+
+ assert.sameValue(log[1].name, "get next");
+
+ assert.sameValue(v.value, "next-value-1");
+ assert.sameValue(v.done, false);
+
+ assert.sameValue(log.length, 2, "log.length");
+
+ iter.return("return-arg-1").then(v => {
+ assert.sameValue(log[2].name, "get return");
+ assert.sameValue(log[2].thisValue.name, "asyncIterator", "get return thisValue");
+
+ assert.sameValue(log[3].name, "call return");
+ assert.sameValue(log[3].thisValue.name, "asyncIterator", "return thisValue");
+ assert.sameValue(log[3].args.length, 1, "return args.length");
+ assert.sameValue(log[3].args[0], "return-arg-1", "return args[0]");
+
+ assert.sameValue(log[4].name, "get return then (1)");
+ assert.sameValue(log[4].thisValue.name, "return-promise-1", "get return then thisValue");
+
+ assert.sameValue(log[5].name, "call return then (1)");
+ assert.sameValue(log[5].thisValue.name, "return-promise-1", "return then thisValue");
+ assert.sameValue(log[5].args.length, 2, "return then args.length");
+ assert.sameValue(typeof log[5].args[0], "function", "return then args[0]");
+ assert.sameValue(typeof log[5].args[1], "function", "return then args[1]");
+
+ assert.sameValue(log[6].name, "get return done (1)");
+ assert.sameValue(log[6].thisValue.name, "return-result-1", "get return done thisValue");
+
+ assert.sameValue(log[7].name, "get return value (1)");
+ assert.sameValue(log[7].thisValue.name, "return-result-1", "get return value thisValue");
+
+ assert.sameValue(v.value, "return-value-1");
+ assert.sameValue(v.done, false);
+
+ assert.sameValue(log.length, 8, "log.length");
+
+ iter.return("return-arg-2").then(v => {
+ assert.sameValue(log[8].name, "get return");
+ assert.sameValue(log[8].thisValue.name, "asyncIterator", "get return thisValue");
+
+ assert.sameValue(log[9].name, "call return");
+ assert.sameValue(log[9].thisValue.name, "asyncIterator", "return thisValue");
+ assert.sameValue(log[9].args.length, 1, "return args.length");
+ assert.sameValue(log[9].args[0], "return-arg-2", "return args[0]");
+
+ assert.sameValue(log[10].name, "get return then (2)");
+ assert.sameValue(log[10].thisValue.name, "return-promise-2", "get return then thisValue");
+
+ assert.sameValue(log[11].name, "call return then (2)");
+ assert.sameValue(log[11].thisValue.name, "return-promise-2", "return then thisValue");
+ assert.sameValue(log[11].args.length, 2, "return then args.length");
+ assert.sameValue(typeof log[11].args[0], "function", "return then args[0]");
+ assert.sameValue(typeof log[11].args[1], "function", "return then args[1]");
+
+ assert.sameValue(log[12].name, "get return done (2)");
+ assert.sameValue(log[12].thisValue.name, "return-result-2", "get return done thisValue");
+
+ assert.sameValue(log[13].name, "get return value (2)");
+ assert.sameValue(log[13].thisValue.name, "return-result-2", "get return value thisValue");
+
+ assert.sameValue(v.value, "return-value-2");
+ assert.sameValue(v.done, true);
+
+ assert.sameValue(log.length, 14, "log.length");
+ }).then($DONE, $DONE);
+ }).catch($DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-async-throw.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-async-throw.js
new file mode 100644
index 0000000000..96ff255a2b
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-async-throw.js
@@ -0,0 +1,281 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-async-throw.case
+// - src/async-generators/default/async-class-decl-private-method.template
+/*---
+description: execution order for yield* with async iterator and throw() (Async Generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [async-iteration, Symbol.asyncIterator, class-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+
+ ...
+ 6. Repeat
+ ...
+ b. Else if received.[[Type]] is throw, then
+ i. Let throw be ? GetMethod(iterator, "throw").
+ ii. If throw is not undefined, then
+ 1. Let innerResult be ? Call(throw, iterator, « received.[[Value]] »).
+ 2. If generatorKind is async, then set innerResult to ? Await(innerResult).
+ ...
+ 5. Let done be ? IteratorComplete(innerResult).
+ 6. If done is true, then
+ a. Let resultValue be Return ? IteratorValue(innerResult).
+ b. If generatorKind is async, then set resultValue to ? Await(resultValue).
+ c. Return resultValue.
+ 7. If generatorKind is async, then let received be AsyncGeneratorYield(? IteratorValue(innerResult)).
+ ...
+
+ AsyncGeneratorYield ( value )
+
+ ...
+ 8. Return ! AsyncGeneratorResolve(generator, value, false).
+ ...
+
+---*/
+var log = [];
+var obj = {
+ [Symbol.asyncIterator]() {
+ var throwCount = 0;
+ return {
+ name: "asyncIterator",
+ get next() {
+ log.push({ name: "get next" });
+ return function() {
+ return {
+ value: "next-value-1",
+ done: false
+ };
+ };
+ },
+ get throw() {
+ log.push({
+ name: "get throw",
+ thisValue: this
+ });
+ return function() {
+ log.push({
+ name: "call throw",
+ thisValue: this,
+ args: [...arguments]
+ });
+
+ throwCount++;
+ if (throwCount == 1) {
+ return {
+ name: "throw-promise-1",
+ get then() {
+ log.push({
+ name: "get throw then (1)",
+ thisValue: this
+ });
+ return function(resolve) {
+ log.push({
+ name: "call throw then (1)",
+ thisValue: this,
+ args: [...arguments]
+ });
+
+ resolve({
+ name: "throw-result-1",
+ get value() {
+ log.push({
+ name: "get throw value (1)",
+ thisValue: this
+ });
+ return "throw-value-1";
+ },
+ get done() {
+ log.push({
+ name: "get throw done (1)",
+ thisValue: this
+ });
+ return false;
+ }
+ });
+ };
+ }
+ };
+ }
+
+ return {
+ name: "throw-promise-2",
+ get then() {
+ log.push({
+ name: "get throw then (2)",
+ thisValue: this
+ });
+ return function(resolve) {
+ log.push({
+ name: "call throw then (2)",
+ thisValue: this,
+ args: [...arguments]
+ });
+
+ resolve({
+ name: "throw-result-2",
+ get value() {
+ log.push({
+ name: "get throw value (2)",
+ thisValue: this
+ });
+ return "throw-value-2";
+ },
+ get done() {
+ log.push({
+ name: "get throw done (2)",
+ thisValue: this
+ });
+ return true;
+ }
+ });
+ };
+ }
+ };
+ };
+ }
+ };
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ async *#gen() {
+ callCount += 1;
+ log.push({ name: "before yield*" });
+ var v = yield* obj;
+ log.push({
+ name: "after yield*",
+ value: v
+ });
+ return "return-value";
+
+ }
+ get gen() { return this.#gen; }
+}
+
+const c = new C();
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
+
+var iter = c.gen();
+
+assert.sameValue(log.length, 0, "log.length");
+
+iter.next().then(v => {
+ assert.sameValue(log[0].name, "before yield*");
+
+ assert.sameValue(log[1].name, "get next");
+
+ assert.sameValue(v.value, "next-value-1");
+ assert.sameValue(v.done, false);
+
+ assert.sameValue(log.length, 2, "log.length");
+
+ iter.throw("throw-arg-1").then(v => {
+ assert.sameValue(log[2].name, "get throw");
+ assert.sameValue(log[2].thisValue.name, "asyncIterator", "get throw thisValue");
+
+ assert.sameValue(log[3].name, "call throw");
+ assert.sameValue(log[3].thisValue.name, "asyncIterator", "throw thisValue");
+ assert.sameValue(log[3].args.length, 1, "throw args.length");
+ assert.sameValue(log[3].args[0], "throw-arg-1", "throw args[0]");
+
+ assert.sameValue(log[4].name, "get throw then (1)");
+ assert.sameValue(log[4].thisValue.name, "throw-promise-1", "get throw thisValue");
+
+ assert.sameValue(log[5].name, "call throw then (1)");
+ assert.sameValue(log[5].thisValue.name, "throw-promise-1", "throw thisValue");
+ assert.sameValue(log[5].args.length, 2, "throw then args.length");
+ assert.sameValue(typeof log[5].args[0], "function", "throw then args[0]");
+ assert.sameValue(typeof log[5].args[1], "function", "throw then args[1]");
+
+ assert.sameValue(log[6].name, "get throw done (1)");
+ assert.sameValue(log[6].thisValue.name, "throw-result-1", "get throw done thisValue");
+
+ assert.sameValue(log[7].name, "get throw value (1)");
+ assert.sameValue(log[7].thisValue.name, "throw-result-1", "get throw value thisValue");
+
+ assert.sameValue(v.value, "throw-value-1");
+ assert.sameValue(v.done, false);
+
+ assert.sameValue(log.length, 8, "log.length");
+
+ iter.throw("throw-arg-2").then(v => {
+ assert.sameValue(log[8].name, "get throw");
+ assert.sameValue(log[8].thisValue.name, "asyncIterator", "get throw thisValue");
+
+ assert.sameValue(log[9].name, "call throw");
+ assert.sameValue(log[9].thisValue.name, "asyncIterator", "throw thisValue");
+ assert.sameValue(log[9].args.length, 1, "throw args.length");
+ assert.sameValue(log[9].args[0], "throw-arg-2", "throw args[0]");
+
+ assert.sameValue(log[10].name, "get throw then (2)");
+ assert.sameValue(log[10].thisValue.name, "throw-promise-2", "get throw thisValue");
+
+ assert.sameValue(log[11].name, "call throw then (2)");
+ assert.sameValue(log[11].thisValue.name, "throw-promise-2", "throw thisValue");
+ assert.sameValue(log[11].args.length, 2, "throw then args.length");
+ assert.sameValue(typeof log[11].args[0], "function", "throw then args[0]");
+ assert.sameValue(typeof log[11].args[1], "function", "throw then args[1]");
+
+ assert.sameValue(log[12].name, "get throw done (2)");
+ assert.sameValue(log[12].thisValue.name, "throw-result-2", "get throw done thisValue");
+
+ assert.sameValue(log[13].name, "get throw value (2)");
+ assert.sameValue(log[13].thisValue.name, "throw-result-2", "get throw value thisValue");
+
+ assert.sameValue(log[14].name, "after yield*");
+ assert.sameValue(log[14].value, "throw-value-2");
+
+ assert.sameValue(v.value, "return-value");
+ assert.sameValue(v.done, true);
+
+ assert.sameValue(log.length, 15, "log.length");
+ }).then($DONE, $DONE);
+ }).catch($DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-expr-abrupt.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-expr-abrupt.js
new file mode 100644
index 0000000000..91d08ffc93
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-expr-abrupt.js
@@ -0,0 +1,92 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-expr-abrupt.case
+// - src/async-generators/default/async-class-decl-private-method.template
+/*---
+description: Abrupt completion while getting yield* operand (Async Generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [async-iteration, class-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+
+ 1. Let exprRef be the result of evaluating AssignmentExpression.
+ 2. Let value be ? GetValue(exprRef).
+ ...
+
+---*/
+var obj = {};
+var abrupt = function() {
+ throw obj;
+};
+
+
+
+var callCount = 0;
+
+class C {
+ async *#gen() {
+ callCount += 1;
+ yield* abrupt();
+ throw new Test262Error('abrupt completion closes iter');
+
+ }
+ get gen() { return this.#gen; }
+}
+
+const c = new C();
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
+
+var iter = c.gen();
+
+iter.next().then(() => {
+ throw new Test262Error('Promise incorrectly fulfilled.');
+}, v => {
+ assert.sameValue(v, obj, "reject reason");
+
+ iter.next().then(({ done, value }) => {
+ assert.sameValue(done, true, 'the iterator is completed');
+ assert.sameValue(value, undefined, 'value is undefined');
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-get-abrupt.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-get-abrupt.js
new file mode 100644
index 0000000000..2b0d311b2e
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-get-abrupt.js
@@ -0,0 +1,112 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-getiter-async-get-abrupt.case
+// - src/async-generators/default/async-class-decl-private-method.template
+/*---
+description: Abrupt completion while getting [Symbol.asyncIterator] (Async Generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, Symbol.asyncIterator, async-iteration, class-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+
+ 1. Let exprRef be the result of evaluating AssignmentExpression.
+ 2. Let value be ? GetValue(exprRef).
+ 3. Let generatorKind be ! GetGeneratorKind().
+ 4. Let iterator be ? GetIterator(value, generatorKind).
+ ...
+
+ GetIterator ( obj [ , hint ] )
+
+ ...
+ 3. If hint is async,
+ a. Set method to ? GetMethod(obj, @@asyncIterator).
+ ...
+
+ GetMethod ( V, P )
+
+ ...
+ 2. Let func be ? GetV(V, P).
+ ...
+
+---*/
+var reason = {};
+var obj = {
+ get [Symbol.iterator]() {
+ throw new Test262Error('it should not get Symbol.iterator');
+ },
+ get [Symbol.asyncIterator]() {
+ throw reason;
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('abrupt completion closes iter');
+
+ }
+ get gen() { return this.#gen; }
+}
+
+const c = new C();
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
+
+var iter = c.gen();
+
+iter.next().then(() => {
+ throw new Test262Error('Promise incorrectly fulfilled.');
+}, v => {
+ assert.sameValue(v, reason, "reject reason");
+
+ iter.next().then(({ done, value }) => {
+ assert.sameValue(done, true, 'the iterator is completed');
+ assert.sameValue(value, undefined, 'value is undefined');
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-not-callable-boolean-throw.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-not-callable-boolean-throw.js
new file mode 100644
index 0000000000..b5a7b2a394
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-not-callable-boolean-throw.js
@@ -0,0 +1,111 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-getiter-async-not-callable-boolean-throw.case
+// - src/async-generators/default/async-class-decl-private-method.template
+/*---
+description: Throws a TypeError on a non-callable [Symbol.asyncIterator] (boolean) (Async Generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, Symbol.asyncIterator, async-iteration, class-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+
+ 1. Let exprRef be the result of evaluating AssignmentExpression.
+ 2. Let value be ? GetValue(exprRef).
+ 3. Let generatorKind be ! GetGeneratorKind().
+ 4. Let iterator be ? GetIterator(value, generatorKind).
+ ...
+
+ GetIterator ( obj [ , hint ] )
+
+ ...
+ 3. If hint is async,
+ a. Set method to ? GetMethod(obj, @@asyncIterator).
+ ...
+
+ GetMethod ( V, P )
+
+ ...
+ 2. Let func be ? GetV(V, P).
+ 3. If func is either undefined or null, return undefined.
+ 4. If IsCallable(func) is false, throw a TypeError exception.
+ ...
+
+---*/
+var obj = {
+ get [Symbol.iterator]() {
+ throw new Test262Error('it should not get Symbol.iterator');
+ },
+ [Symbol.asyncIterator]: false
+};
+
+
+
+var callCount = 0;
+
+class C {
+ async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('abrupt completion closes iter');
+
+ }
+ get gen() { return this.#gen; }
+}
+
+const c = new C();
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
+
+var iter = c.gen();
+
+iter.next().then(() => {
+ throw new Test262Error('Promise incorrectly fulfilled.');
+}, v => {
+ assert.sameValue(v.constructor, TypeError, "TypeError");
+
+ iter.next().then(({ done, value }) => {
+ assert.sameValue(done, true, 'the iterator is completed');
+ assert.sameValue(value, undefined, 'value is undefined');
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-not-callable-number-throw.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-not-callable-number-throw.js
new file mode 100644
index 0000000000..7bfc8e0dbf
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-not-callable-number-throw.js
@@ -0,0 +1,111 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-getiter-async-not-callable-number-throw.case
+// - src/async-generators/default/async-class-decl-private-method.template
+/*---
+description: Throws a TypeError on a non-callable [Symbol.asyncIterator] (number) (Async Generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, Symbol.asyncIterator, async-iteration, class-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+
+ 1. Let exprRef be the result of evaluating AssignmentExpression.
+ 2. Let value be ? GetValue(exprRef).
+ 3. Let generatorKind be ! GetGeneratorKind().
+ 4. Let iterator be ? GetIterator(value, generatorKind).
+ ...
+
+ GetIterator ( obj [ , hint ] )
+
+ ...
+ 3. If hint is async,
+ a. Set method to ? GetMethod(obj, @@asyncIterator).
+ ...
+
+ GetMethod ( V, P )
+
+ ...
+ 2. Let func be ? GetV(V, P).
+ 3. If func is either undefined or null, return undefined.
+ 4. If IsCallable(func) is false, throw a TypeError exception.
+ ...
+
+---*/
+var obj = {
+ get [Symbol.iterator]() {
+ throw new Test262Error('it should not get Symbol.iterator');
+ },
+ [Symbol.asyncIterator]: 0
+};
+
+
+
+var callCount = 0;
+
+class C {
+ async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('abrupt completion closes iter');
+
+ }
+ get gen() { return this.#gen; }
+}
+
+const c = new C();
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
+
+var iter = c.gen();
+
+iter.next().then(() => {
+ throw new Test262Error('Promise incorrectly fulfilled.');
+}, v => {
+ assert.sameValue(v.constructor, TypeError, "TypeError");
+
+ iter.next().then(({ done, value }) => {
+ assert.sameValue(done, true, 'the iterator is completed');
+ assert.sameValue(value, undefined, 'value is undefined');
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-not-callable-object-throw.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-not-callable-object-throw.js
new file mode 100644
index 0000000000..2bd00fd6a6
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-not-callable-object-throw.js
@@ -0,0 +1,111 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-getiter-async-not-callable-object-throw.case
+// - src/async-generators/default/async-class-decl-private-method.template
+/*---
+description: Throws a TypeError on a non-callable [Symbol.asyncIterator] (object) (Async Generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, Symbol.asyncIterator, async-iteration, class-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+
+ 1. Let exprRef be the result of evaluating AssignmentExpression.
+ 2. Let value be ? GetValue(exprRef).
+ 3. Let generatorKind be ! GetGeneratorKind().
+ 4. Let iterator be ? GetIterator(value, generatorKind).
+ ...
+
+ GetIterator ( obj [ , hint ] )
+
+ ...
+ 3. If hint is async,
+ a. Set method to ? GetMethod(obj, @@asyncIterator).
+ ...
+
+ GetMethod ( V, P )
+
+ ...
+ 2. Let func be ? GetV(V, P).
+ 3. If func is either undefined or null, return undefined.
+ 4. If IsCallable(func) is false, throw a TypeError exception.
+ ...
+
+---*/
+var obj = {
+ get [Symbol.iterator]() {
+ throw new Test262Error('it should not get Symbol.iterator');
+ },
+ [Symbol.asyncIterator]: {}
+};
+
+
+
+var callCount = 0;
+
+class C {
+ async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('abrupt completion closes iter');
+
+ }
+ get gen() { return this.#gen; }
+}
+
+const c = new C();
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
+
+var iter = c.gen();
+
+iter.next().then(() => {
+ throw new Test262Error('Promise incorrectly fulfilled.');
+}, v => {
+ assert.sameValue(v.constructor, TypeError, "TypeError");
+
+ iter.next().then(({ done, value }) => {
+ assert.sameValue(done, true, 'the iterator is completed');
+ assert.sameValue(value, undefined, 'value is undefined');
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-not-callable-string-throw.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-not-callable-string-throw.js
new file mode 100644
index 0000000000..077c8f6745
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-not-callable-string-throw.js
@@ -0,0 +1,111 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-getiter-async-not-callable-string-throw.case
+// - src/async-generators/default/async-class-decl-private-method.template
+/*---
+description: Throws a TypeError on a non-callable [Symbol.asyncIterator] (string) (Async Generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, Symbol.asyncIterator, async-iteration, class-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+
+ 1. Let exprRef be the result of evaluating AssignmentExpression.
+ 2. Let value be ? GetValue(exprRef).
+ 3. Let generatorKind be ! GetGeneratorKind().
+ 4. Let iterator be ? GetIterator(value, generatorKind).
+ ...
+
+ GetIterator ( obj [ , hint ] )
+
+ ...
+ 3. If hint is async,
+ a. Set method to ? GetMethod(obj, @@asyncIterator).
+ ...
+
+ GetMethod ( V, P )
+
+ ...
+ 2. Let func be ? GetV(V, P).
+ 3. If func is either undefined or null, return undefined.
+ 4. If IsCallable(func) is false, throw a TypeError exception.
+ ...
+
+---*/
+var obj = {
+ get [Symbol.iterator]() {
+ throw new Test262Error('it should not get Symbol.iterator');
+ },
+ [Symbol.asyncIterator]: ''
+};
+
+
+
+var callCount = 0;
+
+class C {
+ async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('abrupt completion closes iter');
+
+ }
+ get gen() { return this.#gen; }
+}
+
+const c = new C();
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
+
+var iter = c.gen();
+
+iter.next().then(() => {
+ throw new Test262Error('Promise incorrectly fulfilled.');
+}, v => {
+ assert.sameValue(v.constructor, TypeError, "TypeError");
+
+ iter.next().then(({ done, value }) => {
+ assert.sameValue(done, true, 'the iterator is completed');
+ assert.sameValue(value, undefined, 'value is undefined');
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-not-callable-symbol-throw.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-not-callable-symbol-throw.js
new file mode 100644
index 0000000000..443ac26876
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-not-callable-symbol-throw.js
@@ -0,0 +1,111 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-getiter-async-not-callable-symbol-throw.case
+// - src/async-generators/default/async-class-decl-private-method.template
+/*---
+description: Throws a TypeError on a non-callable [Symbol.asyncIterator] (symbol) (Async Generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, Symbol.asyncIterator, async-iteration, class-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+
+ 1. Let exprRef be the result of evaluating AssignmentExpression.
+ 2. Let value be ? GetValue(exprRef).
+ 3. Let generatorKind be ! GetGeneratorKind().
+ 4. Let iterator be ? GetIterator(value, generatorKind).
+ ...
+
+ GetIterator ( obj [ , hint ] )
+
+ ...
+ 3. If hint is async,
+ a. Set method to ? GetMethod(obj, @@asyncIterator).
+ ...
+
+ GetMethod ( V, P )
+
+ ...
+ 2. Let func be ? GetV(V, P).
+ 3. If func is either undefined or null, return undefined.
+ 4. If IsCallable(func) is false, throw a TypeError exception.
+ ...
+
+---*/
+var obj = {
+ get [Symbol.iterator]() {
+ throw new Test262Error('it should not get Symbol.iterator');
+ },
+ [Symbol.asyncIterator]: Symbol.asyncIterator
+};
+
+
+
+var callCount = 0;
+
+class C {
+ async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('abrupt completion closes iter');
+
+ }
+ get gen() { return this.#gen; }
+}
+
+const c = new C();
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
+
+var iter = c.gen();
+
+iter.next().then(() => {
+ throw new Test262Error('Promise incorrectly fulfilled.');
+}, v => {
+ assert.sameValue(v.constructor, TypeError, "TypeError");
+
+ iter.next().then(({ done, value }) => {
+ assert.sameValue(done, true, 'the iterator is completed');
+ assert.sameValue(value, undefined, 'value is undefined');
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-null-sync-get-abrupt.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-null-sync-get-abrupt.js
new file mode 100644
index 0000000000..e8b2f33c0e
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-null-sync-get-abrupt.js
@@ -0,0 +1,117 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-getiter-async-null-sync-get-abrupt.case
+// - src/async-generators/default/async-class-decl-private-method.template
+/*---
+description: Abrupt completion while getting @@iterator after null @@asyncIterator (Async Generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, Symbol.asyncIterator, async-iteration, class-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+
+ 1. Let exprRef be the result of evaluating AssignmentExpression.
+ 2. Let value be ? GetValue(exprRef).
+ 3. Let generatorKind be ! GetGeneratorKind().
+ 4. Let iterator be ? GetIterator(value, generatorKind).
+ ...
+
+ GetIterator ( obj [ , hint ] )
+
+ ...
+ 3. If hint is async,
+ a. Set method to ? GetMethod(obj, @@asyncIterator).
+ b. If method is undefined,
+ i. Let syncMethod be ? GetMethod(obj, @@iterator).
+ ...
+
+ GetMethod ( V, P )
+
+ ...
+ 2. Let func be ? GetV(V, P).
+ ...
+
+---*/
+var calls = 0;
+var reason = {};
+var obj = {
+ get [Symbol.iterator]() {
+ throw reason;
+ },
+ get [Symbol.asyncIterator]() {
+ calls += 1;
+ return null;
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('abrupt completion closes iter');
+
+ }
+ get gen() { return this.#gen; }
+}
+
+const c = new C();
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
+
+var iter = c.gen();
+
+iter.next().then(() => {
+ throw new Test262Error('Promise incorrectly fulfilled.');
+}, v => {
+ assert.sameValue(v, reason, 'reject reason');
+ assert.sameValue(calls, 1);
+
+ iter.next().then(({ done, value }) => {
+ assert.sameValue(done, true, 'the iterator is completed');
+ assert.sameValue(value, undefined, 'value is undefined');
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-returns-abrupt.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-returns-abrupt.js
new file mode 100644
index 0000000000..33db1241b7
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-returns-abrupt.js
@@ -0,0 +1,108 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-getiter-async-returns-abrupt.case
+// - src/async-generators/default/async-class-decl-private-method.template
+/*---
+description: Abrupt completion while calling [Symbol.asyncIterator] (Async Generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, Symbol.asyncIterator, async-iteration, class-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+
+ 1. Let exprRef be the result of evaluating AssignmentExpression.
+ 2. Let value be ? GetValue(exprRef).
+ 3. Let generatorKind be ! GetGeneratorKind().
+ 4. Let iterator be ? GetIterator(value, generatorKind).
+ ...
+
+ GetIterator ( obj [ , hint ] )
+
+ ...
+ 3. If hint is async,
+ a. Set method to ? GetMethod(obj, @@asyncIterator).
+ ...
+ 6. Let iterator be ? Call(method, obj).
+ ...
+
+---*/
+var reason = {};
+var obj = {
+ get [Symbol.iterator]() {
+ throw new Test262Error('it should not get Symbol.iterator');
+ },
+ [Symbol.asyncIterator]() {
+ throw reason;
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('abrupt completion closes iter');
+
+ }
+ get gen() { return this.#gen; }
+}
+
+const c = new C();
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
+
+var iter = c.gen();
+
+iter.next().then(() => {
+ throw new Test262Error('Promise incorrectly fulfilled.');
+}, v => {
+ assert.sameValue(v, reason, "reject reason");
+
+ iter.next().then(({ done, value }) => {
+ assert.sameValue(done, true, 'the iterator is completed');
+ assert.sameValue(value, undefined, 'value is undefined');
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-returns-boolean-throw.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-returns-boolean-throw.js
new file mode 100644
index 0000000000..4f38c21ac6
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-returns-boolean-throw.js
@@ -0,0 +1,108 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-getiter-async-returns-boolean-throw.case
+// - src/async-generators/default/async-class-decl-private-method.template
+/*---
+description: Non object returned by [Symbol.asyncIterator]() - boolean (Async Generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, Symbol.asyncIterator, async-iteration, class-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+
+ 1. Let exprRef be the result of evaluating AssignmentExpression.
+ 2. Let value be ? GetValue(exprRef).
+ 3. Let generatorKind be ! GetGeneratorKind().
+ 4. Let iterator be ? GetIterator(value, generatorKind).
+ ...
+
+ GetIterator ( obj [ , hint ] )
+
+ ...
+ 3. If hint is async,
+ a. Set method to ? GetMethod(obj, @@asyncIterator).
+ ...
+ 6. Let iterator be ? Call(method, obj).
+ 7. If Type(iterator) is not Object, throw a TypeError exception.
+ ...
+
+---*/
+var obj = {
+ get [Symbol.iterator]() {
+ throw new Test262Error('it should not get Symbol.iterator');
+ },
+ [Symbol.asyncIterator]() {
+ return true;
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('abrupt completion closes iter');
+
+ }
+ get gen() { return this.#gen; }
+}
+
+const c = new C();
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
+
+var iter = c.gen();
+
+iter.next().then(() => {
+ throw new Test262Error('Promise incorrectly fulfilled.');
+}, v => {
+ assert.sameValue(v.constructor, TypeError, "TypeError");
+
+ iter.next().then(({ done, value }) => {
+ assert.sameValue(done, true, 'the iterator is completed');
+ assert.sameValue(value, undefined, 'value is undefined');
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-returns-null-throw.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-returns-null-throw.js
new file mode 100644
index 0000000000..60af524617
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-returns-null-throw.js
@@ -0,0 +1,108 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-getiter-async-returns-null-throw.case
+// - src/async-generators/default/async-class-decl-private-method.template
+/*---
+description: Non object returned by [Symbol.asyncIterator]() - null (Async Generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, Symbol.asyncIterator, async-iteration, class-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+
+ 1. Let exprRef be the result of evaluating AssignmentExpression.
+ 2. Let value be ? GetValue(exprRef).
+ 3. Let generatorKind be ! GetGeneratorKind().
+ 4. Let iterator be ? GetIterator(value, generatorKind).
+ ...
+
+ GetIterator ( obj [ , hint ] )
+
+ ...
+ 3. If hint is async,
+ a. Set method to ? GetMethod(obj, @@asyncIterator).
+ ...
+ 6. Let iterator be ? Call(method, obj).
+ 7. If Type(iterator) is not Object, throw a TypeError exception.
+ ...
+
+---*/
+var obj = {
+ get [Symbol.iterator]() {
+ throw new Test262Error('it should not get Symbol.iterator');
+ },
+ [Symbol.asyncIterator]() {
+ return null;
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('abrupt completion closes iter');
+
+ }
+ get gen() { return this.#gen; }
+}
+
+const c = new C();
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
+
+var iter = c.gen();
+
+iter.next().then(() => {
+ throw new Test262Error('Promise incorrectly fulfilled.');
+}, v => {
+ assert.sameValue(v.constructor, TypeError, "TypeError");
+
+ iter.next().then(({ done, value }) => {
+ assert.sameValue(done, true, 'the iterator is completed');
+ assert.sameValue(value, undefined, 'value is undefined');
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-returns-number-throw.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-returns-number-throw.js
new file mode 100644
index 0000000000..3d8016897d
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-returns-number-throw.js
@@ -0,0 +1,108 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-getiter-async-returns-number-throw.case
+// - src/async-generators/default/async-class-decl-private-method.template
+/*---
+description: Non object returned by [Symbol.asyncIterator]() - number (Async Generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, Symbol.asyncIterator, async-iteration, class-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+
+ 1. Let exprRef be the result of evaluating AssignmentExpression.
+ 2. Let value be ? GetValue(exprRef).
+ 3. Let generatorKind be ! GetGeneratorKind().
+ 4. Let iterator be ? GetIterator(value, generatorKind).
+ ...
+
+ GetIterator ( obj [ , hint ] )
+
+ ...
+ 3. If hint is async,
+ a. Set method to ? GetMethod(obj, @@asyncIterator).
+ ...
+ 6. Let iterator be ? Call(method, obj).
+ 7. If Type(iterator) is not Object, throw a TypeError exception.
+ ...
+
+---*/
+var obj = {
+ get [Symbol.iterator]() {
+ throw new Test262Error('it should not get Symbol.iterator');
+ },
+ [Symbol.asyncIterator]() {
+ return 42;
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('abrupt completion closes iter');
+
+ }
+ get gen() { return this.#gen; }
+}
+
+const c = new C();
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
+
+var iter = c.gen();
+
+iter.next().then(() => {
+ throw new Test262Error('Promise incorrectly fulfilled.');
+}, v => {
+ assert.sameValue(v.constructor, TypeError, "TypeError");
+
+ iter.next().then(({ done, value }) => {
+ assert.sameValue(done, true, 'the iterator is completed');
+ assert.sameValue(value, undefined, 'value is undefined');
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-returns-string-throw.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-returns-string-throw.js
new file mode 100644
index 0000000000..a30b5f666d
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-returns-string-throw.js
@@ -0,0 +1,108 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-getiter-async-returns-string-throw.case
+// - src/async-generators/default/async-class-decl-private-method.template
+/*---
+description: Non object returned by [Symbol.asyncIterator]() - string (Async Generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, Symbol.asyncIterator, async-iteration, class-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+
+ 1. Let exprRef be the result of evaluating AssignmentExpression.
+ 2. Let value be ? GetValue(exprRef).
+ 3. Let generatorKind be ! GetGeneratorKind().
+ 4. Let iterator be ? GetIterator(value, generatorKind).
+ ...
+
+ GetIterator ( obj [ , hint ] )
+
+ ...
+ 3. If hint is async,
+ a. Set method to ? GetMethod(obj, @@asyncIterator).
+ ...
+ 6. Let iterator be ? Call(method, obj).
+ 7. If Type(iterator) is not Object, throw a TypeError exception.
+ ...
+
+---*/
+var obj = {
+ get [Symbol.iterator]() {
+ throw new Test262Error('it should not get Symbol.iterator');
+ },
+ [Symbol.asyncIterator]() {
+ return '42';
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('abrupt completion closes iter');
+
+ }
+ get gen() { return this.#gen; }
+}
+
+const c = new C();
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
+
+var iter = c.gen();
+
+iter.next().then(() => {
+ throw new Test262Error('Promise incorrectly fulfilled.');
+}, v => {
+ assert.sameValue(v.constructor, TypeError, "TypeError");
+
+ iter.next().then(({ done, value }) => {
+ assert.sameValue(done, true, 'the iterator is completed');
+ assert.sameValue(value, undefined, 'value is undefined');
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-returns-symbol-throw.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-returns-symbol-throw.js
new file mode 100644
index 0000000000..8f1f6b80f1
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-returns-symbol-throw.js
@@ -0,0 +1,108 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-getiter-async-returns-symbol-throw.case
+// - src/async-generators/default/async-class-decl-private-method.template
+/*---
+description: Non object returned by [Symbol.asyncIterator]() - symbol (Async Generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, Symbol.asyncIterator, async-iteration, class-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+
+ 1. Let exprRef be the result of evaluating AssignmentExpression.
+ 2. Let value be ? GetValue(exprRef).
+ 3. Let generatorKind be ! GetGeneratorKind().
+ 4. Let iterator be ? GetIterator(value, generatorKind).
+ ...
+
+ GetIterator ( obj [ , hint ] )
+
+ ...
+ 3. If hint is async,
+ a. Set method to ? GetMethod(obj, @@asyncIterator).
+ ...
+ 6. Let iterator be ? Call(method, obj).
+ 7. If Type(iterator) is not Object, throw a TypeError exception.
+ ...
+
+---*/
+var obj = {
+ get [Symbol.iterator]() {
+ throw new Test262Error('it should not get Symbol.iterator');
+ },
+ [Symbol.asyncIterator]() {
+ return Symbol.asyncIterator;
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('abrupt completion closes iter');
+
+ }
+ get gen() { return this.#gen; }
+}
+
+const c = new C();
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
+
+var iter = c.gen();
+
+iter.next().then(() => {
+ throw new Test262Error('Promise incorrectly fulfilled.');
+}, v => {
+ assert.sameValue(v.constructor, TypeError, "TypeError");
+
+ iter.next().then(({ done, value }) => {
+ assert.sameValue(done, true, 'the iterator is completed');
+ assert.sameValue(value, undefined, 'value is undefined');
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-returns-undefined-throw.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-returns-undefined-throw.js
new file mode 100644
index 0000000000..e7bc047cdf
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-returns-undefined-throw.js
@@ -0,0 +1,108 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-getiter-async-returns-undefined-throw.case
+// - src/async-generators/default/async-class-decl-private-method.template
+/*---
+description: Non object returned by [Symbol.asyncIterator]() - undefined (Async Generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, Symbol.asyncIterator, async-iteration, class-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+
+ 1. Let exprRef be the result of evaluating AssignmentExpression.
+ 2. Let value be ? GetValue(exprRef).
+ 3. Let generatorKind be ! GetGeneratorKind().
+ 4. Let iterator be ? GetIterator(value, generatorKind).
+ ...
+
+ GetIterator ( obj [ , hint ] )
+
+ ...
+ 3. If hint is async,
+ a. Set method to ? GetMethod(obj, @@asyncIterator).
+ ...
+ 6. Let iterator be ? Call(method, obj).
+ 7. If Type(iterator) is not Object, throw a TypeError exception.
+ ...
+
+---*/
+var obj = {
+ get [Symbol.iterator]() {
+ throw new Test262Error('it should not get Symbol.iterator');
+ },
+ [Symbol.asyncIterator]() {
+ return undefined;
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('abrupt completion closes iter');
+
+ }
+ get gen() { return this.#gen; }
+}
+
+const c = new C();
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
+
+var iter = c.gen();
+
+iter.next().then(() => {
+ throw new Test262Error('Promise incorrectly fulfilled.');
+}, v => {
+ assert.sameValue(v.constructor, TypeError, "TypeError");
+
+ iter.next().then(({ done, value }) => {
+ assert.sameValue(done, true, 'the iterator is completed');
+ assert.sameValue(value, undefined, 'value is undefined');
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-undefined-sync-get-abrupt.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-undefined-sync-get-abrupt.js
new file mode 100644
index 0000000000..4ac2e2c911
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-async-undefined-sync-get-abrupt.js
@@ -0,0 +1,117 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-getiter-async-undefined-sync-get-abrupt.case
+// - src/async-generators/default/async-class-decl-private-method.template
+/*---
+description: Abrupt completion while getting @@iterator after undefined @@asyncIterator (Async Generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, Symbol.asyncIterator, async-iteration, class-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+
+ 1. Let exprRef be the result of evaluating AssignmentExpression.
+ 2. Let value be ? GetValue(exprRef).
+ 3. Let generatorKind be ! GetGeneratorKind().
+ 4. Let iterator be ? GetIterator(value, generatorKind).
+ ...
+
+ GetIterator ( obj [ , hint ] )
+
+ ...
+ 3. If hint is async,
+ a. Set method to ? GetMethod(obj, @@asyncIterator).
+ b. If method is undefined,
+ i. Let syncMethod be ? GetMethod(obj, @@iterator).
+ ...
+
+ GetMethod ( V, P )
+
+ ...
+ 2. Let func be ? GetV(V, P).
+ ...
+
+---*/
+var calls = 0;
+var reason = {};
+var obj = {
+ get [Symbol.iterator]() {
+ throw reason;
+ },
+ get [Symbol.asyncIterator]() {
+ calls += 1;
+ return undefined;
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('abrupt completion closes iter');
+
+ }
+ get gen() { return this.#gen; }
+}
+
+const c = new C();
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
+
+var iter = c.gen();
+
+iter.next().then(() => {
+ throw new Test262Error('Promise incorrectly fulfilled.');
+}, v => {
+ assert.sameValue(v, reason, 'reject reason');
+ assert.sameValue(calls, 1);
+
+ iter.next().then(({ done, value }) => {
+ assert.sameValue(done, true, 'the iterator is completed');
+ assert.sameValue(value, undefined, 'value is undefined');
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-sync-get-abrupt.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-sync-get-abrupt.js
new file mode 100644
index 0000000000..741f3f3879
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-sync-get-abrupt.js
@@ -0,0 +1,111 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-getiter-sync-get-abrupt.case
+// - src/async-generators/default/async-class-decl-private-method.template
+/*---
+description: Abrupt completion while getting [Symbol.iterator] (Async Generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, Symbol.asyncIterator, async-iteration, class-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+
+ 1. Let exprRef be the result of evaluating AssignmentExpression.
+ 2. Let value be ? GetValue(exprRef).
+ 3. Let generatorKind be ! GetGeneratorKind().
+ 4. Let iterator be ? GetIterator(value, generatorKind).
+ ...
+
+ GetIterator ( obj [ , hint ] )
+
+ ...
+ 3. If hint is async,
+ a. Set method to ? GetMethod(obj, @@asyncIterator).
+ b. If method is undefined,
+ i. Let syncMethod be ? GetMethod(obj, @@iterator).
+ ...
+
+ GetMethod ( V, P )
+
+ ...
+ 2. Let func be ? GetV(V, P).
+ ...
+
+---*/
+var reason = {};
+var obj = {
+ get [Symbol.iterator]() {
+ throw reason;
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('abrupt completion closes iter');
+
+ }
+ get gen() { return this.#gen; }
+}
+
+const c = new C();
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
+
+var iter = c.gen();
+
+iter.next().then(() => {
+ throw new Test262Error('Promise incorrectly fulfilled.');
+}, v => {
+ assert.sameValue(v, reason, "reject reason");
+
+ iter.next().then(({ done, value }) => {
+ assert.sameValue(done, true, 'the iterator is completed');
+ assert.sameValue(value, undefined, 'value is undefined');
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-sync-not-callable-boolean-throw.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-sync-not-callable-boolean-throw.js
new file mode 100644
index 0000000000..14ed0208c0
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-sync-not-callable-boolean-throw.js
@@ -0,0 +1,110 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-getiter-sync-not-callable-boolean-throw.case
+// - src/async-generators/default/async-class-decl-private-method.template
+/*---
+description: Throws a TypeError on a non-callable [Symbol.iterator] (boolean) (Async Generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, async-iteration, class-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+
+ 1. Let exprRef be the result of evaluating AssignmentExpression.
+ 2. Let value be ? GetValue(exprRef).
+ 3. Let generatorKind be ! GetGeneratorKind().
+ 4. Let iterator be ? GetIterator(value, generatorKind).
+ ...
+
+ GetIterator ( obj [ , hint ] )
+
+ ...
+ 3. If hint is async,
+ a. Set method to ? GetMethod(obj, @@asyncIterator).
+ b. If method is undefined,
+ i. Let syncMethod be ? GetMethod(obj, @@iterator).
+ ...
+
+ GetMethod ( V, P )
+
+ ...
+ 2. Let func be ? GetV(V, P).
+ ...
+ 4. If IsCallable(func) is false, throw a TypeError exception.
+ ...
+
+---*/
+var obj = {
+ [Symbol.iterator]: false
+};
+
+
+
+var callCount = 0;
+
+class C {
+ async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('abrupt completion closes iter');
+
+ }
+ get gen() { return this.#gen; }
+}
+
+const c = new C();
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
+
+var iter = c.gen();
+
+iter.next().then(() => {
+ throw new Test262Error('Promise incorrectly fulfilled.');
+}, v => {
+ assert.sameValue(v.constructor, TypeError, "TypeError");
+
+ iter.next().then(({ done, value }) => {
+ assert.sameValue(done, true, 'the iterator is completed');
+ assert.sameValue(value, undefined, 'value is undefined');
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-sync-not-callable-number-throw.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-sync-not-callable-number-throw.js
new file mode 100644
index 0000000000..631ffec6b9
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-sync-not-callable-number-throw.js
@@ -0,0 +1,110 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-getiter-sync-not-callable-number-throw.case
+// - src/async-generators/default/async-class-decl-private-method.template
+/*---
+description: Throws a TypeError on a non-callable [Symbol.iterator] (number) (Async Generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, async-iteration, class-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+
+ 1. Let exprRef be the result of evaluating AssignmentExpression.
+ 2. Let value be ? GetValue(exprRef).
+ 3. Let generatorKind be ! GetGeneratorKind().
+ 4. Let iterator be ? GetIterator(value, generatorKind).
+ ...
+
+ GetIterator ( obj [ , hint ] )
+
+ ...
+ 3. If hint is async,
+ a. Set method to ? GetMethod(obj, @@asyncIterator).
+ b. If method is undefined,
+ i. Let syncMethod be ? GetMethod(obj, @@iterator).
+ ...
+
+ GetMethod ( V, P )
+
+ ...
+ 2. Let func be ? GetV(V, P).
+ ...
+ 4. If IsCallable(func) is false, throw a TypeError exception.
+ ...
+
+---*/
+var obj = {
+ [Symbol.iterator]: 0
+};
+
+
+
+var callCount = 0;
+
+class C {
+ async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('abrupt completion closes iter');
+
+ }
+ get gen() { return this.#gen; }
+}
+
+const c = new C();
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
+
+var iter = c.gen();
+
+iter.next().then(() => {
+ throw new Test262Error('Promise incorrectly fulfilled.');
+}, v => {
+ assert.sameValue(v.constructor, TypeError, "TypeError");
+
+ iter.next().then(({ done, value }) => {
+ assert.sameValue(done, true, 'the iterator is completed');
+ assert.sameValue(value, undefined, 'value is undefined');
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-sync-not-callable-object-throw.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-sync-not-callable-object-throw.js
new file mode 100644
index 0000000000..e9f554efbd
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-sync-not-callable-object-throw.js
@@ -0,0 +1,110 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-getiter-sync-not-callable-object-throw.case
+// - src/async-generators/default/async-class-decl-private-method.template
+/*---
+description: Throws a TypeError on a non-callable [Symbol.iterator] (object) (Async Generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, async-iteration, class-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+
+ 1. Let exprRef be the result of evaluating AssignmentExpression.
+ 2. Let value be ? GetValue(exprRef).
+ 3. Let generatorKind be ! GetGeneratorKind().
+ 4. Let iterator be ? GetIterator(value, generatorKind).
+ ...
+
+ GetIterator ( obj [ , hint ] )
+
+ ...
+ 3. If hint is async,
+ a. Set method to ? GetMethod(obj, @@asyncIterator).
+ b. If method is undefined,
+ i. Let syncMethod be ? GetMethod(obj, @@iterator).
+ ...
+
+ GetMethod ( V, P )
+
+ ...
+ 2. Let func be ? GetV(V, P).
+ ...
+ 4. If IsCallable(func) is false, throw a TypeError exception.
+ ...
+
+---*/
+var obj = {
+ [Symbol.iterator]: {}
+};
+
+
+
+var callCount = 0;
+
+class C {
+ async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('abrupt completion closes iter');
+
+ }
+ get gen() { return this.#gen; }
+}
+
+const c = new C();
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
+
+var iter = c.gen();
+
+iter.next().then(() => {
+ throw new Test262Error('Promise incorrectly fulfilled.');
+}, v => {
+ assert.sameValue(v.constructor, TypeError, "TypeError");
+
+ iter.next().then(({ done, value }) => {
+ assert.sameValue(done, true, 'the iterator is completed');
+ assert.sameValue(value, undefined, 'value is undefined');
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-sync-not-callable-string-throw.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-sync-not-callable-string-throw.js
new file mode 100644
index 0000000000..aeb155bb63
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-sync-not-callable-string-throw.js
@@ -0,0 +1,110 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-getiter-sync-not-callable-string-throw.case
+// - src/async-generators/default/async-class-decl-private-method.template
+/*---
+description: Throws a TypeError on a non-callable [Symbol.iterator] (string) (Async Generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, async-iteration, class-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+
+ 1. Let exprRef be the result of evaluating AssignmentExpression.
+ 2. Let value be ? GetValue(exprRef).
+ 3. Let generatorKind be ! GetGeneratorKind().
+ 4. Let iterator be ? GetIterator(value, generatorKind).
+ ...
+
+ GetIterator ( obj [ , hint ] )
+
+ ...
+ 3. If hint is async,
+ a. Set method to ? GetMethod(obj, @@asyncIterator).
+ b. If method is undefined,
+ i. Let syncMethod be ? GetMethod(obj, @@iterator).
+ ...
+
+ GetMethod ( V, P )
+
+ ...
+ 2. Let func be ? GetV(V, P).
+ ...
+ 4. If IsCallable(func) is false, throw a TypeError exception.
+ ...
+
+---*/
+var obj = {
+ [Symbol.iterator]: ''
+};
+
+
+
+var callCount = 0;
+
+class C {
+ async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('abrupt completion closes iter');
+
+ }
+ get gen() { return this.#gen; }
+}
+
+const c = new C();
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
+
+var iter = c.gen();
+
+iter.next().then(() => {
+ throw new Test262Error('Promise incorrectly fulfilled.');
+}, v => {
+ assert.sameValue(v.constructor, TypeError, "TypeError");
+
+ iter.next().then(({ done, value }) => {
+ assert.sameValue(done, true, 'the iterator is completed');
+ assert.sameValue(value, undefined, 'value is undefined');
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-sync-not-callable-symbol-throw.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-sync-not-callable-symbol-throw.js
new file mode 100644
index 0000000000..90515b351d
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-sync-not-callable-symbol-throw.js
@@ -0,0 +1,110 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-getiter-sync-not-callable-symbol-throw.case
+// - src/async-generators/default/async-class-decl-private-method.template
+/*---
+description: Throws a TypeError on a non-callable [Symbol.iterator] (symbol) (Async Generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, Symbol.asyncIterator, async-iteration, class-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+
+ 1. Let exprRef be the result of evaluating AssignmentExpression.
+ 2. Let value be ? GetValue(exprRef).
+ 3. Let generatorKind be ! GetGeneratorKind().
+ 4. Let iterator be ? GetIterator(value, generatorKind).
+ ...
+
+ GetIterator ( obj [ , hint ] )
+
+ ...
+ 3. If hint is async,
+ a. Set method to ? GetMethod(obj, @@asyncIterator).
+ b. If method is undefined,
+ i. Let syncMethod be ? GetMethod(obj, @@iterator).
+ ...
+
+ GetMethod ( V, P )
+
+ ...
+ 2. Let func be ? GetV(V, P).
+ ...
+ 4. If IsCallable(func) is false, throw a TypeError exception.
+ ...
+
+---*/
+var obj = {
+ [Symbol.iterator]: Symbol.iterator
+};
+
+
+
+var callCount = 0;
+
+class C {
+ async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('abrupt completion closes iter');
+
+ }
+ get gen() { return this.#gen; }
+}
+
+const c = new C();
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
+
+var iter = c.gen();
+
+iter.next().then(() => {
+ throw new Test262Error('Promise incorrectly fulfilled.');
+}, v => {
+ assert.sameValue(v.constructor, TypeError, "TypeError");
+
+ iter.next().then(({ done, value }) => {
+ assert.sameValue(done, true, 'the iterator is completed');
+ assert.sameValue(value, undefined, 'value is undefined');
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-sync-returns-abrupt.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-sync-returns-abrupt.js
new file mode 100644
index 0000000000..73f3e12790
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-sync-returns-abrupt.js
@@ -0,0 +1,105 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-getiter-sync-returns-abrupt.case
+// - src/async-generators/default/async-class-decl-private-method.template
+/*---
+description: Abrupt completion while calling [Symbol.iterator] (Async Generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, Symbol.asyncIterator, async-iteration, class-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+
+ 1. Let exprRef be the result of evaluating AssignmentExpression.
+ 2. Let value be ? GetValue(exprRef).
+ 3. Let generatorKind be ! GetGeneratorKind().
+ 4. Let iterator be ? GetIterator(value, generatorKind).
+ ...
+
+ GetIterator ( obj [ , hint ] )
+
+ ...
+ 3. If hint is async,
+ a. Set method to ? GetMethod(obj, @@asyncIterator).
+ i. Let syncMethod be ? GetMethod(obj, @@iterator).
+ ii. Let syncIterator be ? Call(syncMethod, obj).
+ ...
+
+---*/
+var reason = {};
+var obj = {
+ [Symbol.iterator]() {
+ throw reason;
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('abrupt completion closes iter');
+
+ }
+ get gen() { return this.#gen; }
+}
+
+const c = new C();
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
+
+var iter = c.gen();
+
+iter.next().then(() => {
+ throw new Test262Error('Promise incorrectly fulfilled.');
+}, v => {
+ assert.sameValue(v, reason, "reject reason");
+
+ iter.next().then(({ done, value }) => {
+ assert.sameValue(done, true, 'the iterator is completed');
+ assert.sameValue(value, undefined, 'value is undefined');
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-sync-returns-boolean-throw.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-sync-returns-boolean-throw.js
new file mode 100644
index 0000000000..50015e0abd
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-sync-returns-boolean-throw.js
@@ -0,0 +1,110 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-getiter-sync-returns-boolean-throw.case
+// - src/async-generators/default/async-class-decl-private-method.template
+/*---
+description: Non object returned by [Symbol.iterator]() - boolean (Async Generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, async-iteration, class-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+
+ 1. Let exprRef be the result of evaluating AssignmentExpression.
+ 2. Let value be ? GetValue(exprRef).
+ 3. Let generatorKind be ! GetGeneratorKind().
+ 4. Let iterator be ? GetIterator(value, generatorKind).
+ ...
+
+ GetIterator ( obj [ , hint ] )
+
+ ...
+ 3. If hint is async,
+ a. Set method to ? GetMethod(obj, @@asyncIterator).
+ i. Let syncMethod be ? GetMethod(obj, @@iterator).
+ ii. Let syncIterator be ? Call(syncMethod, obj).
+ iii. Return ? CreateAsyncFromSyncIterator(syncIterator).
+ ...
+
+ CreateAsyncFromSyncIterator(syncIterator)
+
+ 1. If Type(syncIterator) is not Object, throw a TypeError exception.
+ ...
+
+---*/
+var obj = {
+ [Symbol.iterator]() {
+ return true;
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('abrupt completion closes iter');
+
+ }
+ get gen() { return this.#gen; }
+}
+
+const c = new C();
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
+
+var iter = c.gen();
+
+iter.next().then(() => {
+ throw new Test262Error('Promise incorrectly fulfilled.');
+}, v => {
+ assert.sameValue(v.constructor, TypeError, "TypeError");
+
+ iter.next().then(({ done, value }) => {
+ assert.sameValue(done, true, 'the iterator is completed');
+ assert.sameValue(value, undefined, 'value is undefined');
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-sync-returns-null-throw.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-sync-returns-null-throw.js
new file mode 100644
index 0000000000..63546450d6
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-sync-returns-null-throw.js
@@ -0,0 +1,110 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-getiter-sync-returns-null-throw.case
+// - src/async-generators/default/async-class-decl-private-method.template
+/*---
+description: Non object returned by [Symbol.iterator]() - null (Async Generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, async-iteration, class-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+
+ 1. Let exprRef be the result of evaluating AssignmentExpression.
+ 2. Let value be ? GetValue(exprRef).
+ 3. Let generatorKind be ! GetGeneratorKind().
+ 4. Let iterator be ? GetIterator(value, generatorKind).
+ ...
+
+ GetIterator ( obj [ , hint ] )
+
+ ...
+ 3. If hint is async,
+ a. Set method to ? GetMethod(obj, @@asyncIterator).
+ i. Let syncMethod be ? GetMethod(obj, @@iterator).
+ ii. Let syncIterator be ? Call(syncMethod, obj).
+ iii. Return ? CreateAsyncFromSyncIterator(syncIterator).
+ ...
+
+ CreateAsyncFromSyncIterator(syncIterator)
+
+ 1. If Type(syncIterator) is not Object, throw a TypeError exception.
+ ...
+
+---*/
+var obj = {
+ [Symbol.iterator]() {
+ return null;
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('abrupt completion closes iter');
+
+ }
+ get gen() { return this.#gen; }
+}
+
+const c = new C();
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
+
+var iter = c.gen();
+
+iter.next().then(() => {
+ throw new Test262Error('Promise incorrectly fulfilled.');
+}, v => {
+ assert.sameValue(v.constructor, TypeError, "TypeError");
+
+ iter.next().then(({ done, value }) => {
+ assert.sameValue(done, true, 'the iterator is completed');
+ assert.sameValue(value, undefined, 'value is undefined');
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-sync-returns-number-throw.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-sync-returns-number-throw.js
new file mode 100644
index 0000000000..1f52d1a513
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-sync-returns-number-throw.js
@@ -0,0 +1,110 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-getiter-sync-returns-number-throw.case
+// - src/async-generators/default/async-class-decl-private-method.template
+/*---
+description: Non object returned by [Symbol.iterator]() - number (Async Generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, async-iteration, class-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+
+ 1. Let exprRef be the result of evaluating AssignmentExpression.
+ 2. Let value be ? GetValue(exprRef).
+ 3. Let generatorKind be ! GetGeneratorKind().
+ 4. Let iterator be ? GetIterator(value, generatorKind).
+ ...
+
+ GetIterator ( obj [ , hint ] )
+
+ ...
+ 3. If hint is async,
+ a. Set method to ? GetMethod(obj, @@asyncIterator).
+ i. Let syncMethod be ? GetMethod(obj, @@iterator).
+ ii. Let syncIterator be ? Call(syncMethod, obj).
+ iii. Return ? CreateAsyncFromSyncIterator(syncIterator).
+ ...
+
+ CreateAsyncFromSyncIterator(syncIterator)
+
+ 1. If Type(syncIterator) is not Object, throw a TypeError exception.
+ ...
+
+---*/
+var obj = {
+ [Symbol.iterator]() {
+ return 0;
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('abrupt completion closes iter');
+
+ }
+ get gen() { return this.#gen; }
+}
+
+const c = new C();
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
+
+var iter = c.gen();
+
+iter.next().then(() => {
+ throw new Test262Error('Promise incorrectly fulfilled.');
+}, v => {
+ assert.sameValue(v.constructor, TypeError, "TypeError");
+
+ iter.next().then(({ done, value }) => {
+ assert.sameValue(done, true, 'the iterator is completed');
+ assert.sameValue(value, undefined, 'value is undefined');
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-sync-returns-string-throw.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-sync-returns-string-throw.js
new file mode 100644
index 0000000000..1b0fdcb4a5
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-sync-returns-string-throw.js
@@ -0,0 +1,110 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-getiter-sync-returns-string-throw.case
+// - src/async-generators/default/async-class-decl-private-method.template
+/*---
+description: Non object returned by [Symbol.iterator]() - string (Async Generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, async-iteration, class-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+
+ 1. Let exprRef be the result of evaluating AssignmentExpression.
+ 2. Let value be ? GetValue(exprRef).
+ 3. Let generatorKind be ! GetGeneratorKind().
+ 4. Let iterator be ? GetIterator(value, generatorKind).
+ ...
+
+ GetIterator ( obj [ , hint ] )
+
+ ...
+ 3. If hint is async,
+ a. Set method to ? GetMethod(obj, @@asyncIterator).
+ i. Let syncMethod be ? GetMethod(obj, @@iterator).
+ ii. Let syncIterator be ? Call(syncMethod, obj).
+ iii. Return ? CreateAsyncFromSyncIterator(syncIterator).
+ ...
+
+ CreateAsyncFromSyncIterator(syncIterator)
+
+ 1. If Type(syncIterator) is not Object, throw a TypeError exception.
+ ...
+
+---*/
+var obj = {
+ [Symbol.iterator]() {
+ return '';
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('abrupt completion closes iter');
+
+ }
+ get gen() { return this.#gen; }
+}
+
+const c = new C();
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
+
+var iter = c.gen();
+
+iter.next().then(() => {
+ throw new Test262Error('Promise incorrectly fulfilled.');
+}, v => {
+ assert.sameValue(v.constructor, TypeError, "TypeError");
+
+ iter.next().then(({ done, value }) => {
+ assert.sameValue(done, true, 'the iterator is completed');
+ assert.sameValue(value, undefined, 'value is undefined');
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-sync-returns-symbol-throw.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-sync-returns-symbol-throw.js
new file mode 100644
index 0000000000..8e86c1bd75
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-sync-returns-symbol-throw.js
@@ -0,0 +1,110 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-getiter-sync-returns-symbol-throw.case
+// - src/async-generators/default/async-class-decl-private-method.template
+/*---
+description: Non object returned by [Symbol.iterator]() - symbol (Async Generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, async-iteration, class-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+
+ 1. Let exprRef be the result of evaluating AssignmentExpression.
+ 2. Let value be ? GetValue(exprRef).
+ 3. Let generatorKind be ! GetGeneratorKind().
+ 4. Let iterator be ? GetIterator(value, generatorKind).
+ ...
+
+ GetIterator ( obj [ , hint ] )
+
+ ...
+ 3. If hint is async,
+ a. Set method to ? GetMethod(obj, @@asyncIterator).
+ i. Let syncMethod be ? GetMethod(obj, @@iterator).
+ ii. Let syncIterator be ? Call(syncMethod, obj).
+ iii. Return ? CreateAsyncFromSyncIterator(syncIterator).
+ ...
+
+ CreateAsyncFromSyncIterator(syncIterator)
+
+ 1. If Type(syncIterator) is not Object, throw a TypeError exception.
+ ...
+
+---*/
+var obj = {
+ [Symbol.iterator]() {
+ return Symbol.iterator;
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('abrupt completion closes iter');
+
+ }
+ get gen() { return this.#gen; }
+}
+
+const c = new C();
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
+
+var iter = c.gen();
+
+iter.next().then(() => {
+ throw new Test262Error('Promise incorrectly fulfilled.');
+}, v => {
+ assert.sameValue(v.constructor, TypeError, "TypeError");
+
+ iter.next().then(({ done, value }) => {
+ assert.sameValue(done, true, 'the iterator is completed');
+ assert.sameValue(value, undefined, 'value is undefined');
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-sync-returns-undefined-throw.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-sync-returns-undefined-throw.js
new file mode 100644
index 0000000000..eaf82447ee
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-getiter-sync-returns-undefined-throw.js
@@ -0,0 +1,110 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-getiter-sync-returns-undefined-throw.case
+// - src/async-generators/default/async-class-decl-private-method.template
+/*---
+description: Non object returned by [Symbol.iterator]() - undefined (Async Generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, async-iteration, class-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+
+ 1. Let exprRef be the result of evaluating AssignmentExpression.
+ 2. Let value be ? GetValue(exprRef).
+ 3. Let generatorKind be ! GetGeneratorKind().
+ 4. Let iterator be ? GetIterator(value, generatorKind).
+ ...
+
+ GetIterator ( obj [ , hint ] )
+
+ ...
+ 3. If hint is async,
+ a. Set method to ? GetMethod(obj, @@asyncIterator).
+ i. Let syncMethod be ? GetMethod(obj, @@iterator).
+ ii. Let syncIterator be ? Call(syncMethod, obj).
+ iii. Return ? CreateAsyncFromSyncIterator(syncIterator).
+ ...
+
+ CreateAsyncFromSyncIterator(syncIterator)
+
+ 1. If Type(syncIterator) is not Object, throw a TypeError exception.
+ ...
+
+---*/
+var obj = {
+ [Symbol.iterator]() {
+ return undefined;
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('abrupt completion closes iter');
+
+ }
+ get gen() { return this.#gen; }
+}
+
+const c = new C();
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
+
+var iter = c.gen();
+
+iter.next().then(() => {
+ throw new Test262Error('Promise incorrectly fulfilled.');
+}, v => {
+ assert.sameValue(v.constructor, TypeError, "TypeError");
+
+ iter.next().then(({ done, value }) => {
+ assert.sameValue(done, true, 'the iterator is completed');
+ assert.sameValue(value, undefined, 'value is undefined');
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-next-call-done-get-abrupt.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-next-call-done-get-abrupt.js
new file mode 100644
index 0000000000..d5bb772855
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-next-call-done-get-abrupt.js
@@ -0,0 +1,111 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-next-call-done-get-abrupt.case
+// - src/async-generators/default/async-class-decl-private-method.template
+/*---
+description: Abrupt completion while getting done (Async Generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, Symbol.asyncIterator, async-iteration, class-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+ ...
+ 6. Repeat
+ a. If received.[[Type]] is normal, then
+ ii. Let innerResult be ? Invoke(iterator, "next",
+ « received.[[Value]] »).
+ iii. If generatorKind is async, then set innerResult to
+ ? Await(innerResult).
+ ...
+ v. Let done be ? IteratorComplete(innerResult).
+ ...
+
+---*/
+var reason = {};
+var obj = {
+ get [Symbol.iterator]() {
+ throw new Test262Error('it should not get Symbol.iterator');
+ },
+ [Symbol.asyncIterator]() {
+ return {
+ next() {
+ return {
+ get done() {
+ throw reason;
+ }
+ };
+ }
+ };
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('abrupt completion closes iter');
+
+ }
+ get gen() { return this.#gen; }
+}
+
+const c = new C();
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
+
+var iter = c.gen();
+
+iter.next().then(() => {
+ throw new Test262Error('Promise incorrectly fulfilled.');
+}, v => {
+ assert.sameValue(v, reason, "reject reason");
+
+ iter.next().then(({ done, value }) => {
+ assert.sameValue(done, true, 'the iterator is completed');
+ assert.sameValue(value, undefined, 'value is undefined');
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-next-call-returns-abrupt.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-next-call-returns-abrupt.js
new file mode 100644
index 0000000000..a6f731dc94
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-next-call-returns-abrupt.js
@@ -0,0 +1,103 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-next-call-returns-abrupt.case
+// - src/async-generators/default/async-class-decl-private-method.template
+/*---
+description: Abrupt completion while calling next (Async Generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, Symbol.asyncIterator, async-iteration, class-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+ ...
+ 6. Repeat
+ a. If received.[[Type]] is normal, then
+ ii. Let innerResult be ? Invoke(iterator, "next",
+ « received.[[Value]] »).
+ ...
+
+---*/
+var reason = {};
+var obj = {
+ get [Symbol.iterator]() {
+ throw new Test262Error('it should not get Symbol.iterator');
+ },
+ [Symbol.asyncIterator]() {
+ return {
+ next() {
+ throw reason;
+ }
+ };
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('abrupt completion closes iter');
+
+ }
+ get gen() { return this.#gen; }
+}
+
+const c = new C();
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
+
+var iter = c.gen();
+
+iter.next().then(() => {
+ throw new Test262Error('Promise incorrectly fulfilled.');
+}, v => {
+ assert.sameValue(v, reason, "reject reason");
+
+ iter.next().then(({ done, value }) => {
+ assert.sameValue(done, true, 'the iterator is completed');
+ assert.sameValue(value, undefined, 'value is undefined');
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-next-call-value-get-abrupt.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-next-call-value-get-abrupt.js
new file mode 100644
index 0000000000..c44953c1c7
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-next-call-value-get-abrupt.js
@@ -0,0 +1,113 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-next-call-value-get-abrupt.case
+// - src/async-generators/default/async-class-decl-private-method.template
+/*---
+description: Abrupt completion while getting value (Async Generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, Symbol.asyncIterator, async-iteration, class-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+ ...
+ 6. Repeat
+ a. If received.[[Type]] is normal, then
+ ii. Let innerResult be ? Invoke(iterator, "next",
+ « received.[[Value]] »).
+ iii. If generatorKind is async, then set innerResult to
+ ? Await(innerResult).
+ ...
+ vi. If done is true, then
+ 1. Return ? IteratorValue(innerResult).
+ ...
+
+---*/
+var reason = {};
+var obj = {
+ get [Symbol.iterator]() {
+ throw new Test262Error('it should not get Symbol.iterator');
+ },
+ [Symbol.asyncIterator]() {
+ return {
+ next() {
+ return {
+ done: true,
+ get value() {
+ throw reason;
+ }
+ };
+ }
+ };
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('abrupt completion closes iter');
+
+ }
+ get gen() { return this.#gen; }
+}
+
+const c = new C();
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
+
+var iter = c.gen();
+
+iter.next().then(() => {
+ throw new Test262Error('Promise incorrectly fulfilled.');
+}, v => {
+ assert.sameValue(v, reason, "reject reason");
+
+ iter.next().then(({ done, value }) => {
+ assert.sameValue(done, true, 'the iterator is completed');
+ assert.sameValue(value, undefined, 'value is undefined');
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-next-get-abrupt.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-next-get-abrupt.js
new file mode 100644
index 0000000000..abeada6161
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-next-get-abrupt.js
@@ -0,0 +1,103 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-next-get-abrupt.case
+// - src/async-generators/default/async-class-decl-private-method.template
+/*---
+description: Abrupt completion while getting next (Async Generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, Symbol.asyncIterator, async-iteration, class-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+ ...
+ 6. Repeat
+ a. If received.[[Type]] is normal, then
+ ii. Let innerResult be ? Invoke(iterator, "next",
+ « received.[[Value]] »).
+ ...
+
+---*/
+var reason = {};
+var obj = {
+ get [Symbol.iterator]() {
+ throw new Test262Error('it should not get Symbol.iterator');
+ },
+ [Symbol.asyncIterator]() {
+ return {
+ get next() {
+ throw reason;
+ }
+ };
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('abrupt completion closes iter');
+
+ }
+ get gen() { return this.#gen; }
+}
+
+const c = new C();
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
+
+var iter = c.gen();
+
+iter.next().then(() => {
+ throw new Test262Error('Promise incorrectly fulfilled.');
+}, v => {
+ assert.sameValue(v, reason, "reject reason");
+
+ iter.next().then(({ done, value }) => {
+ assert.sameValue(done, true, 'the iterator is completed');
+ assert.sameValue(value, undefined, 'value is undefined');
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-next-non-object-ignores-then.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-next-non-object-ignores-then.js
new file mode 100644
index 0000000000..ed897fb8c3
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-next-non-object-ignores-then.js
@@ -0,0 +1,123 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-next-non-object-ignores-then.case
+// - src/async-generators/default/async-class-decl-private-method.template
+/*---
+description: If next() value is not-object, do not access respective then property (Async Generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, Symbol.asyncIterator, async-iteration, class-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+ ...
+ 6. Repeat
+ a. If received.[[Type]] is normal, then
+ ii. Let innerResult be ? Invoke(iterator, "next",
+ « received.[[Value]] »).
+ iii. If generatorKind is async, then set innerResult to
+ ? Await(innerResult).
+ iv. If Type(innerResult) is not Object, throw a TypeError exception.
+ ...
+
+ Await
+
+ ...
+ 2. Let promiseCapability be ! NewPromiseCapability(%Promise%).
+ 3. Perform ! Call(promiseCapability.[[Resolve]], undefined, « promise »).
+ ...
+
+ Promise Resolve Functions
+
+ ...
+ 7. If Type(resolution) is not Object, then
+ a. Return FulfillPromise(promise, resolution).
+ 8. Let then be Get(resolution, "then").
+ ...
+
+---*/
+Number.prototype.then = function() {
+ throw new Test262Error('Number#then should not be used');
+};
+var obj = {
+ get [Symbol.iterator]() {
+ throw new Test262Error('it should not get Symbol.iterator');
+ },
+ [Symbol.asyncIterator]() {
+ return {
+ next() {
+ return 42;
+ }
+ };
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('abrupt completion closes iter');
+
+ }
+ get gen() { return this.#gen; }
+}
+
+const c = new C();
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
+
+var iter = c.gen();
+
+iter.next().then(() => {
+ throw new Test262Error('Promise incorrectly fulfilled.');
+}, v => {
+ assert.sameValue(v.constructor, TypeError, 'TypeError');
+
+ iter.next().then(({ done, value }) => {
+ assert.sameValue(done, true, 'the iterator is completed');
+ assert.sameValue(value, undefined, 'value is undefined');
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-next-not-callable-boolean-throw.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-next-not-callable-boolean-throw.js
new file mode 100644
index 0000000000..daa99c2779
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-next-not-callable-boolean-throw.js
@@ -0,0 +1,100 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-next-not-callable-boolean-throw.case
+// - src/async-generators/default/async-class-decl-private-method.template
+/*---
+description: Not-callable next value in a yield star position - boolean (Async Generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, Symbol.asyncIterator, async-iteration, class-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+ ...
+ 6. Repeat
+ a. If received.[[Type]] is normal, then
+ ii. Let innerResult be ? Invoke(iterator, "next",
+ « received.[[Value]] »).
+ ...
+
+---*/
+var obj = {
+ get [Symbol.iterator]() {
+ throw new Test262Error('it should not get Symbol.iterator');
+ },
+ [Symbol.asyncIterator]() {
+ return {
+ next: true
+ };
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('abrupt completion closes iter');
+
+ }
+ get gen() { return this.#gen; }
+}
+
+const c = new C();
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
+
+var iter = c.gen();
+
+iter.next().then(() => {
+ throw new Test262Error('Promise incorrectly fulfilled.');
+}, v => {
+ assert.sameValue(v.constructor, TypeError, "TypeError");
+
+ iter.next().then(({ done, value }) => {
+ assert.sameValue(done, true, 'the iterator is completed');
+ assert.sameValue(value, undefined, 'value is undefined');
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-next-not-callable-null-throw.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-next-not-callable-null-throw.js
new file mode 100644
index 0000000000..525fe38596
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-next-not-callable-null-throw.js
@@ -0,0 +1,100 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-next-not-callable-null-throw.case
+// - src/async-generators/default/async-class-decl-private-method.template
+/*---
+description: Not-callable next value in a yield star position - null (Async Generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, Symbol.asyncIterator, async-iteration, class-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+ ...
+ 6. Repeat
+ a. If received.[[Type]] is normal, then
+ ii. Let innerResult be ? Invoke(iterator, "next",
+ « received.[[Value]] »).
+ ...
+
+---*/
+var obj = {
+ get [Symbol.iterator]() {
+ throw new Test262Error('it should not get Symbol.iterator');
+ },
+ [Symbol.asyncIterator]() {
+ return {
+ next: null
+ };
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('abrupt completion closes iter');
+
+ }
+ get gen() { return this.#gen; }
+}
+
+const c = new C();
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
+
+var iter = c.gen();
+
+iter.next().then(() => {
+ throw new Test262Error('Promise incorrectly fulfilled.');
+}, v => {
+ assert.sameValue(v.constructor, TypeError, "TypeError");
+
+ iter.next().then(({ done, value }) => {
+ assert.sameValue(done, true, 'the iterator is completed');
+ assert.sameValue(value, undefined, 'value is undefined');
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-next-not-callable-number-throw.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-next-not-callable-number-throw.js
new file mode 100644
index 0000000000..9883a3cdd3
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-next-not-callable-number-throw.js
@@ -0,0 +1,100 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-next-not-callable-number-throw.case
+// - src/async-generators/default/async-class-decl-private-method.template
+/*---
+description: Not-callable next value in a yield star position - number (Async Generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, Symbol.asyncIterator, async-iteration, class-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+ ...
+ 6. Repeat
+ a. If received.[[Type]] is normal, then
+ ii. Let innerResult be ? Invoke(iterator, "next",
+ « received.[[Value]] »).
+ ...
+
+---*/
+var obj = {
+ get [Symbol.iterator]() {
+ throw new Test262Error('it should not get Symbol.iterator');
+ },
+ [Symbol.asyncIterator]() {
+ return {
+ next: 42
+ };
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('abrupt completion closes iter');
+
+ }
+ get gen() { return this.#gen; }
+}
+
+const c = new C();
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
+
+var iter = c.gen();
+
+iter.next().then(() => {
+ throw new Test262Error('Promise incorrectly fulfilled.');
+}, v => {
+ assert.sameValue(v.constructor, TypeError, "TypeError");
+
+ iter.next().then(({ done, value }) => {
+ assert.sameValue(done, true, 'the iterator is completed');
+ assert.sameValue(value, undefined, 'value is undefined');
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-next-not-callable-object-throw.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-next-not-callable-object-throw.js
new file mode 100644
index 0000000000..1b592d2d99
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-next-not-callable-object-throw.js
@@ -0,0 +1,100 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-next-not-callable-object-throw.case
+// - src/async-generators/default/async-class-decl-private-method.template
+/*---
+description: Not-callable next value in a yield star position - object (Async Generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, Symbol.asyncIterator, async-iteration, class-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+ ...
+ 6. Repeat
+ a. If received.[[Type]] is normal, then
+ ii. Let innerResult be ? Invoke(iterator, "next",
+ « received.[[Value]] »).
+ ...
+
+---*/
+var obj = {
+ get [Symbol.iterator]() {
+ throw new Test262Error('it should not get Symbol.iterator');
+ },
+ [Symbol.asyncIterator]() {
+ return {
+ next: {}
+ };
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('abrupt completion closes iter');
+
+ }
+ get gen() { return this.#gen; }
+}
+
+const c = new C();
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
+
+var iter = c.gen();
+
+iter.next().then(() => {
+ throw new Test262Error('Promise incorrectly fulfilled.');
+}, v => {
+ assert.sameValue(v.constructor, TypeError, "TypeError");
+
+ iter.next().then(({ done, value }) => {
+ assert.sameValue(done, true, 'the iterator is completed');
+ assert.sameValue(value, undefined, 'value is undefined');
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-next-not-callable-string-throw.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-next-not-callable-string-throw.js
new file mode 100644
index 0000000000..93f1525f17
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-next-not-callable-string-throw.js
@@ -0,0 +1,100 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-next-not-callable-string-throw.case
+// - src/async-generators/default/async-class-decl-private-method.template
+/*---
+description: Not-callable next value in a yield star position - string (Async Generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, Symbol.asyncIterator, async-iteration, class-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+ ...
+ 6. Repeat
+ a. If received.[[Type]] is normal, then
+ ii. Let innerResult be ? Invoke(iterator, "next",
+ « received.[[Value]] »).
+ ...
+
+---*/
+var obj = {
+ get [Symbol.iterator]() {
+ throw new Test262Error('it should not get Symbol.iterator');
+ },
+ [Symbol.asyncIterator]() {
+ return {
+ next: ''
+ };
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('abrupt completion closes iter');
+
+ }
+ get gen() { return this.#gen; }
+}
+
+const c = new C();
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
+
+var iter = c.gen();
+
+iter.next().then(() => {
+ throw new Test262Error('Promise incorrectly fulfilled.');
+}, v => {
+ assert.sameValue(v.constructor, TypeError, "TypeError");
+
+ iter.next().then(({ done, value }) => {
+ assert.sameValue(done, true, 'the iterator is completed');
+ assert.sameValue(value, undefined, 'value is undefined');
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-next-not-callable-symbol-throw.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-next-not-callable-symbol-throw.js
new file mode 100644
index 0000000000..113904c014
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-next-not-callable-symbol-throw.js
@@ -0,0 +1,100 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-next-not-callable-symbol-throw.case
+// - src/async-generators/default/async-class-decl-private-method.template
+/*---
+description: Not-callable next value in a yield star position - symbol (Async Generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, Symbol.asyncIterator, async-iteration, class-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+ ...
+ 6. Repeat
+ a. If received.[[Type]] is normal, then
+ ii. Let innerResult be ? Invoke(iterator, "next",
+ « received.[[Value]] »).
+ ...
+
+---*/
+var obj = {
+ get [Symbol.iterator]() {
+ throw new Test262Error('it should not get Symbol.iterator');
+ },
+ [Symbol.asyncIterator]() {
+ return {
+ next: Symbol('oi')
+ };
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('abrupt completion closes iter');
+
+ }
+ get gen() { return this.#gen; }
+}
+
+const c = new C();
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
+
+var iter = c.gen();
+
+iter.next().then(() => {
+ throw new Test262Error('Promise incorrectly fulfilled.');
+}, v => {
+ assert.sameValue(v.constructor, TypeError, "TypeError");
+
+ iter.next().then(({ done, value }) => {
+ assert.sameValue(done, true, 'the iterator is completed');
+ assert.sameValue(value, undefined, 'value is undefined');
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-next-not-callable-undefined-throw.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-next-not-callable-undefined-throw.js
new file mode 100644
index 0000000000..bd66cf0493
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-next-not-callable-undefined-throw.js
@@ -0,0 +1,100 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-next-not-callable-undefined-throw.case
+// - src/async-generators/default/async-class-decl-private-method.template
+/*---
+description: Not-callable next value in a yield star position - undefined (Async Generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, Symbol.asyncIterator, async-iteration, class-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+ ...
+ 6. Repeat
+ a. If received.[[Type]] is normal, then
+ ii. Let innerResult be ? Invoke(iterator, "next",
+ « received.[[Value]] »).
+ ...
+
+---*/
+var obj = {
+ get [Symbol.iterator]() {
+ throw new Test262Error('it should not get Symbol.iterator');
+ },
+ [Symbol.asyncIterator]() {
+ return {
+ next: undefined
+ };
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('abrupt completion closes iter');
+
+ }
+ get gen() { return this.#gen; }
+}
+
+const c = new C();
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
+
+var iter = c.gen();
+
+iter.next().then(() => {
+ throw new Test262Error('Promise incorrectly fulfilled.');
+}, v => {
+ assert.sameValue(v.constructor, TypeError, "TypeError");
+
+ iter.next().then(({ done, value }) => {
+ assert.sameValue(done, true, 'the iterator is completed');
+ assert.sameValue(value, undefined, 'value is undefined');
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-next-then-get-abrupt.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-next-then-get-abrupt.js
new file mode 100644
index 0000000000..ad8c9590e5
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-next-then-get-abrupt.js
@@ -0,0 +1,127 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-next-then-get-abrupt.case
+// - src/async-generators/default/async-class-decl-private-method.template
+/*---
+description: Return abrupt after getting next().then (Async Generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, Symbol.asyncIterator, async-iteration, class-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+ ...
+ 6. Repeat
+ a. If received.[[Type]] is normal, then
+ ii. Let innerResult be ? Invoke(iterator, "next",
+ « received.[[Value]] »).
+ iii. If generatorKind is async, then set innerResult to
+ ? Await(innerResult).
+ ...
+
+ Await
+
+ ...
+ 2. Let promiseCapability be ! NewPromiseCapability(%Promise%).
+ 3. Perform ! Call(promiseCapability.[[Resolve]], undefined, « promise »).
+ ...
+
+ Promise Resolve Functions
+
+ ...
+ 8. Let then be Get(resolution, "then").
+ ...
+ 10. Get thenAction be then.[[Value]].
+ ...
+ 12. Perform EnqueueJob("PromiseJobs", PromiseResolveThenableJob, « promise,
+ resolution, thenAction »).
+ ...
+
+---*/
+var reason = {};
+var obj = {
+ get [Symbol.iterator]() {
+ throw new Test262Error('it should not get Symbol.iterator');
+ },
+ [Symbol.asyncIterator]() {
+ return {
+ next() {
+ return {
+ get then() {
+ throw reason;
+ }
+ };
+ }
+ };
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('abrupt completion closes iter');
+
+ }
+ get gen() { return this.#gen; }
+}
+
+const c = new C();
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
+
+var iter = c.gen();
+
+iter.next().then(() => {
+ throw new Test262Error('Promise incorrectly fulfilled.');
+}, v => {
+ assert.sameValue(v, reason, 'reject reason');
+
+ iter.next().then(({ done, value }) => {
+ assert.sameValue(done, true, 'the iterator is completed');
+ assert.sameValue(value, undefined, 'value is undefined');
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-next-then-non-callable-boolean-fulfillpromise.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-next-then-non-callable-boolean-fulfillpromise.js
new file mode 100644
index 0000000000..e6b3723774
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-next-then-non-callable-boolean-fulfillpromise.js
@@ -0,0 +1,121 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-next-then-non-callable-boolean-fulfillpromise.case
+// - src/async-generators/default/async-class-decl-private-method.template
+/*---
+description: FulfillPromise if next().then is not-callable (boolean) (Async Generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, Symbol.asyncIterator, async-iteration, class-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+ ...
+ 6. Repeat
+ a. If received.[[Type]] is normal, then
+ ii. Let innerResult be ? Invoke(iterator, "next",
+ « received.[[Value]] »).
+ iii. If generatorKind is async, then set innerResult to
+ ? Await(innerResult).
+ iv. If Type(innerResult) is not Object, throw a TypeError exception.
+ ...
+
+ Await
+
+ ...
+ 2. Let promiseCapability be ! NewPromiseCapability(%Promise%).
+ 3. Perform ! Call(promiseCapability.[[Resolve]], undefined, « promise »).
+ ...
+
+ Promise Resolve Functions
+
+ ...
+ 7. If Type(resolution) is not Object, then
+ a. Return FulfillPromise(promise, resolution).
+ 8. Let then be Get(resolution, "then").
+ ...
+ 11. If IsCallable(thenAction) is false, then
+ a. Return FulfillPromise(promise, resolution).
+ ...
+
+---*/
+var obj = {
+ get [Symbol.iterator]() {
+ throw new Test262Error('it should not get Symbol.iterator');
+ },
+ [Symbol.asyncIterator]() {
+ return {
+ next() {
+ return {
+ then: true,
+ value: 42,
+ done: false
+ }
+ }
+ };
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('completion closes iter');
+
+ }
+ get gen() { return this.#gen; }
+}
+
+const c = new C();
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
+
+var iter = c.gen();
+
+iter.next().then(({ value, done }) => {
+ assert.sameValue(value, 42);
+ assert.sameValue(done, false);
+}).then($DONE, $DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-next-then-non-callable-null-fulfillpromise.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-next-then-non-callable-null-fulfillpromise.js
new file mode 100644
index 0000000000..03a65a9806
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-next-then-non-callable-null-fulfillpromise.js
@@ -0,0 +1,121 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-next-then-non-callable-null-fulfillpromise.case
+// - src/async-generators/default/async-class-decl-private-method.template
+/*---
+description: FulfillPromise if next().then is not-callable (null) (Async Generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, Symbol.asyncIterator, async-iteration, class-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+ ...
+ 6. Repeat
+ a. If received.[[Type]] is normal, then
+ ii. Let innerResult be ? Invoke(iterator, "next",
+ « received.[[Value]] »).
+ iii. If generatorKind is async, then set innerResult to
+ ? Await(innerResult).
+ iv. If Type(innerResult) is not Object, throw a TypeError exception.
+ ...
+
+ Await
+
+ ...
+ 2. Let promiseCapability be ! NewPromiseCapability(%Promise%).
+ 3. Perform ! Call(promiseCapability.[[Resolve]], undefined, « promise »).
+ ...
+
+ Promise Resolve Functions
+
+ ...
+ 7. If Type(resolution) is not Object, then
+ a. Return FulfillPromise(promise, resolution).
+ 8. Let then be Get(resolution, "then").
+ ...
+ 11. If IsCallable(thenAction) is false, then
+ a. Return FulfillPromise(promise, resolution).
+ ...
+
+---*/
+var obj = {
+ get [Symbol.iterator]() {
+ throw new Test262Error('it should not get Symbol.iterator');
+ },
+ [Symbol.asyncIterator]() {
+ return {
+ next() {
+ return {
+ then: null,
+ value: 42,
+ done: false
+ }
+ }
+ };
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('completion closes iter');
+
+ }
+ get gen() { return this.#gen; }
+}
+
+const c = new C();
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
+
+var iter = c.gen();
+
+iter.next().then(({ value, done }) => {
+ assert.sameValue(value, 42);
+ assert.sameValue(done, false);
+}).then($DONE, $DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-next-then-non-callable-number-fulfillpromise.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-next-then-non-callable-number-fulfillpromise.js
new file mode 100644
index 0000000000..612f73cafe
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-next-then-non-callable-number-fulfillpromise.js
@@ -0,0 +1,121 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-next-then-non-callable-number-fulfillpromise.case
+// - src/async-generators/default/async-class-decl-private-method.template
+/*---
+description: FulfillPromise if next().then is not-callable (number) (Async Generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, Symbol.asyncIterator, async-iteration, class-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+ ...
+ 6. Repeat
+ a. If received.[[Type]] is normal, then
+ ii. Let innerResult be ? Invoke(iterator, "next",
+ « received.[[Value]] »).
+ iii. If generatorKind is async, then set innerResult to
+ ? Await(innerResult).
+ iv. If Type(innerResult) is not Object, throw a TypeError exception.
+ ...
+
+ Await
+
+ ...
+ 2. Let promiseCapability be ! NewPromiseCapability(%Promise%).
+ 3. Perform ! Call(promiseCapability.[[Resolve]], undefined, « promise »).
+ ...
+
+ Promise Resolve Functions
+
+ ...
+ 7. If Type(resolution) is not Object, then
+ a. Return FulfillPromise(promise, resolution).
+ 8. Let then be Get(resolution, "then").
+ ...
+ 11. If IsCallable(thenAction) is false, then
+ a. Return FulfillPromise(promise, resolution).
+ ...
+
+---*/
+var obj = {
+ get [Symbol.iterator]() {
+ throw new Test262Error('it should not get Symbol.iterator');
+ },
+ [Symbol.asyncIterator]() {
+ return {
+ next() {
+ return {
+ then: 39,
+ value: 42,
+ done: false
+ }
+ }
+ };
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('completion closes iter');
+
+ }
+ get gen() { return this.#gen; }
+}
+
+const c = new C();
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
+
+var iter = c.gen();
+
+iter.next().then(({ value, done }) => {
+ assert.sameValue(value, 42);
+ assert.sameValue(done, false);
+}).then($DONE, $DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-next-then-non-callable-object-fulfillpromise.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-next-then-non-callable-object-fulfillpromise.js
new file mode 100644
index 0000000000..aa38dcfbe2
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-next-then-non-callable-object-fulfillpromise.js
@@ -0,0 +1,121 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-next-then-non-callable-object-fulfillpromise.case
+// - src/async-generators/default/async-class-decl-private-method.template
+/*---
+description: FulfillPromise if next().then is not-callable (object) (Async Generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, Symbol.asyncIterator, async-iteration, class-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+ ...
+ 6. Repeat
+ a. If received.[[Type]] is normal, then
+ ii. Let innerResult be ? Invoke(iterator, "next",
+ « received.[[Value]] »).
+ iii. If generatorKind is async, then set innerResult to
+ ? Await(innerResult).
+ iv. If Type(innerResult) is not Object, throw a TypeError exception.
+ ...
+
+ Await
+
+ ...
+ 2. Let promiseCapability be ! NewPromiseCapability(%Promise%).
+ 3. Perform ! Call(promiseCapability.[[Resolve]], undefined, « promise »).
+ ...
+
+ Promise Resolve Functions
+
+ ...
+ 7. If Type(resolution) is not Object, then
+ a. Return FulfillPromise(promise, resolution).
+ 8. Let then be Get(resolution, "then").
+ ...
+ 11. If IsCallable(thenAction) is false, then
+ a. Return FulfillPromise(promise, resolution).
+ ...
+
+---*/
+var obj = {
+ get [Symbol.iterator]() {
+ throw new Test262Error('it should not get Symbol.iterator');
+ },
+ [Symbol.asyncIterator]() {
+ return {
+ next() {
+ return {
+ then: {},
+ value: 42,
+ done: false
+ }
+ }
+ };
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('completion closes iter');
+
+ }
+ get gen() { return this.#gen; }
+}
+
+const c = new C();
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
+
+var iter = c.gen();
+
+iter.next().then(({ value, done }) => {
+ assert.sameValue(value, 42);
+ assert.sameValue(done, false);
+}).then($DONE, $DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-next-then-non-callable-string-fulfillpromise.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-next-then-non-callable-string-fulfillpromise.js
new file mode 100644
index 0000000000..058b82d40a
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-next-then-non-callable-string-fulfillpromise.js
@@ -0,0 +1,121 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-next-then-non-callable-string-fulfillpromise.case
+// - src/async-generators/default/async-class-decl-private-method.template
+/*---
+description: FulfillPromise if next().then is not-callable (string) (Async Generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, Symbol.asyncIterator, async-iteration, class-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+ ...
+ 6. Repeat
+ a. If received.[[Type]] is normal, then
+ ii. Let innerResult be ? Invoke(iterator, "next",
+ « received.[[Value]] »).
+ iii. If generatorKind is async, then set innerResult to
+ ? Await(innerResult).
+ iv. If Type(innerResult) is not Object, throw a TypeError exception.
+ ...
+
+ Await
+
+ ...
+ 2. Let promiseCapability be ! NewPromiseCapability(%Promise%).
+ 3. Perform ! Call(promiseCapability.[[Resolve]], undefined, « promise »).
+ ...
+
+ Promise Resolve Functions
+
+ ...
+ 7. If Type(resolution) is not Object, then
+ a. Return FulfillPromise(promise, resolution).
+ 8. Let then be Get(resolution, "then").
+ ...
+ 11. If IsCallable(thenAction) is false, then
+ a. Return FulfillPromise(promise, resolution).
+ ...
+
+---*/
+var obj = {
+ get [Symbol.iterator]() {
+ throw new Test262Error('it should not get Symbol.iterator');
+ },
+ [Symbol.asyncIterator]() {
+ return {
+ next() {
+ return {
+ then: '',
+ value: 42,
+ done: false
+ }
+ }
+ };
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('completion closes iter');
+
+ }
+ get gen() { return this.#gen; }
+}
+
+const c = new C();
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
+
+var iter = c.gen();
+
+iter.next().then(({ value, done }) => {
+ assert.sameValue(value, 42);
+ assert.sameValue(done, false);
+}).then($DONE, $DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-next-then-non-callable-symbol-fulfillpromise.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-next-then-non-callable-symbol-fulfillpromise.js
new file mode 100644
index 0000000000..121893b0ca
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-next-then-non-callable-symbol-fulfillpromise.js
@@ -0,0 +1,121 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-next-then-non-callable-symbol-fulfillpromise.case
+// - src/async-generators/default/async-class-decl-private-method.template
+/*---
+description: FulfillPromise if next().then is not-callable (symbol) (Async Generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, Symbol.asyncIterator, async-iteration, class-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+ ...
+ 6. Repeat
+ a. If received.[[Type]] is normal, then
+ ii. Let innerResult be ? Invoke(iterator, "next",
+ « received.[[Value]] »).
+ iii. If generatorKind is async, then set innerResult to
+ ? Await(innerResult).
+ iv. If Type(innerResult) is not Object, throw a TypeError exception.
+ ...
+
+ Await
+
+ ...
+ 2. Let promiseCapability be ! NewPromiseCapability(%Promise%).
+ 3. Perform ! Call(promiseCapability.[[Resolve]], undefined, « promise »).
+ ...
+
+ Promise Resolve Functions
+
+ ...
+ 7. If Type(resolution) is not Object, then
+ a. Return FulfillPromise(promise, resolution).
+ 8. Let then be Get(resolution, "then").
+ ...
+ 11. If IsCallable(thenAction) is false, then
+ a. Return FulfillPromise(promise, resolution).
+ ...
+
+---*/
+var obj = {
+ get [Symbol.iterator]() {
+ throw new Test262Error('it should not get Symbol.iterator');
+ },
+ [Symbol.asyncIterator]() {
+ return {
+ next() {
+ return {
+ then: Symbol('oi'),
+ value: 42,
+ done: false
+ }
+ }
+ };
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('completion closes iter');
+
+ }
+ get gen() { return this.#gen; }
+}
+
+const c = new C();
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
+
+var iter = c.gen();
+
+iter.next().then(({ value, done }) => {
+ assert.sameValue(value, 42);
+ assert.sameValue(done, false);
+}).then($DONE, $DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-next-then-non-callable-undefined-fulfillpromise.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-next-then-non-callable-undefined-fulfillpromise.js
new file mode 100644
index 0000000000..ac4111c2b6
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-next-then-non-callable-undefined-fulfillpromise.js
@@ -0,0 +1,121 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-next-then-non-callable-undefined-fulfillpromise.case
+// - src/async-generators/default/async-class-decl-private-method.template
+/*---
+description: FulfillPromise if next().then is not-callable (undefined) (Async Generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, Symbol.asyncIterator, async-iteration, class-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+ ...
+ 6. Repeat
+ a. If received.[[Type]] is normal, then
+ ii. Let innerResult be ? Invoke(iterator, "next",
+ « received.[[Value]] »).
+ iii. If generatorKind is async, then set innerResult to
+ ? Await(innerResult).
+ iv. If Type(innerResult) is not Object, throw a TypeError exception.
+ ...
+
+ Await
+
+ ...
+ 2. Let promiseCapability be ! NewPromiseCapability(%Promise%).
+ 3. Perform ! Call(promiseCapability.[[Resolve]], undefined, « promise »).
+ ...
+
+ Promise Resolve Functions
+
+ ...
+ 7. If Type(resolution) is not Object, then
+ a. Return FulfillPromise(promise, resolution).
+ 8. Let then be Get(resolution, "then").
+ ...
+ 11. If IsCallable(thenAction) is false, then
+ a. Return FulfillPromise(promise, resolution).
+ ...
+
+---*/
+var obj = {
+ get [Symbol.iterator]() {
+ throw new Test262Error('it should not get Symbol.iterator');
+ },
+ [Symbol.asyncIterator]() {
+ return {
+ next() {
+ return {
+ then: undefined,
+ value: 42,
+ done: false
+ }
+ }
+ };
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('completion closes iter');
+
+ }
+ get gen() { return this.#gen; }
+}
+
+const c = new C();
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
+
+var iter = c.gen();
+
+iter.next().then(({ value, done }) => {
+ assert.sameValue(value, 42);
+ assert.sameValue(done, false);
+}).then($DONE, $DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-next-then-returns-abrupt.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-next-then-returns-abrupt.js
new file mode 100644
index 0000000000..16e6019abd
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-next-then-returns-abrupt.js
@@ -0,0 +1,127 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-next-then-returns-abrupt.case
+// - src/async-generators/default/async-class-decl-private-method.template
+/*---
+description: Return abrupt after calling next().then (Async Generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, Symbol.asyncIterator, async-iteration, class-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+ ...
+ 6. Repeat
+ a. If received.[[Type]] is normal, then
+ ii. Let innerResult be ? Invoke(iterator, "next",
+ « received.[[Value]] »).
+ iii. If generatorKind is async, then set innerResult to
+ ? Await(innerResult).
+ ...
+
+ Await
+
+ ...
+ 2. Let promiseCapability be ! NewPromiseCapability(%Promise%).
+ 3. Perform ! Call(promiseCapability.[[Resolve]], undefined, « promise »).
+ ...
+
+ Promise Resolve Functions
+
+ ...
+ 8. Let then be Get(resolution, "then").
+ ...
+ 10. Get thenAction be then.[[Value]].
+ ...
+ 12. Perform EnqueueJob("PromiseJobs", PromiseResolveThenableJob, « promise,
+ resolution, thenAction »).
+ ...
+
+---*/
+var reason = {};
+var obj = {
+ get [Symbol.iterator]() {
+ throw new Test262Error('it should not get Symbol.iterator');
+ },
+ [Symbol.asyncIterator]() {
+ return {
+ next() {
+ return {
+ then() {
+ throw reason;
+ }
+ };
+ }
+ };
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ async *#gen() {
+ callCount += 1;
+ yield* obj;
+ throw new Test262Error('abrupt completion closes iter');
+
+ }
+ get gen() { return this.#gen; }
+}
+
+const c = new C();
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
+
+var iter = c.gen();
+
+iter.next().then(() => {
+ throw new Test262Error('Promise incorrectly fulfilled.');
+}, v => {
+ assert.sameValue(v, reason, 'reject reason');
+
+ iter.next().then(({ done, value }) => {
+ assert.sameValue(done, true, 'the iterator is completed');
+ assert.sameValue(value, undefined, 'value is undefined');
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-sync-next.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-sync-next.js
new file mode 100644
index 0000000000..70ebbacca3
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-sync-next.js
@@ -0,0 +1,260 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-sync-next.case
+// - src/async-generators/default/async-class-decl-private-method.template
+/*---
+description: execution order for yield* with sync iterator and next() (Async Generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, async-iteration, Symbol.asyncIterator, class-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+
+ ...
+ 2. Let value be ? GetValue(exprRef).
+ 3. Let generatorKind be ! GetGeneratorKind().
+ 4. Let iterator be ? GetIterator(value, generatorKind).
+ 5. Let received be NormalCompletion(undefined).
+ 6. Repeat
+ a. If received.[[Type]] is normal, then
+ i. Let innerResult be ? IteratorNext(iterator, received.[[Value]]).
+ ii. Let innerResult be ? Invoke(iterator, "next",
+ « received.[[Value]] »).
+ iii. If generatorKind is async, then set innerResult to
+ ? Await(innerResult).
+ ...
+ v. Let done be ? IteratorComplete(innerResult).
+ vi. If done is true, then
+ 1. Return ? IteratorValue(innerResult).
+ vii. Let received be GeneratorYield(innerResult).
+ ...
+
+ GetIterator ( obj [ , hint ] )
+
+ ...
+ 3. If hint is async,
+ a. Set method to ? GetMethod(obj, @@asyncIterator).
+ b. If method is undefined,
+ i. Let syncMethod be ? GetMethod(obj, @@iterator).
+ ii. Let syncIterator be ? Call(syncMethod, obj).
+ iii. Return ? CreateAsyncFromSyncIterator(syncIterator).
+ ...
+
+ %AsyncFromSyncIteratorPrototype%.next ( value )
+
+ ...
+ 5. Let nextResult be IteratorNext(syncIterator, value).
+ ...
+ 7. Let nextValue be IteratorValue(nextResult).
+ ...
+ 9. Let nextDone be IteratorComplete(nextResult).
+ ...
+ 12. Perform ! Call(valueWrapperCapability.[[Resolve]], undefined,
+ « nextValue »).
+ ...
+ 14. Set onFulfilled.[[Done]] to nextDone.
+ 15. Perform ! PerformPromiseThen(valueWrapperCapability.[[Promise]],
+ onFulfilled, undefined, promiseCapability).
+ ...
+
+ Async Iterator Value Unwrap Functions
+
+ 1. Return ! CreateIterResultObject(value, F.[[Done]]).
+
+---*/
+var log = [];
+var obj = {
+ get [Symbol.iterator]() {
+ log.push({
+ name: "get [Symbol.iterator]",
+ thisValue: this
+ });
+ return function() {
+ log.push({
+ name: "call [Symbol.iterator]",
+ thisValue: this,
+ args: [...arguments]
+ });
+ var nextCount = 0;
+ return {
+ name: "syncIterator",
+ get next() {
+ log.push({
+ name: "get next",
+ thisValue: this
+ });
+ return function() {
+ log.push({
+ name: "call next",
+ thisValue: this,
+ args: [...arguments]
+ });
+
+ nextCount++;
+ if (nextCount == 1) {
+ return {
+ name: "next-result-1",
+ get value() {
+ log.push({
+ name: "get next value (1)",
+ thisValue: this
+ });
+ return "next-value-1";
+ },
+ get done() {
+ log.push({
+ name: "get next done (1)",
+ thisValue: this
+ });
+ return false;
+ }
+ };
+ }
+
+ return {
+ name: "next-result-2",
+ get value() {
+ log.push({
+ name: "get next value (2)",
+ thisValue: this
+ });
+ return "next-value-2";
+ },
+ get done() {
+ log.push({
+ name: "get next done (2)",
+ thisValue: this
+ });
+ return true;
+ }
+ };
+ };
+ }
+ };
+ };
+ },
+ get [Symbol.asyncIterator]() {
+ log.push({ name: "get [Symbol.asyncIterator]" });
+ return null;
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ async *#gen() {
+ callCount += 1;
+ log.push({ name: "before yield*" });
+ var v = yield* obj;
+ log.push({
+ name: "after yield*",
+ value: v
+ });
+ return "return-value";
+
+ }
+ get gen() { return this.#gen; }
+}
+
+const c = new C();
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
+
+var iter = c.gen();
+
+assert.sameValue(log.length, 0, "log.length");
+
+iter.next("next-arg-1").then(v => {
+ assert.sameValue(log[0].name, "before yield*");
+
+ assert.sameValue(log[1].name, "get [Symbol.asyncIterator]");
+
+ assert.sameValue(log[2].name, "get [Symbol.iterator]");
+ assert.sameValue(log[2].thisValue, obj, "get [Symbol.iterator] thisValue");
+
+ assert.sameValue(log[3].name, "call [Symbol.iterator]");
+ assert.sameValue(log[3].thisValue, obj, "[Symbol.iterator] thisValue");
+ assert.sameValue(log[3].args.length, 0, "[Symbol.iterator] args.length");
+
+ assert.sameValue(log[4].name, "get next");
+ assert.sameValue(log[4].thisValue.name, "syncIterator", "get next thisValue");
+
+ assert.sameValue(log[5].name, "call next");
+ assert.sameValue(log[5].thisValue.name, "syncIterator", "next thisValue");
+ assert.sameValue(log[5].args.length, 1, "next args.length");
+ assert.sameValue(log[5].args[0], undefined, "next args[0]");
+
+ assert.sameValue(log[6].name, "get next done (1)");
+ assert.sameValue(log[6].thisValue.name, "next-result-1", "get next done thisValue");
+
+ assert.sameValue(log[7].name, "get next value (1)");
+ assert.sameValue(log[7].thisValue.name, "next-result-1", "get next value thisValue");
+
+ assert.sameValue(v.value, "next-value-1");
+ assert.sameValue(v.done, false);
+
+ assert.sameValue(log.length, 8, "log.length");
+
+ iter.next("next-arg-2").then(v => {
+ assert.sameValue(log[8].name, "call next");
+ assert.sameValue(log[8].thisValue.name, "syncIterator", "next thisValue");
+ assert.sameValue(log[8].args.length, 1, "next args.length");
+ assert.sameValue(log[8].args[0], "next-arg-2", "next args[0]");
+
+ assert.sameValue(log[9].name, "get next done (2)");
+ assert.sameValue(log[9].thisValue.name, "next-result-2", "get next done thisValue");
+
+ assert.sameValue(log[10].name, "get next value (2)");
+ assert.sameValue(log[10].thisValue.name, "next-result-2", "get next value thisValue");
+
+ assert.sameValue(log[11].name, "after yield*");
+ assert.sameValue(log[11].value, "next-value-2");
+
+ assert.sameValue(v.value, "return-value");
+ assert.sameValue(v.done, true);
+
+ assert.sameValue(log.length, 12, "log.length");
+ }).then($DONE, $DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-sync-return.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-sync-return.js
new file mode 100644
index 0000000000..ea4577649c
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-sync-return.js
@@ -0,0 +1,235 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-sync-return.case
+// - src/async-generators/default/async-class-decl-private-method.template
+/*---
+description: execution order for yield* with sync iterator and return() (Async Generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, async-iteration, Symbol.asyncIterator, class-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+
+ ...
+ 6. Repeat
+ ...
+ c. Else,
+ i. Assert: received.[[Type]] is return.
+ ii. Let return be ? GetMethod(iterator, "return").
+ iii. If return is undefined, return Completion(received).
+ iv. Let innerReturnResult be ? Call(return, iterator,
+ « received.[[Value]] »).
+ v. If generatorKind is async, then set innerReturnResult to
+ ? Await(innerReturnResult).
+ ...
+ vii. Let done be ? IteratorComplete(innerReturnResult).
+ viii. If done is true, then
+ 1. Let value be ? IteratorValue(innerReturnResult).
+ 2. Return Completion{[[Type]]: return, [[Value]]: value,
+ [[Target]]: empty}.
+ ix. Let received be GeneratorYield(innerResult).
+
+ %AsyncFromSyncIteratorPrototype%.return ( value )
+
+ 5. Let return be GetMethod(syncIterator, "return").
+ ...
+ ...
+ 8. Let returnResult be Call(return, syncIterator, « value »).
+ ...
+ 11. Let returnValue be IteratorValue(returnResult).
+ ..
+ 13. Let returnDone be IteratorComplete(returnResult).
+ ...
+ 16. Perform ! Call(valueWrapperCapability.[[Resolve]], undefined, « returnValue »).
+ ...
+ 18. Set onFulfilled.[[Done]] to returnDone.
+ 19. Perform ! PerformPromiseThen(valueWrapperCapability.[[Promise]],
+ onFulfilled, undefined, promiseCapability).
+ ...
+
+---*/
+var log = [];
+var obj = {
+ [Symbol.iterator]() {
+ var returnCount = 0;
+ return {
+ name: "syncIterator",
+ get next() {
+ log.push({ name: "get next" });
+ return function() {
+ return {
+ value: "next-value-1",
+ done: false
+ };
+ };
+ },
+ get return() {
+ log.push({
+ name: "get return",
+ thisValue: this
+ });
+ return function() {
+ log.push({
+ name: "call return",
+ thisValue: this,
+ args: [...arguments]
+ });
+
+ returnCount++;
+ if (returnCount == 1) {
+ return {
+ name: "return-result-1",
+ get value() {
+ log.push({
+ name: "get return value (1)",
+ thisValue: this
+ });
+ return "return-value-1";
+ },
+ get done() {
+ log.push({
+ name: "get return done (1)",
+ thisValue: this
+ });
+ return false;
+ }
+ };
+ }
+
+ return {
+ name: "return-result-2",
+ get value() {
+ log.push({
+ name: "get return value (2)",
+ thisValue: this
+ });
+ return "return-value-2";
+ },
+ get done() {
+ log.push({
+ name: "get return done (2)",
+ thisValue: this
+ });
+ return true;
+ }
+ };
+ };
+ }
+ };
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ async *#gen() {
+ callCount += 1;
+ log.push({ name: "before yield*" });
+ yield* obj;
+
+ }
+ get gen() { return this.#gen; }
+}
+
+const c = new C();
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
+
+var iter = c.gen();
+
+assert.sameValue(log.length, 0, "log.length");
+
+iter.next().then(v => {
+ assert.sameValue(log[0].name, "before yield*");
+
+ assert.sameValue(log[1].name, "get next");
+
+ assert.sameValue(v.value, "next-value-1");
+ assert.sameValue(v.done, false);
+
+ assert.sameValue(log.length, 2, "log.length");
+
+ iter.return("return-arg-1").then(v => {
+ assert.sameValue(log[2].name, "get return");
+ assert.sameValue(log[2].thisValue.name, "syncIterator", "get return thisValue");
+
+ assert.sameValue(log[3].name, "call return");
+ assert.sameValue(log[3].thisValue.name, "syncIterator", "return thisValue");
+ assert.sameValue(log[3].args.length, 1, "return args.length");
+ assert.sameValue(log[3].args[0], "return-arg-1", "return args[0]");
+
+ assert.sameValue(log[4].name, "get return done (1)");
+ assert.sameValue(log[4].thisValue.name, "return-result-1", "get return done thisValue");
+
+ assert.sameValue(log[5].name, "get return value (1)");
+ assert.sameValue(log[5].thisValue.name, "return-result-1", "get return value thisValue");
+
+ assert.sameValue(v.value, "return-value-1");
+ assert.sameValue(v.done, false);
+
+ assert.sameValue(log.length, 6, "log.length");
+
+ iter.return().then(v => {
+ assert.sameValue(log[6].name, "get return");
+ assert.sameValue(log[6].thisValue.name, "syncIterator", "get return thisValue");
+
+ assert.sameValue(log[7].name, "call return");
+ assert.sameValue(log[7].thisValue.name, "syncIterator", "get return thisValue");
+ assert.sameValue(log[7].args.length, 1, "return args.length");
+ assert.sameValue(log[7].args[0], undefined, "return args[0]");
+
+ assert.sameValue(log[8].name, "get return done (2)");
+ assert.sameValue(log[8].thisValue.name, "return-result-2", "get return done thisValue");
+
+ assert.sameValue(log[9].name, "get return value (2)");
+ assert.sameValue(log[9].thisValue.name, "return-result-2", "get return value thisValue");
+
+ assert.sameValue(v.value, "return-value-2");
+ assert.sameValue(v.done, true);
+
+ assert.sameValue(log.length, 10, "log.length");
+ }).then($DONE, $DONE);
+ }).catch($DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-sync-throw.js b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-sync-throw.js
new file mode 100644
index 0000000000..3579ace644
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-gen-private-method/yield-star-sync-throw.js
@@ -0,0 +1,241 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-generators/yield-star-sync-throw.case
+// - src/async-generators/default/async-class-decl-private-method.template
+/*---
+description: execution order for yield* with sync iterator and throw() (Async Generator method as a ClassDeclaration element)
+esid: prod-AsyncGeneratorPrivateMethod
+features: [Symbol.iterator, async-iteration, class-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ Async Generator Function Definitions
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+
+ YieldExpression: yield * AssignmentExpression
+
+ ...
+ 6. Repeat
+ ...
+ b. Else if received.[[Type]] is throw, then
+ i. Let throw be ? GetMethod(iterator, "throw").
+ ii. If throw is not undefined, then
+ 1. Let innerResult be ? Call(throw, iterator, « received.[[Value]] »).
+ 2. If generatorKind is async, then set innerResult to
+ ? Await(innerResult).
+ ...
+ 5. Let done be ? IteratorComplete(innerResult).
+ 6. If done is true, then
+ a. Return ? IteratorValue(innerResult).
+ 7. Let received be GeneratorYield(innerResult).
+ ...
+
+ %AsyncFromSyncIteratorPrototype%.throw ( value )
+
+ ...
+ 5. Let throw be GetMethod(syncIterator, "throw").
+ ...
+ 8. Let throwResult be Call(throw, syncIterator, « value »).
+ ...
+ 11. Let throwValue be IteratorValue(throwResult).
+ ...
+ 13. Let throwDone be IteratorComplete(throwResult).
+ ...
+ 16. Perform ! Call(valueWrapperCapability.[[Resolve]], undefined,
+ « throwValue »).
+ ...
+ 18. Set onFulfilled.[[Done]] to throwDone.
+ 19. Perform ! PerformPromiseThen(valueWrapperCapability.[[Promise]],
+ onFulfilled, undefined, promiseCapability).
+ ...
+
+---*/
+var log = [];
+var obj = {
+ [Symbol.iterator]() {
+ var throwCount = 0;
+ return {
+ name: "syncIterator",
+ get next() {
+ log.push({ name: "get next" });
+ return function() {
+ return {
+ value: "next-value-1",
+ done: false
+ };
+ };
+ },
+ get throw() {
+ log.push({
+ name: "get throw",
+ thisValue: this
+ });
+ return function() {
+ log.push({
+ name: "call throw",
+ thisValue: this,
+ args: [...arguments]
+ });
+
+ throwCount++;
+ if (throwCount == 1) {
+ return {
+ name: "throw-result-1",
+ get value() {
+ log.push({
+ name: "get throw value (1)",
+ thisValue: this
+ });
+ return "throw-value-1";
+ },
+ get done() {
+ log.push({
+ name: "get throw done (1)",
+ thisValue: this
+ });
+ return false;
+ }
+ };
+ }
+
+ return {
+ name: "throw-result-2",
+ get value() {
+ log.push({
+ name: "get throw value (2)",
+ thisValue: this
+ });
+ return "throw-value-2";
+ },
+ get done() {
+ log.push({
+ name: "get throw done (2)",
+ thisValue: this
+ });
+ return true;
+ }
+ };
+ };
+ }
+ };
+ }
+};
+
+
+
+var callCount = 0;
+
+class C {
+ async *#gen() {
+ callCount += 1;
+ log.push({ name: "before yield*" });
+ var v = yield* obj;
+ log.push({
+ name: "after yield*",
+ value: v
+ });
+ return "return-value";
+
+ }
+ get gen() { return this.#gen; }
+}
+
+const c = new C();
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
+
+var iter = c.gen();
+
+assert.sameValue(log.length, 0, "log.length");
+
+iter.next().then(v => {
+ assert.sameValue(log[0].name, "before yield*");
+
+ assert.sameValue(log[1].name, "get next");
+
+ assert.sameValue(v.value, "next-value-1");
+ assert.sameValue(v.done, false);
+
+ assert.sameValue(log.length, 2, "log.length");
+
+ iter.throw("throw-arg-1").then(v => {
+ assert.sameValue(log[2].name, "get throw");
+ assert.sameValue(log[2].thisValue.name, "syncIterator", "get throw thisValue");
+
+ assert.sameValue(log[3].name, "call throw");
+ assert.sameValue(log[3].thisValue.name, "syncIterator", "throw thisValue");
+ assert.sameValue(log[3].args.length, 1, "throw args.length");
+ assert.sameValue(log[3].args[0], "throw-arg-1", "throw args[0]");
+
+ assert.sameValue(log[4].name, "get throw done (1)");
+ assert.sameValue(log[4].thisValue.name, "throw-result-1", "get throw done thisValue");
+
+ assert.sameValue(log[5].name, "get throw value (1)");
+ assert.sameValue(log[5].thisValue.name, "throw-result-1", "get throw value thisValue");
+
+ assert.sameValue(v.value, "throw-value-1");
+ assert.sameValue(v.done, false);
+
+ assert.sameValue(log.length, 6, "log.length");
+
+ iter.throw().then(v => {
+ assert.sameValue(log[6].name, "get throw");
+ assert.sameValue(log[6].thisValue.name, "syncIterator", "get throw thisValue");
+
+ assert.sameValue(log[7].name, "call throw");
+ assert.sameValue(log[7].thisValue.name, "syncIterator", "throw thisValue");
+ assert.sameValue(log[7].args.length, 1, "throw args.length");
+ assert.sameValue(log[7].args[0], undefined, "throw args[0]");
+
+ assert.sameValue(log[8].name, "get throw done (2)");
+ assert.sameValue(log[8].thisValue.name, "throw-result-2", "get throw done thisValue");
+
+ assert.sameValue(log[9].name, "get throw value (2)");
+ assert.sameValue(log[9].thisValue.name, "throw-result-2", "get throw value thisValue");
+
+ assert.sameValue(log[10].name, "after yield*");
+ assert.sameValue(log[10].value, "throw-value-2");
+
+ assert.sameValue(v.value, "return-value");
+ assert.sameValue(v.done, true);
+
+ assert.sameValue(log.length, 11, "log.length");
+ }).then($DONE, $DONE);
+ }).catch($DONE);
+}).catch($DONE);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "#gen does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "#gen does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "#gen does not appear as an own property on C instance"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-private-method-static/await-as-binding-identifier-escaped.js b/js/src/tests/test262/language/statements/class/elements/async-private-method-static/await-as-binding-identifier-escaped.js
new file mode 100644
index 0000000000..65094a194e
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-private-method-static/await-as-binding-identifier-escaped.js
@@ -0,0 +1,41 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/async-functions/await-as-binding-identifier-escaped.case
+// - src/async-functions/syntax/async-class-decl-static-private-method.template
+/*---
+description: await is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Static async private method as a ClassDeclaration element)
+esid: prod-AsyncMethod
+features: [async-functions, class-static-methods-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncMethod
+
+ Async Function Definitions
+
+ AsyncMethod :
+ async [no LineTerminator here] # PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
+
+
+ BindingIdentifier : Identifier
+
+ It is a Syntax Error if this production has a [Await] parameter and
+ StringValue of Identifier is "await".
+
+---*/
+$DONOTEVALUATE();
+
+
+class C {
+ static async #method() {
+ var \u0061wait;
+ }
+}
+
+
diff --git a/js/src/tests/test262/language/statements/class/elements/async-private-method-static/await-as-binding-identifier.js b/js/src/tests/test262/language/statements/class/elements/async-private-method-static/await-as-binding-identifier.js
new file mode 100644
index 0000000000..03633af3f5
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-private-method-static/await-as-binding-identifier.js
@@ -0,0 +1,41 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/async-functions/await-as-binding-identifier.case
+// - src/async-functions/syntax/async-class-decl-static-private-method.template
+/*---
+description: await is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Static async private method as a ClassDeclaration element)
+esid: prod-AsyncMethod
+features: [async-functions, class-static-methods-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncMethod
+
+ Async Function Definitions
+
+ AsyncMethod :
+ async [no LineTerminator here] # PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
+
+
+ BindingIdentifier : Identifier
+
+ It is a Syntax Error if this production has a [Await] parameter and
+ StringValue of Identifier is "await".
+
+---*/
+$DONOTEVALUATE();
+
+
+class C {
+ static async #method() {
+ var await;
+ }
+}
+
+
diff --git a/js/src/tests/test262/language/statements/class/elements/async-private-method-static/await-as-identifier-reference-escaped.js b/js/src/tests/test262/language/statements/class/elements/async-private-method-static/await-as-identifier-reference-escaped.js
new file mode 100644
index 0000000000..9497de6af9
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-private-method-static/await-as-identifier-reference-escaped.js
@@ -0,0 +1,41 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/async-functions/await-as-identifier-reference-escaped.case
+// - src/async-functions/syntax/async-class-decl-static-private-method.template
+/*---
+description: await is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Static async private method as a ClassDeclaration element)
+esid: prod-AsyncMethod
+features: [async-functions, class-static-methods-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncMethod
+
+ Async Function Definitions
+
+ AsyncMethod :
+ async [no LineTerminator here] # PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
+
+
+ IdentifierReference : Identifier
+
+ It is a Syntax Error if this production has a [Await] parameter and
+ StringValue of Identifier is "await".
+
+---*/
+$DONOTEVALUATE();
+
+
+class C {
+ static async #method() {
+ void \u0061wait;
+ }
+}
+
+
diff --git a/js/src/tests/test262/language/statements/class/elements/async-private-method-static/await-as-identifier-reference.js b/js/src/tests/test262/language/statements/class/elements/async-private-method-static/await-as-identifier-reference.js
new file mode 100644
index 0000000000..186b301db2
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-private-method-static/await-as-identifier-reference.js
@@ -0,0 +1,41 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/async-functions/await-as-identifier-reference.case
+// - src/async-functions/syntax/async-class-decl-static-private-method.template
+/*---
+description: await is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Static async private method as a ClassDeclaration element)
+esid: prod-AsyncMethod
+features: [async-functions, class-static-methods-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncMethod
+
+ Async Function Definitions
+
+ AsyncMethod :
+ async [no LineTerminator here] # PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
+
+
+ IdentifierReference : Identifier
+
+ It is a Syntax Error if this production has a [Await] parameter and
+ StringValue of Identifier is "await".
+
+---*/
+$DONOTEVALUATE();
+
+
+class C {
+ static async #method() {
+ void await;
+ }
+}
+
+
diff --git a/js/src/tests/test262/language/statements/class/elements/async-private-method-static/await-as-label-identifier-escaped.js b/js/src/tests/test262/language/statements/class/elements/async-private-method-static/await-as-label-identifier-escaped.js
new file mode 100644
index 0000000000..79c9a46179
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-private-method-static/await-as-label-identifier-escaped.js
@@ -0,0 +1,41 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/async-functions/await-as-label-identifier-escaped.case
+// - src/async-functions/syntax/async-class-decl-static-private-method.template
+/*---
+description: await is a reserved keyword within generator function bodies and may not be used as a label identifier. (Static async private method as a ClassDeclaration element)
+esid: prod-AsyncMethod
+features: [async-functions, class-static-methods-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncMethod
+
+ Async Function Definitions
+
+ AsyncMethod :
+ async [no LineTerminator here] # PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
+
+
+ LabelIdentifier : Identifier
+
+ It is a Syntax Error if this production has a [Await] parameter and
+ StringValue of Identifier is "await".
+
+---*/
+$DONOTEVALUATE();
+
+
+class C {
+ static async #method() {
+ \u0061wait: ;
+ }
+}
+
+
diff --git a/js/src/tests/test262/language/statements/class/elements/async-private-method-static/await-as-label-identifier.js b/js/src/tests/test262/language/statements/class/elements/async-private-method-static/await-as-label-identifier.js
new file mode 100644
index 0000000000..d0493a7bac
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-private-method-static/await-as-label-identifier.js
@@ -0,0 +1,41 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/async-functions/await-as-label-identifier.case
+// - src/async-functions/syntax/async-class-decl-static-private-method.template
+/*---
+description: await is a reserved keyword within generator function bodies and may not be used as a label identifier. (Static async private method as a ClassDeclaration element)
+esid: prod-AsyncMethod
+features: [async-functions, class-static-methods-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncMethod
+
+ Async Function Definitions
+
+ AsyncMethod :
+ async [no LineTerminator here] # PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
+
+
+ LabelIdentifier : Identifier
+
+ It is a Syntax Error if this production has a [Await] parameter and
+ StringValue of Identifier is "await".
+
+---*/
+$DONOTEVALUATE();
+
+
+class C {
+ static async #method() {
+ await: ;
+ }
+}
+
+
diff --git a/js/src/tests/test262/language/statements/class/elements/async-private-method-static/browser.js b/js/src/tests/test262/language/statements/class/elements/async-private-method-static/browser.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-private-method-static/browser.js
diff --git a/js/src/tests/test262/language/statements/class/elements/async-private-method-static/returns-async-arrow-returns-arguments-from-parent-function.js b/js/src/tests/test262/language/statements/class/elements/async-private-method-static/returns-async-arrow-returns-arguments-from-parent-function.js
new file mode 100644
index 0000000000..8fceeed5d1
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-private-method-static/returns-async-arrow-returns-arguments-from-parent-function.js
@@ -0,0 +1,44 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-functions/returns-async-arrow-returns-arguments-from-parent-function.case
+// - src/async-functions/evaluation/async-class-decl-static-private-method.template
+/*---
+description: Async function returns an async function. (Static async private method as a ClassDeclaration element)
+esid: prod-AsyncMethod
+features: [async-functions, class-static-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncMethod
+
+ Async Function Definitions
+
+ AsyncMethod :
+ async [no LineTerminator here] # PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
+
+---*/
+let count = 0;
+
+
+class C {
+ static async #method(x) {
+ let a = arguments;
+ return async () => a === arguments;
+ }
+ static async method(x) {
+ return this.#method(x);
+ }
+}
+// Stores a reference `asyncFn` for case evaluation
+let asyncFn = C.method.bind(C);
+
+asyncFn().then(retFn => {
+ count++;
+ return retFn();
+}).then(result => {
+ assert.sameValue(result, true);
+ assert.sameValue(count, 1);
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-private-method-static/returns-async-arrow-returns-newtarget.js b/js/src/tests/test262/language/statements/class/elements/async-private-method-static/returns-async-arrow-returns-newtarget.js
new file mode 100644
index 0000000000..3946ffd23a
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-private-method-static/returns-async-arrow-returns-newtarget.js
@@ -0,0 +1,43 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-functions/returns-async-arrow-returns-newtarget.case
+// - src/async-functions/evaluation/async-class-decl-static-private-method.template
+/*---
+description: Async function returns an async function. (Static async private method as a ClassDeclaration element)
+esid: prod-AsyncMethod
+features: [async-functions, class-static-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncMethod
+
+ Async Function Definitions
+
+ AsyncMethod :
+ async [no LineTerminator here] # PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
+
+---*/
+let count = 0;
+
+
+class C {
+ static async #method(x) {
+ return async () => new.target;
+ }
+ static async method(x) {
+ return this.#method(x);
+ }
+}
+// Stores a reference `asyncFn` for case evaluation
+let asyncFn = C.method.bind(C);
+
+asyncFn().then(retFn => {
+ count++;
+ return retFn();
+}).then(result => {
+ assert.sameValue(result, undefined);
+ assert.sameValue(count, 1);
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-private-method-static/returns-async-arrow.js b/js/src/tests/test262/language/statements/class/elements/async-private-method-static/returns-async-arrow.js
new file mode 100644
index 0000000000..ae1ac57bf9
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-private-method-static/returns-async-arrow.js
@@ -0,0 +1,43 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-functions/returns-async-arrow.case
+// - src/async-functions/evaluation/async-class-decl-static-private-method.template
+/*---
+description: Async function returns an async function. (Static async private method as a ClassDeclaration element)
+esid: prod-AsyncMethod
+features: [async-functions, class-static-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncMethod
+
+ Async Function Definitions
+
+ AsyncMethod :
+ async [no LineTerminator here] # PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
+
+---*/
+let count = 0;
+
+
+class C {
+ static async #method(x) {
+ return async () => x;
+ }
+ static async method(x) {
+ return this.#method(x);
+ }
+}
+// Stores a reference `asyncFn` for case evaluation
+let asyncFn = C.method.bind(C);
+
+asyncFn(1).then(retFn => {
+ count++;
+ return retFn();
+}).then(result => {
+ assert.sameValue(result, 1);
+ assert.sameValue(count, 1);
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-private-method-static/returns-async-function-returns-arguments-from-own-function.js b/js/src/tests/test262/language/statements/class/elements/async-private-method-static/returns-async-function-returns-arguments-from-own-function.js
new file mode 100644
index 0000000000..692da97eee
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-private-method-static/returns-async-function-returns-arguments-from-own-function.js
@@ -0,0 +1,44 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-functions/returns-async-function-returns-arguments-from-own-function.case
+// - src/async-functions/evaluation/async-class-decl-static-private-method.template
+/*---
+description: Async function returns an async function. (Static async private method as a ClassDeclaration element)
+esid: prod-AsyncMethod
+features: [async-functions, class-static-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncMethod
+
+ Async Function Definitions
+
+ AsyncMethod :
+ async [no LineTerminator here] # PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
+
+---*/
+let count = 0;
+
+
+class C {
+ static async #method(x) {
+ let a = arguments;
+ return async function() { return a === arguments; };
+ }
+ static async method(x) {
+ return this.#method(x);
+ }
+}
+// Stores a reference `asyncFn` for case evaluation
+let asyncFn = C.method.bind(C);
+
+asyncFn(1).then(retFn => {
+ count++;
+ return retFn();
+}).then(result => {
+ assert.sameValue(result, false);
+ assert.sameValue(count, 1);
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-private-method-static/returns-async-function-returns-newtarget.js b/js/src/tests/test262/language/statements/class/elements/async-private-method-static/returns-async-function-returns-newtarget.js
new file mode 100644
index 0000000000..0b2351911d
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-private-method-static/returns-async-function-returns-newtarget.js
@@ -0,0 +1,43 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-functions/returns-async-function-returns-newtarget.case
+// - src/async-functions/evaluation/async-class-decl-static-private-method.template
+/*---
+description: Async function returns an async function. (Static async private method as a ClassDeclaration element)
+esid: prod-AsyncMethod
+features: [async-functions, class-static-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncMethod
+
+ Async Function Definitions
+
+ AsyncMethod :
+ async [no LineTerminator here] # PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
+
+---*/
+let count = 0;
+
+
+class C {
+ static async #method(x) {
+ return async function() { return new.target; };
+ }
+ static async method(x) {
+ return this.#method(x);
+ }
+}
+// Stores a reference `asyncFn` for case evaluation
+let asyncFn = C.method.bind(C);
+
+asyncFn(1).then(retFn => {
+ count++;
+ return retFn();
+}).then(result => {
+ assert.sameValue(result, undefined);
+ assert.sameValue(count, 1);
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-private-method-static/returns-async-function.js b/js/src/tests/test262/language/statements/class/elements/async-private-method-static/returns-async-function.js
new file mode 100644
index 0000000000..8bdec77ce3
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-private-method-static/returns-async-function.js
@@ -0,0 +1,43 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-functions/returns-async-function.case
+// - src/async-functions/evaluation/async-class-decl-static-private-method.template
+/*---
+description: Async function returns an async function. (Static async private method as a ClassDeclaration element)
+esid: prod-AsyncMethod
+features: [async-functions, class-static-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncMethod
+
+ Async Function Definitions
+
+ AsyncMethod :
+ async [no LineTerminator here] # PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
+
+---*/
+let count = 0;
+
+
+class C {
+ static async #method(x) {
+ return async function() { return x; };
+ }
+ static async method(x) {
+ return this.#method(x);
+ }
+}
+// Stores a reference `asyncFn` for case evaluation
+let asyncFn = C.method.bind(C);
+
+asyncFn(1).then(retFn => {
+ count++;
+ return retFn();
+}).then(result => {
+ assert.sameValue(result, 1);
+ assert.sameValue(count, 1);
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-private-method-static/shell.js b/js/src/tests/test262/language/statements/class/elements/async-private-method-static/shell.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-private-method-static/shell.js
diff --git a/js/src/tests/test262/language/statements/class/elements/async-private-method/await-as-binding-identifier-escaped.js b/js/src/tests/test262/language/statements/class/elements/async-private-method/await-as-binding-identifier-escaped.js
new file mode 100644
index 0000000000..d40bf022b2
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-private-method/await-as-binding-identifier-escaped.js
@@ -0,0 +1,39 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/async-functions/await-as-binding-identifier-escaped.case
+// - src/async-functions/syntax/async-class-decl-private-method.template
+/*---
+description: await is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Async private method as a ClassDeclaration element)
+esid: prod-AsyncMethod
+features: [async-functions, class-methods-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncMethod
+
+ Async Function Definitions
+
+ AsyncMethod :
+ async [no LineTerminator here] # PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
+
+
+ BindingIdentifier : Identifier
+
+ It is a Syntax Error if this production has a [Await] parameter and
+ StringValue of Identifier is "await".
+
+---*/
+$DONOTEVALUATE();
+
+
+class C {
+ async #method() {
+ var \u0061wait;
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/async-private-method/await-as-binding-identifier.js b/js/src/tests/test262/language/statements/class/elements/async-private-method/await-as-binding-identifier.js
new file mode 100644
index 0000000000..cf96ab3b04
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-private-method/await-as-binding-identifier.js
@@ -0,0 +1,39 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/async-functions/await-as-binding-identifier.case
+// - src/async-functions/syntax/async-class-decl-private-method.template
+/*---
+description: await is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Async private method as a ClassDeclaration element)
+esid: prod-AsyncMethod
+features: [async-functions, class-methods-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncMethod
+
+ Async Function Definitions
+
+ AsyncMethod :
+ async [no LineTerminator here] # PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
+
+
+ BindingIdentifier : Identifier
+
+ It is a Syntax Error if this production has a [Await] parameter and
+ StringValue of Identifier is "await".
+
+---*/
+$DONOTEVALUATE();
+
+
+class C {
+ async #method() {
+ var await;
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/async-private-method/await-as-identifier-reference-escaped.js b/js/src/tests/test262/language/statements/class/elements/async-private-method/await-as-identifier-reference-escaped.js
new file mode 100644
index 0000000000..6a0207039f
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-private-method/await-as-identifier-reference-escaped.js
@@ -0,0 +1,39 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/async-functions/await-as-identifier-reference-escaped.case
+// - src/async-functions/syntax/async-class-decl-private-method.template
+/*---
+description: await is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Async private method as a ClassDeclaration element)
+esid: prod-AsyncMethod
+features: [async-functions, class-methods-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncMethod
+
+ Async Function Definitions
+
+ AsyncMethod :
+ async [no LineTerminator here] # PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
+
+
+ IdentifierReference : Identifier
+
+ It is a Syntax Error if this production has a [Await] parameter and
+ StringValue of Identifier is "await".
+
+---*/
+$DONOTEVALUATE();
+
+
+class C {
+ async #method() {
+ void \u0061wait;
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/async-private-method/await-as-identifier-reference.js b/js/src/tests/test262/language/statements/class/elements/async-private-method/await-as-identifier-reference.js
new file mode 100644
index 0000000000..7931167ccd
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-private-method/await-as-identifier-reference.js
@@ -0,0 +1,39 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/async-functions/await-as-identifier-reference.case
+// - src/async-functions/syntax/async-class-decl-private-method.template
+/*---
+description: await is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Async private method as a ClassDeclaration element)
+esid: prod-AsyncMethod
+features: [async-functions, class-methods-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncMethod
+
+ Async Function Definitions
+
+ AsyncMethod :
+ async [no LineTerminator here] # PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
+
+
+ IdentifierReference : Identifier
+
+ It is a Syntax Error if this production has a [Await] parameter and
+ StringValue of Identifier is "await".
+
+---*/
+$DONOTEVALUATE();
+
+
+class C {
+ async #method() {
+ void await;
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/async-private-method/await-as-label-identifier-escaped.js b/js/src/tests/test262/language/statements/class/elements/async-private-method/await-as-label-identifier-escaped.js
new file mode 100644
index 0000000000..20905576ef
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-private-method/await-as-label-identifier-escaped.js
@@ -0,0 +1,39 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/async-functions/await-as-label-identifier-escaped.case
+// - src/async-functions/syntax/async-class-decl-private-method.template
+/*---
+description: await is a reserved keyword within generator function bodies and may not be used as a label identifier. (Async private method as a ClassDeclaration element)
+esid: prod-AsyncMethod
+features: [async-functions, class-methods-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncMethod
+
+ Async Function Definitions
+
+ AsyncMethod :
+ async [no LineTerminator here] # PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
+
+
+ LabelIdentifier : Identifier
+
+ It is a Syntax Error if this production has a [Await] parameter and
+ StringValue of Identifier is "await".
+
+---*/
+$DONOTEVALUATE();
+
+
+class C {
+ async #method() {
+ \u0061wait: ;
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/async-private-method/await-as-label-identifier.js b/js/src/tests/test262/language/statements/class/elements/async-private-method/await-as-label-identifier.js
new file mode 100644
index 0000000000..c6859c2ecc
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-private-method/await-as-label-identifier.js
@@ -0,0 +1,39 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/async-functions/await-as-label-identifier.case
+// - src/async-functions/syntax/async-class-decl-private-method.template
+/*---
+description: await is a reserved keyword within generator function bodies and may not be used as a label identifier. (Async private method as a ClassDeclaration element)
+esid: prod-AsyncMethod
+features: [async-functions, class-methods-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncMethod
+
+ Async Function Definitions
+
+ AsyncMethod :
+ async [no LineTerminator here] # PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
+
+
+ LabelIdentifier : Identifier
+
+ It is a Syntax Error if this production has a [Await] parameter and
+ StringValue of Identifier is "await".
+
+---*/
+$DONOTEVALUATE();
+
+
+class C {
+ async #method() {
+ await: ;
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/async-private-method/browser.js b/js/src/tests/test262/language/statements/class/elements/async-private-method/browser.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-private-method/browser.js
diff --git a/js/src/tests/test262/language/statements/class/elements/async-private-method/returns-async-arrow-returns-arguments-from-parent-function.js b/js/src/tests/test262/language/statements/class/elements/async-private-method/returns-async-arrow-returns-arguments-from-parent-function.js
new file mode 100644
index 0000000000..a40fd874eb
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-private-method/returns-async-arrow-returns-arguments-from-parent-function.js
@@ -0,0 +1,45 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-functions/returns-async-arrow-returns-arguments-from-parent-function.case
+// - src/async-functions/evaluation/async-class-decl-private-method.template
+/*---
+description: Async function returns an async function. (Async private method as a ClassDeclaration element)
+esid: prod-AsyncMethod
+features: [async-functions, class-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncMethod
+
+ Async Function Definitions
+
+ AsyncMethod :
+ async [no LineTerminator here] # PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
+
+---*/
+let count = 0;
+
+
+class C {
+ async #method(x) {
+ let a = arguments;
+ return async () => a === arguments;
+ }
+ async method(x) {
+ return this.#method(x);
+ }
+}
+// Stores a reference `asyncFn` for case evaluation
+let c = new C();
+let asyncFn = c.method.bind(c);
+
+asyncFn().then(retFn => {
+ count++;
+ return retFn();
+}).then(result => {
+ assert.sameValue(result, true);
+ assert.sameValue(count, 1);
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-private-method/returns-async-arrow-returns-newtarget.js b/js/src/tests/test262/language/statements/class/elements/async-private-method/returns-async-arrow-returns-newtarget.js
new file mode 100644
index 0000000000..f960ba8e6f
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-private-method/returns-async-arrow-returns-newtarget.js
@@ -0,0 +1,44 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-functions/returns-async-arrow-returns-newtarget.case
+// - src/async-functions/evaluation/async-class-decl-private-method.template
+/*---
+description: Async function returns an async function. (Async private method as a ClassDeclaration element)
+esid: prod-AsyncMethod
+features: [async-functions, class-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncMethod
+
+ Async Function Definitions
+
+ AsyncMethod :
+ async [no LineTerminator here] # PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
+
+---*/
+let count = 0;
+
+
+class C {
+ async #method(x) {
+ return async () => new.target;
+ }
+ async method(x) {
+ return this.#method(x);
+ }
+}
+// Stores a reference `asyncFn` for case evaluation
+let c = new C();
+let asyncFn = c.method.bind(c);
+
+asyncFn().then(retFn => {
+ count++;
+ return retFn();
+}).then(result => {
+ assert.sameValue(result, undefined);
+ assert.sameValue(count, 1);
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-private-method/returns-async-arrow.js b/js/src/tests/test262/language/statements/class/elements/async-private-method/returns-async-arrow.js
new file mode 100644
index 0000000000..ee8b999095
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-private-method/returns-async-arrow.js
@@ -0,0 +1,44 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-functions/returns-async-arrow.case
+// - src/async-functions/evaluation/async-class-decl-private-method.template
+/*---
+description: Async function returns an async function. (Async private method as a ClassDeclaration element)
+esid: prod-AsyncMethod
+features: [async-functions, class-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncMethod
+
+ Async Function Definitions
+
+ AsyncMethod :
+ async [no LineTerminator here] # PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
+
+---*/
+let count = 0;
+
+
+class C {
+ async #method(x) {
+ return async () => x;
+ }
+ async method(x) {
+ return this.#method(x);
+ }
+}
+// Stores a reference `asyncFn` for case evaluation
+let c = new C();
+let asyncFn = c.method.bind(c);
+
+asyncFn(1).then(retFn => {
+ count++;
+ return retFn();
+}).then(result => {
+ assert.sameValue(result, 1);
+ assert.sameValue(count, 1);
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-private-method/returns-async-function-returns-arguments-from-own-function.js b/js/src/tests/test262/language/statements/class/elements/async-private-method/returns-async-function-returns-arguments-from-own-function.js
new file mode 100644
index 0000000000..462ae56bc6
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-private-method/returns-async-function-returns-arguments-from-own-function.js
@@ -0,0 +1,45 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-functions/returns-async-function-returns-arguments-from-own-function.case
+// - src/async-functions/evaluation/async-class-decl-private-method.template
+/*---
+description: Async function returns an async function. (Async private method as a ClassDeclaration element)
+esid: prod-AsyncMethod
+features: [async-functions, class-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncMethod
+
+ Async Function Definitions
+
+ AsyncMethod :
+ async [no LineTerminator here] # PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
+
+---*/
+let count = 0;
+
+
+class C {
+ async #method(x) {
+ let a = arguments;
+ return async function() { return a === arguments; };
+ }
+ async method(x) {
+ return this.#method(x);
+ }
+}
+// Stores a reference `asyncFn` for case evaluation
+let c = new C();
+let asyncFn = c.method.bind(c);
+
+asyncFn(1).then(retFn => {
+ count++;
+ return retFn();
+}).then(result => {
+ assert.sameValue(result, false);
+ assert.sameValue(count, 1);
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-private-method/returns-async-function-returns-newtarget.js b/js/src/tests/test262/language/statements/class/elements/async-private-method/returns-async-function-returns-newtarget.js
new file mode 100644
index 0000000000..6046cef1b4
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-private-method/returns-async-function-returns-newtarget.js
@@ -0,0 +1,44 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-functions/returns-async-function-returns-newtarget.case
+// - src/async-functions/evaluation/async-class-decl-private-method.template
+/*---
+description: Async function returns an async function. (Async private method as a ClassDeclaration element)
+esid: prod-AsyncMethod
+features: [async-functions, class-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncMethod
+
+ Async Function Definitions
+
+ AsyncMethod :
+ async [no LineTerminator here] # PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
+
+---*/
+let count = 0;
+
+
+class C {
+ async #method(x) {
+ return async function() { return new.target; };
+ }
+ async method(x) {
+ return this.#method(x);
+ }
+}
+// Stores a reference `asyncFn` for case evaluation
+let c = new C();
+let asyncFn = c.method.bind(c);
+
+asyncFn(1).then(retFn => {
+ count++;
+ return retFn();
+}).then(result => {
+ assert.sameValue(result, undefined);
+ assert.sameValue(count, 1);
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-private-method/returns-async-function.js b/js/src/tests/test262/language/statements/class/elements/async-private-method/returns-async-function.js
new file mode 100644
index 0000000000..2dc6bce21a
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-private-method/returns-async-function.js
@@ -0,0 +1,44 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/async-functions/returns-async-function.case
+// - src/async-functions/evaluation/async-class-decl-private-method.template
+/*---
+description: Async function returns an async function. (Async private method as a ClassDeclaration element)
+esid: prod-AsyncMethod
+features: [async-functions, class-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ AsyncMethod
+
+ Async Function Definitions
+
+ AsyncMethod :
+ async [no LineTerminator here] # PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
+
+---*/
+let count = 0;
+
+
+class C {
+ async #method(x) {
+ return async function() { return x; };
+ }
+ async method(x) {
+ return this.#method(x);
+ }
+}
+// Stores a reference `asyncFn` for case evaluation
+let c = new C();
+let asyncFn = c.method.bind(c);
+
+asyncFn(1).then(retFn => {
+ count++;
+ return retFn();
+}).then(result => {
+ assert.sameValue(result, 1);
+ assert.sameValue(count, 1);
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/async-private-method/shell.js b/js/src/tests/test262/language/statements/class/elements/async-private-method/shell.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/async-private-method/shell.js
diff --git a/js/src/tests/test262/language/statements/class/elements/browser.js b/js/src/tests/test262/language/statements/class/elements/browser.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/browser.js
diff --git a/js/src/tests/test262/language/statements/class/elements/class-field-is-observable-by-proxy.js b/js/src/tests/test262/language/statements/class/elements/class-field-is-observable-by-proxy.js
new file mode 100644
index 0000000000..9585324332
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/class-field-is-observable-by-proxy.js
@@ -0,0 +1,48 @@
+// Copyright (C) 2019 Caio Lima. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: Public class fields initialization calls [[DefineOwnProperty]]
+esid: sec-define-field
+info: |
+ DefineField(receiver, fieldRecord)
+ ...
+ 8. If fieldName is a Private Name,
+ a. Perform ? PrivateFieldAdd(fieldName, receiver, initValue).
+ 9. Else,
+ a. Assert: IsPropertyKey(fieldName) is true.
+ b. Perform ? CreateDataPropertyOrThrow(receiver, fieldName, initValue).
+ 10. Return.
+includes: [compareArray.js]
+features: [class, class-fields-public, Proxy]
+---*/
+
+let arr = [];
+let expectedTarget = null;
+function ProxyBase() {
+ expectedTarget = this;
+ return new Proxy(this, {
+ defineProperty: function (target, key, descriptor) {
+ arr.push(key);
+ arr.push(descriptor.value);
+ arr.push(target);
+ assert.sameValue(descriptor.enumerable, true);
+ assert.sameValue(descriptor.configurable, true);
+ assert.sameValue(descriptor.writable, true);
+ return Reflect.defineProperty(target, key, descriptor);
+ }
+ });
+}
+
+class Test extends ProxyBase {
+ f = 3;
+ g = "Test262";
+}
+
+let t = new Test();
+assert.sameValue(t.f, 3);
+assert.sameValue(t.g, "Test262");
+
+assert.compareArray(arr, ["f", 3, expectedTarget, "g", "Test262", expectedTarget]);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/class-field-on-frozen-objects-strict.js b/js/src/tests/test262/language/statements/class/elements/class-field-on-frozen-objects-strict.js
new file mode 100644
index 0000000000..94a86d6694
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/class-field-on-frozen-objects-strict.js
@@ -0,0 +1,30 @@
+'use strict';
+// Copyright (C) 2019 Caio Lima. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: Public class field initialization fails on frozen object
+esid: sec-define-field
+info: |
+ DefineField(receiver, fieldRecord)
+ ...
+ 8. If fieldName is a Private Name,
+ a. Perform ? PrivateFieldAdd(fieldName, receiver, initValue).
+ 9. Else,
+ a. Assert: IsPropertyKey(fieldName) is true.
+ b. Perform ? CreateDataPropertyOrThrow(receiver, fieldName, initValue).
+ 10. Return.
+features: [class, class-fields-public]
+flags: [onlyStrict]
+---*/
+
+class Test {
+ f = Object.freeze(this);
+ g = "Test262";
+}
+
+assert.throws(TypeError, function() {
+ new Test();
+}, "Frozen objects can't be changed");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/comp-name-init-err-contains-arguments.js b/js/src/tests/test262/language/statements/class/elements/comp-name-init-err-contains-arguments.js
new file mode 100644
index 0000000000..2b0b71942b
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/comp-name-init-err-contains-arguments.js
@@ -0,0 +1,36 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/init-err-contains-arguments.case
+// - src/class-elements/initializer-error/cls-decl-fields-comp-name.template
+/*---
+description: Syntax error if `arguments` used in class field (computed ClassElementName)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-public, computed-property-names]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ FieldDefinition:
+ PropertyNameInitializeropt
+
+ - It is a Syntax Error if ContainsArguments of Initializer is true.
+
+ Static Semantics: ContainsArguments
+ IdentifierReference : Identifier
+
+ 1. If the StringValue of Identifier is "arguments", return true.
+ ...
+ For all other grammatical productions, recurse on all nonterminals. If any piece returns true, then return true. Otherwise return false.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+var x = "string";
+class C {
+ [x] = arguments;
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/comp-name-init-err-contains-super.js b/js/src/tests/test262/language/statements/class/elements/comp-name-init-err-contains-super.js
new file mode 100644
index 0000000000..84a2c49a34
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/comp-name-init-err-contains-super.js
@@ -0,0 +1,29 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/init-err-contains-super.case
+// - src/class-elements/initializer-error/cls-decl-fields-comp-name.template
+/*---
+description: Syntax error if `super()` used in class field (computed ClassElementName)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-public, computed-property-names]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ FieldDefinition:
+ PropertyNameInitializeropt
+
+ - It is a Syntax Error if Initializer is present and Initializer Contains SuperCall is true.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+var x = "string";
+class C {
+ [x] = super();
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/computed-name-toprimitive-symbol.js b/js/src/tests/test262/language/statements/class/elements/computed-name-toprimitive-symbol.js
new file mode 100644
index 0000000000..ead50e26dd
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/computed-name-toprimitive-symbol.js
@@ -0,0 +1,123 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/computed-name-toprimitive-symbol.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: ToPrimitive evaluation in the ComputedPropertyName (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-fields-public, computed-property-names, Symbol.toPrimitive, Symbol, class]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ Runtime Semantics: ClassDefinitionEvaluation
+
+ ...
+ 27. For each ClassElement e in order from elements
+ a. If IsStatic of me is false, then
+ i. Let fields be the result of performing ClassElementEvaluation for e with arguments proto and false.
+ b. Else,
+ i. Let fields be the result of performing ClassElementEvaluation for e with arguments F and false.
+ c. If fields is an abrupt completion, then
+ i. Set the running execution context's LexicalEnvironment to lex.
+ ii. Set the running execution context's PrivateNameEnvironment to outerPrivateEnvironment.
+ iii. Return Completion(status).
+ ...
+
+ Runtime Semantics: ClassElementEvaluation
+
+ ClassElement: FieldDefinition;
+ Return ClassFieldDefinitionEvaluation of FieldDefinition with parameter false and object.
+
+ Runtime Semantics: ClassFieldDefinitionEvaluation
+ With parameters isStatic and homeObject.
+
+ 1. Let fieldName be the result of evaluating ClassElementName.
+ 2. ReturnIfAbrupt(fieldName).
+ ...
+
+ Runtime Semantics: Evaluation
+ ComputedPropertyName: [ AssignmentExpression ]
+
+ 1. Let exprValue be the result of evaluating AssignmentExpression.
+ 2. Let propName be ? GetValue(exprValue).
+ 3. Return ? ToPropertyKey(propName).
+
+---*/
+var s1 = Symbol();
+var s2 = Symbol();
+var s3 = Symbol();
+var err = function() { throw new Test262Error(); };
+var obj1 = {
+ [Symbol.toPrimitive]: function() { return s1; },
+ toString: err,
+ valueOf: err
+};
+
+var obj2 = {
+ toString: function() { return s2; },
+ valueOf: err
+};
+
+var obj3 = {
+ toString: undefined,
+ valueOf: function() { return s3; }
+};
+
+
+
+class C {
+ [obj1] = 42;
+ [obj2] = 43;
+ [obj3] = 44;
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, s1),
+ "s1 doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, s1),
+ "s1 doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, s1, {
+ value: 42,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, s2),
+ "s2 doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, s2),
+ "s2 doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, s2, {
+ value: 43,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, s3),
+ "s3 doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, s3),
+ "s3 doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, s3, {
+ value: 44,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/computed-name-toprimitive.js b/js/src/tests/test262/language/statements/class/elements/computed-name-toprimitive.js
new file mode 100644
index 0000000000..684907a32d
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/computed-name-toprimitive.js
@@ -0,0 +1,120 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/computed-name-toprimitive.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: ToPrimitive evaluation in the ComputedPropertyName (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-fields-public, computed-property-names, Symbol.toPrimitive, class]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ Runtime Semantics: ClassDefinitionEvaluation
+
+ ...
+ 27. For each ClassElement e in order from elements
+ a. If IsStatic of me is false, then
+ i. Let fields be the result of performing ClassElementEvaluation for e with arguments proto and false.
+ b. Else,
+ i. Let fields be the result of performing ClassElementEvaluation for e with arguments F and false.
+ c. If fields is an abrupt completion, then
+ i. Set the running execution context's LexicalEnvironment to lex.
+ ii. Set the running execution context's PrivateNameEnvironment to outerPrivateEnvironment.
+ iii. Return Completion(status).
+ ...
+
+ Runtime Semantics: ClassElementEvaluation
+
+ ClassElement: FieldDefinition;
+ Return ClassFieldDefinitionEvaluation of FieldDefinition with parameter false and object.
+
+ Runtime Semantics: ClassFieldDefinitionEvaluation
+ With parameters isStatic and homeObject.
+
+ 1. Let fieldName be the result of evaluating ClassElementName.
+ 2. ReturnIfAbrupt(fieldName).
+ ...
+
+ Runtime Semantics: Evaluation
+ ComputedPropertyName: [ AssignmentExpression ]
+
+ 1. Let exprValue be the result of evaluating AssignmentExpression.
+ 2. Let propName be ? GetValue(exprValue).
+ 3. Return ? ToPropertyKey(propName).
+
+---*/
+var err = function() { throw new Test262Error(); };
+var obj1 = {
+ [Symbol.toPrimitive]: function() { return "d"; },
+ toString: err,
+ valueOf: err
+};
+
+var obj2 = {
+ toString: function() { return "e"; },
+ valueOf: err
+};
+
+var obj3 = {
+ toString: undefined,
+ valueOf: function() { return "f"; }
+};
+
+
+
+class C {
+ [obj1] = 42;
+ [obj2] = 43;
+ [obj3] = 44;
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "d"),
+ "d doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "d"),
+ "d doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "d", {
+ value: 42,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "e"),
+ "e doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "e"),
+ "e doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "e", {
+ value: 43,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "f"),
+ "f doesn't appear as an own property on C prototype"
+);
+assert(!
+ Object.prototype.hasOwnProperty.call(C, "f"),
+ "f doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "f", {
+ value: 44,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/computed-property-abrupt-completition.js b/js/src/tests/test262/language/statements/class/elements/computed-property-abrupt-completition.js
new file mode 100644
index 0000000000..c07ed35e8a
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/computed-property-abrupt-completition.js
@@ -0,0 +1,45 @@
+// Copyright (C) 2019 Caio Lima (Igalia SL). All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: PrivateFieldGet should return with abrupt completion
+esid: runtime-semantics-class-definition-evaluation
+info: |
+ ClassTail : ClassHeritage { ClassBody }
+ ...
+ 28. For each ClassElement e in order from elements,
+ a. If IsStatic of e is false, then
+ i. Let field be the result of performing ClassElementEvaluation for e with arguments proto and false.
+ b. Else,
+ i. Let field be the result of performing PropertyDefinitionEvaluation for mClassElementEvaluation for e with arguments F and false.
+ c. If field is an abrupt completion, then
+ i. Set the running execution context's LexicalEnvironment to lex.
+ ii. Set the running execution context's PrivateEnvironment to outerPrivateEnvironment.
+ iii. Return Completion(field).
+ ...
+features: [class-fields-public, class-static-fields-public, class]
+---*/
+
+function abruptCompletion() {
+ throw new Test262Error();
+}
+
+let neverExecuted = false;
+
+assert.throws(Test262Error, function() {
+ class C {
+ [abruptCompletion()];
+ [neverExecuted = true];
+ }
+}, 'computed property should have abrupt completion');
+assert.sameValue(neverExecuted, false);
+
+assert.throws(Test262Error, function() {
+ class C {
+ static [abruptCompletion()];
+ [neverExecuted = true];
+ }
+}, 'static computed property should have abrupt completion');
+assert.sameValue(neverExecuted, false);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/ctor-called-after-fields-init.js b/js/src/tests/test262/language/statements/class/elements/ctor-called-after-fields-init.js
new file mode 100644
index 0000000000..77e483856d
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/ctor-called-after-fields-init.js
@@ -0,0 +1,35 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/ctor-called-after-fields-init.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: The constructor method is called after the fields are initalized (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-fields-public, class]
+flags: [generated]
+info: |
+ [[Construct]] ( argumentsList, newTarget)
+
+ 8. If kind is "base", then
+ a. Perform OrdinaryCallBindThis(F, calleeContext, thisArgument).
+ b. Let result be InitializeInstanceFields(thisArgument, F).
+ ...
+ ...
+ 11. Let result be OrdinaryCallEvaluateBody(F, argumentsList).
+ ...
+
+---*/
+var ctor;
+
+
+class C {
+ constructor() {
+ ctor = this.foo;
+ }
+ foo = 42;
+}
+
+var c = new C();
+
+assert.sameValue(ctor, 42);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/derived-cls-direct-eval-contains-superproperty-1.js b/js/src/tests/test262/language/statements/class/elements/derived-cls-direct-eval-contains-superproperty-1.js
new file mode 100644
index 0000000000..ae4d849ba1
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/derived-cls-direct-eval-contains-superproperty-1.js
@@ -0,0 +1,36 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/eval-contains-superproperty-1.case
+// - src/class-elements/initializer-eval-super-property/cls-decl-fields-eval.template
+/*---
+description: super.x in StatementList of eval (direct eval)
+esid: sec-performeval-rules-in-initializer
+features: [class, class-fields-public]
+flags: [generated]
+info: |
+ Additional Early Error Rules for Eval Inside Initializer
+ These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer.
+ ScriptBody : StatementList
+
+ ...
+ The remaining eval rules apply as outside a constructor, inside a method, and inside a function.
+
+ Additional Early Error Rules for Eval Outside Methods
+ These static semantics are applied by PerformEval when a direct eval call occurs outside of a MethodDefinition.
+ ScriptBody : StatementList
+
+ It is a Syntax Error if StatementList Contains SuperProperty.
+
+---*/
+
+
+var executed = false;
+class A {}
+class C extends A {
+ x = eval('executed = true; super.x;');
+}
+
+new C();
+
+assert.sameValue(executed, true);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/derived-cls-direct-eval-contains-superproperty-2.js b/js/src/tests/test262/language/statements/class/elements/derived-cls-direct-eval-contains-superproperty-2.js
new file mode 100644
index 0000000000..f070550b43
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/derived-cls-direct-eval-contains-superproperty-2.js
@@ -0,0 +1,33 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/eval-contains-superproperty-2.case
+// - src/class-elements/initializer-eval-super-property/cls-decl-fields-eval.template
+/*---
+description: super['x'] in StatementList of eval (direct eval)
+esid: sec-performeval-rules-in-initializer
+features: [class, class-fields-public]
+flags: [generated]
+info: |
+ The remaining eval rules apply as outside a constructor, inside a method, and inside a function.
+
+ Additional Early Error Rules for Eval Outside Methods
+
+ These static semantics are applied by PerformEval when a direct eval call occurs outside of a MethodDefinition.
+
+ ScriptBody : StatementList
+
+ It is a Syntax Error if StatementList Contains SuperProperty.
+
+---*/
+
+
+var executed = false;
+class A {}
+class C extends A {
+ x = eval('executed = true; super["x"];');
+}
+
+new C();
+
+assert.sameValue(executed, true);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/derived-cls-direct-eval-err-contains-supercall-1.js b/js/src/tests/test262/language/statements/class/elements/derived-cls-direct-eval-err-contains-supercall-1.js
new file mode 100644
index 0000000000..3bee4474f2
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/derived-cls-direct-eval-err-contains-supercall-1.js
@@ -0,0 +1,38 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/eval-err-contains-supercall-1.case
+// - src/class-elements/initializer-eval-super-call/cls-decl-fields-eval.template
+/*---
+description: error if `super()['x']` in StatementList of eval (direct eval)
+esid: sec-performeval-rules-in-initializer
+features: [class, class-fields-public]
+flags: [generated]
+info: |
+ Additional Early Error Rules for Eval Inside Initializer
+ These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer.
+ ScriptBody : StatementList
+
+ ...
+ The remaining eval rules apply as outside a constructor, inside a method, and inside a function.
+
+ Additional Early Error Rules for Eval Outside Constructor Methods
+ These static semantics are applied by PerformEval when a direct eval call occurs outside of the constructor method of a ClassDeclaration or ClassExpression.
+ ScriptBody : StatementList
+
+ It is a Syntax Error if StatementList Contains SuperCall.
+
+---*/
+
+
+var executed = false;
+class A {}
+class C extends A {
+ x = eval('executed = true; super()["x"];');
+}
+
+assert.throws(SyntaxError, function() {
+ new C();
+});
+
+assert.sameValue(executed, false);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/derived-cls-direct-eval-err-contains-supercall-2.js b/js/src/tests/test262/language/statements/class/elements/derived-cls-direct-eval-err-contains-supercall-2.js
new file mode 100644
index 0000000000..ce07927be2
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/derived-cls-direct-eval-err-contains-supercall-2.js
@@ -0,0 +1,31 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/eval-err-contains-supercall-2.case
+// - src/class-elements/initializer-eval-super-call/cls-decl-fields-eval.template
+/*---
+description: error if `super().x` in StatementList of eval (direct eval)
+esid: sec-performeval-rules-in-initializer
+features: [class, class-fields-public]
+flags: [generated]
+info: |
+ Additional Early Error Rules for Eval Outside Constructor Methods
+ These static semantics are applied by PerformEval when a direct eval call occurs outside of the constructor method of a ClassDeclaration or ClassExpression.
+ ScriptBody : StatementList
+
+ It is a Syntax Error if StatementList Contains SuperCall.
+
+---*/
+
+
+var executed = false;
+class A {}
+class C extends A {
+ x = eval('executed = true; super().x;');
+}
+
+assert.throws(SyntaxError, function() {
+ new C();
+});
+
+assert.sameValue(executed, false);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/derived-cls-direct-eval-err-contains-supercall.js b/js/src/tests/test262/language/statements/class/elements/derived-cls-direct-eval-err-contains-supercall.js
new file mode 100644
index 0000000000..cd2af53ae0
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/derived-cls-direct-eval-err-contains-supercall.js
@@ -0,0 +1,38 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/eval-err-contains-supercall.case
+// - src/class-elements/initializer-eval-super-call/cls-decl-fields-eval.template
+/*---
+description: error if `super()` in StatementList of eval (direct eval)
+esid: sec-performeval-rules-in-initializer
+features: [class, class-fields-public]
+flags: [generated]
+info: |
+ Additional Early Error Rules for Eval Inside Initializer
+ These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer.
+ ScriptBody : StatementList
+
+ ...
+ The remaining eval rules apply as outside a constructor, inside a method, and inside a function.
+
+ Additional Early Error Rules for Eval Outside Constructor Methods
+ These static semantics are applied by PerformEval when a direct eval call occurs outside of the constructor method of a ClassDeclaration or ClassExpression.
+ ScriptBody : StatementList
+
+ It is a Syntax Error if StatementList Contains SuperCall.
+
+---*/
+
+
+var executed = false;
+class A {}
+class C extends A {
+ x = eval('executed = true; super();');
+}
+
+assert.throws(SyntaxError, function() {
+ new C();
+});
+
+assert.sameValue(executed, false);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/derived-cls-indirect-eval-contains-superproperty-1.js b/js/src/tests/test262/language/statements/class/elements/derived-cls-indirect-eval-contains-superproperty-1.js
new file mode 100644
index 0000000000..27895ab1a4
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/derived-cls-indirect-eval-contains-superproperty-1.js
@@ -0,0 +1,38 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/eval-contains-superproperty-1.case
+// - src/class-elements/initializer-eval-super-property/cls-decl-fields-indirect-eval.template
+/*---
+description: super.x in StatementList of eval (indirect eval)
+esid: sec-performeval-rules-in-initializer
+features: [class, class-fields-public]
+flags: [generated]
+info: |
+ Additional Early Error Rules for Eval Inside Initializer
+ These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer.
+ ScriptBody : StatementList
+
+ ...
+ The remaining eval rules apply as outside a constructor, inside a method, and inside a function.
+
+ Additional Early Error Rules for Eval Outside Methods
+ These static semantics are applied by PerformEval when a direct eval call occurs outside of a MethodDefinition.
+ ScriptBody : StatementList
+
+ It is a Syntax Error if StatementList Contains SuperProperty.
+
+---*/
+
+
+var executed = false;
+class A {}
+class C extends A {
+ x = (0, eval)('executed = true; super.x;');
+}
+
+assert.throws(SyntaxError, function() {
+ new C();
+});
+
+assert.sameValue(executed, false);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/derived-cls-indirect-eval-contains-superproperty-2.js b/js/src/tests/test262/language/statements/class/elements/derived-cls-indirect-eval-contains-superproperty-2.js
new file mode 100644
index 0000000000..a6f86a2af5
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/derived-cls-indirect-eval-contains-superproperty-2.js
@@ -0,0 +1,35 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/eval-contains-superproperty-2.case
+// - src/class-elements/initializer-eval-super-property/cls-decl-fields-indirect-eval.template
+/*---
+description: super['x'] in StatementList of eval (indirect eval)
+esid: sec-performeval-rules-in-initializer
+features: [class, class-fields-public]
+flags: [generated]
+info: |
+ The remaining eval rules apply as outside a constructor, inside a method, and inside a function.
+
+ Additional Early Error Rules for Eval Outside Methods
+
+ These static semantics are applied by PerformEval when a direct eval call occurs outside of a MethodDefinition.
+
+ ScriptBody : StatementList
+
+ It is a Syntax Error if StatementList Contains SuperProperty.
+
+---*/
+
+
+var executed = false;
+class A {}
+class C extends A {
+ x = (0, eval)('executed = true; super["x"];');
+}
+
+assert.throws(SyntaxError, function() {
+ new C();
+});
+
+assert.sameValue(executed, false);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/derived-cls-indirect-eval-err-contains-supercall-1.js b/js/src/tests/test262/language/statements/class/elements/derived-cls-indirect-eval-err-contains-supercall-1.js
new file mode 100644
index 0000000000..6daeaa5d31
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/derived-cls-indirect-eval-err-contains-supercall-1.js
@@ -0,0 +1,38 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/eval-err-contains-supercall-1.case
+// - src/class-elements/initializer-eval-super-call/cls-decl-fields-indirect-eval.template
+/*---
+description: error if `super()['x']` in StatementList of eval (indirect eval)
+esid: sec-performeval-rules-in-initializer
+features: [class, class-fields-public]
+flags: [generated]
+info: |
+ Additional Early Error Rules for Eval Inside Initializer
+ These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer.
+ ScriptBody : StatementList
+
+ ...
+ The remaining eval rules apply as outside a constructor, inside a method, and inside a function.
+
+ Additional Early Error Rules for Eval Outside Constructor Methods
+ These static semantics are applied by PerformEval when a direct eval call occurs outside of the constructor method of a ClassDeclaration or ClassExpression.
+ ScriptBody : StatementList
+
+ It is a Syntax Error if StatementList Contains SuperCall.
+
+---*/
+
+
+var executed = false;
+class A {}
+class C extends A {
+ x = (0, eval)('executed = true; super()["x"];');
+}
+
+assert.throws(SyntaxError, function() {
+ new C();
+});
+
+assert.sameValue(executed, false);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/derived-cls-indirect-eval-err-contains-supercall-2.js b/js/src/tests/test262/language/statements/class/elements/derived-cls-indirect-eval-err-contains-supercall-2.js
new file mode 100644
index 0000000000..ac275cc028
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/derived-cls-indirect-eval-err-contains-supercall-2.js
@@ -0,0 +1,31 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/eval-err-contains-supercall-2.case
+// - src/class-elements/initializer-eval-super-call/cls-decl-fields-indirect-eval.template
+/*---
+description: error if `super().x` in StatementList of eval (indirect eval)
+esid: sec-performeval-rules-in-initializer
+features: [class, class-fields-public]
+flags: [generated]
+info: |
+ Additional Early Error Rules for Eval Outside Constructor Methods
+ These static semantics are applied by PerformEval when a direct eval call occurs outside of the constructor method of a ClassDeclaration or ClassExpression.
+ ScriptBody : StatementList
+
+ It is a Syntax Error if StatementList Contains SuperCall.
+
+---*/
+
+
+var executed = false;
+class A {}
+class C extends A {
+ x = (0, eval)('executed = true; super().x;');
+}
+
+assert.throws(SyntaxError, function() {
+ new C();
+});
+
+assert.sameValue(executed, false);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/derived-cls-indirect-eval-err-contains-supercall.js b/js/src/tests/test262/language/statements/class/elements/derived-cls-indirect-eval-err-contains-supercall.js
new file mode 100644
index 0000000000..08f77e8118
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/derived-cls-indirect-eval-err-contains-supercall.js
@@ -0,0 +1,38 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/eval-err-contains-supercall.case
+// - src/class-elements/initializer-eval-super-call/cls-decl-fields-indirect-eval.template
+/*---
+description: error if `super()` in StatementList of eval (indirect eval)
+esid: sec-performeval-rules-in-initializer
+features: [class, class-fields-public]
+flags: [generated]
+info: |
+ Additional Early Error Rules for Eval Inside Initializer
+ These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer.
+ ScriptBody : StatementList
+
+ ...
+ The remaining eval rules apply as outside a constructor, inside a method, and inside a function.
+
+ Additional Early Error Rules for Eval Outside Constructor Methods
+ These static semantics are applied by PerformEval when a direct eval call occurs outside of the constructor method of a ClassDeclaration or ClassExpression.
+ ScriptBody : StatementList
+
+ It is a Syntax Error if StatementList Contains SuperCall.
+
+---*/
+
+
+var executed = false;
+class A {}
+class C extends A {
+ x = (0, eval)('executed = true; super();');
+}
+
+assert.throws(SyntaxError, function() {
+ new C();
+});
+
+assert.sameValue(executed, false);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/direct-eval-err-contains-arguments.js b/js/src/tests/test262/language/statements/class/elements/direct-eval-err-contains-arguments.js
new file mode 100644
index 0000000000..32ef0e5489
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/direct-eval-err-contains-arguments.js
@@ -0,0 +1,38 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/eval-err-contains-arguments.case
+// - src/class-elements/initializer-direct-eval-arguments/cls-decl-fields-eval.template
+/*---
+description: error if `arguments` in StatementList of eval (direct eval)
+esid: sec-performeval-rules-in-initializer
+features: [class, class-fields-public]
+flags: [generated]
+info: |
+ Additional Early Error Rules for Eval Inside Initializer
+ These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer.
+ ScriptBody : StatementList
+
+ It is a Syntax Error if ContainsArguments of StatementList is true.
+ ...
+
+ Static Semantics: ContainsArguments
+ IdentifierReference : Identifier
+
+ 1. If the StringValue of Identifier is "arguments", return true.
+ ...
+ For all other grammatical productions, recurse on all nonterminals. If any piece returns true, then return true. Otherwise return false.
+
+---*/
+
+
+var executed = false;
+class C {
+ x = eval('executed = true; arguments;');
+}
+
+assert.throws(SyntaxError, function() {
+ new C();
+});
+
+assert.sameValue(executed, false);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/direct-eval-err-contains-newtarget.js b/js/src/tests/test262/language/statements/class/elements/direct-eval-err-contains-newtarget.js
new file mode 100644
index 0000000000..8097d57801
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/direct-eval-err-contains-newtarget.js
@@ -0,0 +1,36 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/eval-err-contains-newtarget.case
+// - src/class-elements/initializer-eval-newtarget/cls-decl-fields-eval.template
+/*---
+description: error if `new.target` in StatementList of eval (direct eval)
+esid: sec-performeval-rules-in-initializer
+features: [class, new.target, class-fields-public]
+flags: [generated]
+info: |
+ Additional Early Error Rules for Eval Inside Initializer
+ These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer.
+ ScriptBody : StatementList
+
+ ...
+ The remaining eval rules apply as outside a constructor, inside a method, and inside a function.
+
+ Additional Early Error Rules for Eval Outside Functions
+ These static semantics are applied by PerformEval when a direct eval call occurs outside of any function.
+ ScriptBody : StatementList
+
+ It is a Syntax Error if StatementList Contains NewTarget.
+
+---*/
+
+
+var executed = false;
+class C {
+ x = eval('executed = true; new.target;');
+}
+
+var c = new C();
+
+assert.sameValue(executed, true);
+assert.sameValue(c.x, undefined);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/equality-init-err-contains-arguments.js b/js/src/tests/test262/language/statements/class/elements/equality-init-err-contains-arguments.js
new file mode 100644
index 0000000000..7d88fd26f8
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/equality-init-err-contains-arguments.js
@@ -0,0 +1,35 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/init-err-contains-arguments.case
+// - src/class-elements/initializer-error/cls-decl-fields-equality.template
+/*---
+description: Syntax error if `arguments` used in class field (equality expression)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-public]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ FieldDefinition:
+ PropertyNameInitializeropt
+
+ - It is a Syntax Error if ContainsArguments of Initializer is true.
+
+ Static Semantics: ContainsArguments
+ IdentifierReference : Identifier
+
+ 1. If the StringValue of Identifier is "arguments", return true.
+ ...
+ For all other grammatical productions, recurse on all nonterminals. If any piece returns true, then return true. Otherwise return false.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ x = {} == arguments;
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/equality-init-err-contains-super.js b/js/src/tests/test262/language/statements/class/elements/equality-init-err-contains-super.js
new file mode 100644
index 0000000000..5eba280e2b
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/equality-init-err-contains-super.js
@@ -0,0 +1,28 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/init-err-contains-super.case
+// - src/class-elements/initializer-error/cls-decl-fields-equality.template
+/*---
+description: Syntax error if `super()` used in class field (equality expression)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-public]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ FieldDefinition:
+ PropertyNameInitializeropt
+
+ - It is a Syntax Error if Initializer is present and Initializer Contains SuperCall is true.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ x = {} == super();
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/evaluation-error/browser.js b/js/src/tests/test262/language/statements/class/elements/evaluation-error/browser.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/evaluation-error/browser.js
diff --git a/js/src/tests/test262/language/statements/class/elements/evaluation-error/computed-name-referenceerror.js b/js/src/tests/test262/language/statements/class/elements/evaluation-error/computed-name-referenceerror.js
new file mode 100644
index 0000000000..4c59e16268
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/evaluation-error/computed-name-referenceerror.js
@@ -0,0 +1,58 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/computed-name-referenceerror.case
+// - src/class-elements/class-evaluation-error/cls-decl.template
+/*---
+description: ReferenceError evaluating a computed property name (field definitions in a class declaration)
+esid: sec-runtime-semantics-classdefinitionevaluation
+features: [class-fields-public, computed-property-names, class]
+flags: [generated]
+info: |
+ Runtime Semantics: ClassDefinitionEvaluation
+
+ ...
+ 27. For each ClassElement e in order from elements
+ a. If IsStatic of me is false, then
+ i. Let fields be the result of performing ClassElementEvaluation for e with arguments proto and false.
+ b. Else,
+ i. Let fields be the result of performing ClassElementEvaluation for e with arguments F and false.
+ c. If fields is an abrupt completion, then
+ i. Set the running execution context's LexicalEnvironment to lex.
+ ii. Set the running execution context's PrivateNameEnvironment to outerPrivateEnvironment.
+ iii. Return Completion(status).
+ ...
+
+ Runtime Semantics: ClassElementEvaluation
+
+ ClassElement: FieldDefinition;
+ Return ClassFieldDefinitionEvaluation of FieldDefinition with parameter false and object.
+
+ Runtime Semantics: ClassFieldDefinitionEvaluation
+ With parameters isStatic and homeObject.
+
+ 1. Let fieldName be the result of evaluating ClassElementName.
+ 2. ReturnIfAbrupt(fieldName).
+ ...
+
+ Runtime Semantics: Evaluation
+ ComputedPropertyName: [ AssignmentExpression ]
+
+ 1. Let exprValue be the result of evaluating AssignmentExpression.
+ 2. Let propName be ? GetValue(exprValue).
+ 3. Return ? ToPropertyKey(propName).
+
+---*/
+function fn() {
+ throw new Test262Error();
+}
+
+
+
+function evaluate() {
+ class C {
+ [noRef] = fn();
+ }
+}
+
+assert.throws(ReferenceError, evaluate);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/evaluation-error/computed-name-toprimitive-err.js b/js/src/tests/test262/language/statements/class/elements/evaluation-error/computed-name-toprimitive-err.js
new file mode 100644
index 0000000000..204d772fbe
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/evaluation-error/computed-name-toprimitive-err.js
@@ -0,0 +1,60 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/computed-name-toprimitive-err.case
+// - src/class-elements/class-evaluation-error/cls-decl.template
+/*---
+description: Custom error evaluating a computed property name (field definitions in a class declaration)
+esid: sec-runtime-semantics-classdefinitionevaluation
+features: [class-fields-public, computed-property-names, Symbol.toPrimitive, class]
+flags: [generated]
+info: |
+ Runtime Semantics: ClassDefinitionEvaluation
+
+ ...
+ 27. For each ClassElement e in order from elements
+ a. If IsStatic of me is false, then
+ i. Let fields be the result of performing ClassElementEvaluation for e with arguments proto and false.
+ b. Else,
+ i. Let fields be the result of performing ClassElementEvaluation for e with arguments F and false.
+ c. If fields is an abrupt completion, then
+ i. Set the running execution context's LexicalEnvironment to lex.
+ ii. Set the running execution context's PrivateNameEnvironment to outerPrivateEnvironment.
+ iii. Return Completion(status).
+ ...
+
+ Runtime Semantics: ClassElementEvaluation
+
+ ClassElement: FieldDefinition;
+ Return ClassFieldDefinitionEvaluation of FieldDefinition with parameter false and object.
+
+ Runtime Semantics: ClassFieldDefinitionEvaluation
+ With parameters isStatic and homeObject.
+
+ 1. Let fieldName be the result of evaluating ClassElementName.
+ 2. ReturnIfAbrupt(fieldName).
+ ...
+
+ Runtime Semantics: Evaluation
+ ComputedPropertyName: [ AssignmentExpression ]
+
+ 1. Let exprValue be the result of evaluating AssignmentExpression.
+ 2. Let propName be ? GetValue(exprValue).
+ 3. Return ? ToPropertyKey(propName).
+
+---*/
+var obj = {
+ [Symbol.toPrimitive]: function() {
+ throw new Test262Error();
+ }
+};
+
+
+
+function evaluate() {
+ class C {
+ [obj]
+ }
+}
+
+assert.throws(Test262Error, evaluate);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/evaluation-error/computed-name-toprimitive-returns-noncallable.js b/js/src/tests/test262/language/statements/class/elements/evaluation-error/computed-name-toprimitive-returns-noncallable.js
new file mode 100644
index 0000000000..f995fe93e0
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/evaluation-error/computed-name-toprimitive-returns-noncallable.js
@@ -0,0 +1,59 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/computed-name-toprimitive-returns-noncallable.case
+// - src/class-elements/class-evaluation-error/cls-decl.template
+/*---
+description: Custom error evaluating a computed property name (field definitions in a class declaration)
+esid: sec-runtime-semantics-classdefinitionevaluation
+features: [class-fields-public, computed-property-names, Symbol.toPrimitive, class]
+flags: [generated]
+info: |
+ Runtime Semantics: ClassDefinitionEvaluation
+
+ ...
+ 27. For each ClassElement e in order from elements
+ a. If IsStatic of me is false, then
+ i. Let fields be the result of performing ClassElementEvaluation for e with arguments proto and false.
+ b. Else,
+ i. Let fields be the result of performing ClassElementEvaluation for e with arguments F and false.
+ c. If fields is an abrupt completion, then
+ i. Set the running execution context's LexicalEnvironment to lex.
+ ii. Set the running execution context's PrivateNameEnvironment to outerPrivateEnvironment.
+ iii. Return Completion(status).
+ ...
+
+ Runtime Semantics: ClassElementEvaluation
+
+ ClassElement: FieldDefinition;
+ Return ClassFieldDefinitionEvaluation of FieldDefinition with parameter false and object.
+
+ Runtime Semantics: ClassFieldDefinitionEvaluation
+ With parameters isStatic and homeObject.
+
+ 1. Let fieldName be the result of evaluating ClassElementName.
+ 2. ReturnIfAbrupt(fieldName).
+ ...
+
+ Runtime Semantics: Evaluation
+ ComputedPropertyName: [ AssignmentExpression ]
+
+ 1. Let exprValue be the result of evaluating AssignmentExpression.
+ 2. Let propName be ? GetValue(exprValue).
+ 3. Return ? ToPropertyKey(propName).
+
+---*/
+var obj = {
+ [Symbol.toPrimitive]: {}
+};
+
+
+
+function evaluate() {
+ class C {
+ [obj] = refErrorIfEvaluated;
+ }
+}
+
+assert.throws(TypeError
+, evaluate);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/evaluation-error/computed-name-toprimitive-returns-nonobject.js b/js/src/tests/test262/language/statements/class/elements/evaluation-error/computed-name-toprimitive-returns-nonobject.js
new file mode 100644
index 0000000000..46d6d5f852
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/evaluation-error/computed-name-toprimitive-returns-nonobject.js
@@ -0,0 +1,58 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/computed-name-toprimitive-returns-nonobject.case
+// - src/class-elements/class-evaluation-error/cls-decl.template
+/*---
+description: Custom error evaluating a computed property name (field definitions in a class declaration)
+esid: sec-runtime-semantics-classdefinitionevaluation
+features: [class-fields-public, computed-property-names, Symbol.toPrimitive, class]
+flags: [generated]
+info: |
+ Runtime Semantics: ClassDefinitionEvaluation
+
+ ...
+ 27. For each ClassElement e in order from elements
+ a. If IsStatic of me is false, then
+ i. Let fields be the result of performing ClassElementEvaluation for e with arguments proto and false.
+ b. Else,
+ i. Let fields be the result of performing ClassElementEvaluation for e with arguments F and false.
+ c. If fields is an abrupt completion, then
+ i. Set the running execution context's LexicalEnvironment to lex.
+ ii. Set the running execution context's PrivateNameEnvironment to outerPrivateEnvironment.
+ iii. Return Completion(status).
+ ...
+
+ Runtime Semantics: ClassElementEvaluation
+
+ ClassElement: FieldDefinition;
+ Return ClassFieldDefinitionEvaluation of FieldDefinition with parameter false and object.
+
+ Runtime Semantics: ClassFieldDefinitionEvaluation
+ With parameters isStatic and homeObject.
+
+ 1. Let fieldName be the result of evaluating ClassElementName.
+ 2. ReturnIfAbrupt(fieldName).
+ ...
+
+ Runtime Semantics: Evaluation
+ ComputedPropertyName: [ AssignmentExpression ]
+
+ 1. Let exprValue be the result of evaluating AssignmentExpression.
+ 2. Let propName be ? GetValue(exprValue).
+ 3. Return ? ToPropertyKey(propName).
+
+---*/
+var obj = {
+ [Symbol.toPrimitive]: 42
+};
+
+
+
+function evaluate() {
+ class C {
+ [obj] = refErrorIfEvaluated;
+ }
+}
+
+assert.throws(TypeError, evaluate);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/evaluation-error/computed-name-tostring-err.js b/js/src/tests/test262/language/statements/class/elements/evaluation-error/computed-name-tostring-err.js
new file mode 100644
index 0000000000..3a43e1560d
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/evaluation-error/computed-name-tostring-err.js
@@ -0,0 +1,61 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/computed-name-tostring-err.case
+// - src/class-elements/class-evaluation-error/cls-decl.template
+/*---
+description: Custom error evaluating a computed property name (field definitions in a class declaration)
+esid: sec-runtime-semantics-classdefinitionevaluation
+features: [class-fields-public, computed-property-names, class]
+flags: [generated]
+info: |
+ Runtime Semantics: ClassDefinitionEvaluation
+
+ ...
+ 27. For each ClassElement e in order from elements
+ a. If IsStatic of me is false, then
+ i. Let fields be the result of performing ClassElementEvaluation for e with arguments proto and false.
+ b. Else,
+ i. Let fields be the result of performing ClassElementEvaluation for e with arguments F and false.
+ c. If fields is an abrupt completion, then
+ i. Set the running execution context's LexicalEnvironment to lex.
+ ii. Set the running execution context's PrivateNameEnvironment to outerPrivateEnvironment.
+ iii. Return Completion(status).
+ ...
+
+ Runtime Semantics: ClassElementEvaluation
+
+ ClassElement: FieldDefinition;
+ Return ClassFieldDefinitionEvaluation of FieldDefinition with parameter false and object.
+
+ Runtime Semantics: ClassFieldDefinitionEvaluation
+ With parameters isStatic and homeObject.
+
+ 1. Let fieldName be the result of evaluating ClassElementName.
+ 2. ReturnIfAbrupt(fieldName).
+ ...
+
+ Runtime Semantics: Evaluation
+ ComputedPropertyName: [ AssignmentExpression ]
+
+ 1. Let exprValue be the result of evaluating AssignmentExpression.
+ 2. Let propName be ? GetValue(exprValue).
+ 3. Return ? ToPropertyKey(propName).
+
+---*/
+var obj = {
+ toString: function() {
+ throw new Test262Error();
+ }
+};
+
+
+
+function evaluate() {
+ class C {
+ [obj]
+ }
+}
+
+assert.throws(Test262Error
+, evaluate);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/evaluation-error/computed-name-valueof-err.js b/js/src/tests/test262/language/statements/class/elements/evaluation-error/computed-name-valueof-err.js
new file mode 100644
index 0000000000..126a0e0a40
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/evaluation-error/computed-name-valueof-err.js
@@ -0,0 +1,61 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/computed-name-valueof-err.case
+// - src/class-elements/class-evaluation-error/cls-decl.template
+/*---
+description: Custom error evaluating a computed property name (field definitions in a class declaration)
+esid: sec-runtime-semantics-classdefinitionevaluation
+features: [class-fields-public, computed-property-names, class]
+flags: [generated]
+info: |
+ Runtime Semantics: ClassDefinitionEvaluation
+
+ ...
+ 27. For each ClassElement e in order from elements
+ a. If IsStatic of me is false, then
+ i. Let fields be the result of performing ClassElementEvaluation for e with arguments proto and false.
+ b. Else,
+ i. Let fields be the result of performing ClassElementEvaluation for e with arguments F and false.
+ c. If fields is an abrupt completion, then
+ i. Set the running execution context's LexicalEnvironment to lex.
+ ii. Set the running execution context's PrivateNameEnvironment to outerPrivateEnvironment.
+ iii. Return Completion(status).
+ ...
+
+ Runtime Semantics: ClassElementEvaluation
+
+ ClassElement: FieldDefinition;
+ Return ClassFieldDefinitionEvaluation of FieldDefinition with parameter false and object.
+
+ Runtime Semantics: ClassFieldDefinitionEvaluation
+ With parameters isStatic and homeObject.
+
+ 1. Let fieldName be the result of evaluating ClassElementName.
+ 2. ReturnIfAbrupt(fieldName).
+ ...
+
+ Runtime Semantics: Evaluation
+ ComputedPropertyName: [ AssignmentExpression ]
+
+ 1. Let exprValue be the result of evaluating AssignmentExpression.
+ 2. Let propName be ? GetValue(exprValue).
+ 3. Return ? ToPropertyKey(propName).
+
+---*/
+var obj = {
+ toString: undefined,
+ valueOf: function() {
+ throw new Test262Error();
+ }
+};
+
+
+
+function evaluate() {
+ class C {
+ [obj]
+ }
+}
+
+assert.throws(Test262Error, evaluate);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/evaluation-error/shell.js b/js/src/tests/test262/language/statements/class/elements/evaluation-error/shell.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/evaluation-error/shell.js
diff --git a/js/src/tests/test262/language/statements/class/elements/field-declaration.js b/js/src/tests/test262/language/statements/class/elements/field-declaration.js
new file mode 100644
index 0000000000..b8c0fcc6c8
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/field-declaration.js
@@ -0,0 +1,111 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/field-declaration.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: Fields are defined (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-fields-public, class]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ Updated Productions
+
+ ClassElement :
+ ...
+ FieldDefinition ;
+
+ FieldDefinition :
+ ClassElementName Initializer_opt
+
+ ClassElementName :
+ PropertyName
+
+ PropertyName :
+ LiteralPropertyName
+ ComputedPropertyName
+
+ LiteralPropertyName :
+ IdentifierName
+ StringLiteral
+ NumericLiteral
+
+ ClassDefinitionEvaluation:
+ ...
+
+ 26. Let instanceFields be a new empty List.
+ 28. For each ClassElement e in order from elements,
+ a. If IsStatic of e is false, then
+ i. Let field be the result of performing ClassElementEvaluation for e with arguments proto and false.
+ b. ...
+ c. ...
+ d. If field is not empty, append field to instanceFields.
+
+ ...
+
+ 30. Set F.[[Fields]] to instanceFields.
+ ...
+
+---*/
+var computed = 'h';
+
+
+class C {
+ f = 'test262';
+ 'g';
+ 0 = 'bar';
+ [computed];
+}
+
+let c = new C();
+
+assert.sameValue(C.f, undefined);
+assert.sameValue(C.g, undefined);
+assert.sameValue(C.h, undefined);
+assert.sameValue(C[0], undefined);
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C, 'f'),
+ "f does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, 'g'),
+ "g does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, 'h'),
+ "h does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, 0),
+ "0 does not appear as an own property on C constructor"
+);
+
+verifyProperty(c, 'f', {
+ value: 'test262',
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+verifyProperty(c, 'g', {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+verifyProperty(c, 0, {
+ value: 'bar',
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+verifyProperty(c, 'h', {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/field-definition-accessor-no-line-terminator.js b/js/src/tests/test262/language/statements/class/elements/field-definition-accessor-no-line-terminator.js
new file mode 100644
index 0000000000..bea195d730
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/field-definition-accessor-no-line-terminator.js
@@ -0,0 +1,52 @@
+// |reftest| skip -- decorators is not supported
+// This file was procedurally generated from the following sources:
+// - src/class-elements/field-definition-accessor-no-line-terminator.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: Valid accessor FieldDefinition, ClassElementName, PropertyName Syntax (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [decorators, class]
+flags: [generated]
+info: |
+ FieldDefinition[Yield, Await] :
+ accessor [no LineTerminator here] ClassElementName[?Yield, ?Await] Initializer[+In, ?Yield, ?Await]opt
+
+---*/
+
+
+class C {
+ accessor
+ $;
+ static accessor
+ $;
+
+}
+
+let c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, 'accessor'),
+ "accessor doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, '$'),
+ "$ doesn't appear as an own property on C prototype"
+);
+assert(
+ Object.prototype.hasOwnProperty.call(C, 'accessor'),
+ "C constructor has an own property accessor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, '$'),
+ "$ doesn't appear as an own property on C constructor"
+);
+assert(
+ Object.prototype.hasOwnProperty.call(c, 'accessor'),
+ "C instance has an own property accessor"
+);
+assert(
+ Object.prototype.hasOwnProperty.call(c, '$'),
+ "C instance has an own property $"
+);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/fielddefinition-initializer-abrupt-completion.js b/js/src/tests/test262/language/statements/class/elements/fielddefinition-initializer-abrupt-completion.js
new file mode 100644
index 0000000000..a29b1d94c9
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/fielddefinition-initializer-abrupt-completion.js
@@ -0,0 +1,48 @@
+// Copyright (C) 2017 Valerie Young. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: Class construction should error if evaluation of field initializer errors
+esid: sec-ecmascript-function-objects-construct-argumentslist-newtarget
+info: |
+ [[Construct]] ( argumentsList, newTarget)
+ ...
+ 8. If kind is "base", then
+ a. Perform OrdinaryCallBindThis(F, calleeContext, thisArgument).
+ b. Let result be InitializeInstanceFields(thisArgument, F).
+ c. If result is an abrupt completion, then
+ i. Remove calleeContext from execution context stack and restore callerContext as the running execution context.
+ ii. Return Completion(result).
+
+ InitializeInstanceFields ( O, constructor )
+ 1. Assert: Type ( O ) is Object.
+ 2. Assert: Assert constructor is an ECMAScript function object.
+ 3. Let fieldRecords be the value of constructor's [[Fields]] internal slot.
+ 4. For each item fieldRecord in order from fieldRecords,
+ a. If fieldRecord.[[static]] is false, then
+ i. Perform ? DefineField(O, fieldRecord).
+
+ DefineField(receiver, fieldRecord)
+ 1. Assert: Type(receiver) is Object.
+ 2. Assert: fieldRecord is a Record as created by ClassFieldDefinitionEvaluation.
+ 3. Let fieldName be fieldRecord.[[Name]].
+ 4. Let initializer be fieldRecord.[[Initializer]].
+ 5. If initializer is not empty, then
+ a.Let initValue be ? Call(initializer, receiver).
+
+features: [class, class-fields-public]
+---*/
+
+function f() {
+ throw new Test262Error();
+}
+
+class C {
+ x = f();
+}
+
+assert.throws(Test262Error, function() {
+ new C();
+})
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/fields-anonymous-function-length.js b/js/src/tests/test262/language/statements/class/elements/fields-anonymous-function-length.js
new file mode 100644
index 0000000000..38280bdfca
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/fields-anonymous-function-length.js
@@ -0,0 +1,48 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/fields-anonymous-function-length.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: Anonymous functions in field initializer have length properly set (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-fields-private, class-fields-public, class]
+flags: [generated]
+info: |
+ Updated Productions
+
+ FieldDefinition :
+ ClassElementName Initializer_opt
+
+ InitializeInstanceFields ( O, constructor )
+ 1. Assert: Type ( O ) is Object.
+ 2. Assert: constructor is an ECMAScript function object.
+ 3. Let fields be the value of constructor.[[Fields]].
+ 4. For each item fieldRecord in order from fields,
+ a. Perform ? DefineField(O, fieldRecord).
+ 5. Return.
+
+ DefineField(receiver, fieldRecord)
+ 1. Assert: Type(receiver) is Object.
+ 2. Assert: fieldRecord is a Record as created by ClassFieldDefinitionEvaluation.
+ 3. Let name be fieldRecord.[[Name]].
+ 4. Let initializer be fieldRecord.[[Initializer]].
+ 5. If initializer is not empty, then
+ a. Let initValue be ? Call(initializer, receiver).
+ ...
+
+---*/
+
+
+class C {
+ field = function() {};
+ #field = (a, b, c, d) => undefined;
+
+ accessPrivateField() {
+ return this.#field;
+ }
+}
+
+let c = new C();
+assert.sameValue(c.accessPrivateField().length, 4);
+assert.sameValue(c.field.length, 0);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/fields-asi-1.js b/js/src/tests/test262/language/statements/class/elements/fields-asi-1.js
new file mode 100644
index 0000000000..440e30d93f
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/fields-asi-1.js
@@ -0,0 +1,21 @@
+// Copyright (C) 2017 Valerie Young. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: ASI test in field declarations -- computed name interpreted as property
+esid: sec-automatic-semicolon-insertion
+features: [class, class-fields-public]
+---*/
+
+var obj = {}
+class C {
+ x = obj
+ ['lol'] = 42
+}
+
+var c = new C();
+
+assert.sameValue(c.x, 42);
+assert.sameValue(obj['lol'], 42);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/fields-asi-2.js b/js/src/tests/test262/language/statements/class/elements/fields-asi-2.js
new file mode 100644
index 0000000000..e7b2ce6a5c
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/fields-asi-2.js
@@ -0,0 +1,19 @@
+// Copyright (C) 2017 Valerie Young. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: ASI test in field declarations -- computed name interpreted as string index
+esid: sec-automatic-semicolon-insertion
+features: [class, class-fields-public]
+---*/
+
+class C {
+ x = "lol"
+ [1]
+}
+
+var c = new C();
+
+assert.sameValue(c.x, 'o');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/fields-asi-3.js b/js/src/tests/test262/language/statements/class/elements/fields-asi-3.js
new file mode 100644
index 0000000000..8bced9d0ba
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/fields-asi-3.js
@@ -0,0 +1,19 @@
+// |reftest| error:SyntaxError
+// Copyright (C) 2017 Valerie Young. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: ASI test in field declarations -- error when computed name interpreted as index
+esid: sec-automatic-semicolon-insertion
+features: [class, class-fields-public]
+negative:
+ phase: parse
+ type: SyntaxError
+---*/
+
+$DONOTEVALUATE();
+
+class C {
+ x = "string"
+ [0]() {}
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/fields-asi-4.js b/js/src/tests/test262/language/statements/class/elements/fields-asi-4.js
new file mode 100644
index 0000000000..b22cb71831
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/fields-asi-4.js
@@ -0,0 +1,19 @@
+// |reftest| error:SyntaxError
+// Copyright (C) 2017 Valerie Young. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: ASI test in field declarations -- error when generator interpreted as multiplication
+esid: sec-automatic-semicolon-insertion
+features: [class, class-fields-public, generators]
+negative:
+ phase: parse
+ type: SyntaxError
+---*/
+
+$DONOTEVALUATE();
+
+class C {
+ x = 42
+ *gen() {}
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/fields-asi-5.js b/js/src/tests/test262/language/statements/class/elements/fields-asi-5.js
new file mode 100644
index 0000000000..55ab32690f
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/fields-asi-5.js
@@ -0,0 +1,30 @@
+// Copyright (C) 2017 Valerie Young. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: ASI test in field declarations -- field with PropertyName "in" interpreted as index
+esid: sec-automatic-semicolon-insertion
+features: [class, class-fields-public]
+---*/
+
+var x = 0;
+var y = 1;
+var z = [42];
+
+class C {
+ a = x
+ in
+ z
+ b = y
+ in
+ z
+}
+
+var c = new C();
+
+assert.sameValue(c.a, true, 'a = x in z');
+assert.sameValue(c.b, false, 'b = y in z');
+assert(!Object.prototype.hasOwnProperty.call(c, "in"), "'in' is not parsed as a field declaration");
+assert(!Object.prototype.hasOwnProperty.call(c, "z"), "'z' is not parsed as a field declaration");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/fields-asi-same-line-1.js b/js/src/tests/test262/language/statements/class/elements/fields-asi-same-line-1.js
new file mode 100644
index 0000000000..f1badcbafb
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/fields-asi-same-line-1.js
@@ -0,0 +1,18 @@
+// |reftest| error:SyntaxError
+// Copyright (C) 2019 Jason Orendorff. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: ASI test in field declarations -- error when method on same line
+esid: sec-automatic-semicolon-insertion
+features: [class, class-fields-public]
+negative:
+ phase: parse
+ type: SyntaxError
+---*/
+
+$DONOTEVALUATE();
+
+class C {
+ field /* no ASI here */ method(){}
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/fields-asi-same-line-2.js b/js/src/tests/test262/language/statements/class/elements/fields-asi-same-line-2.js
new file mode 100644
index 0000000000..8ee4caebd9
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/fields-asi-same-line-2.js
@@ -0,0 +1,18 @@
+// |reftest| error:SyntaxError
+// Copyright (C) 2019 Jason Orendorff. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: ASI test in field declarations -- error when method on same line after initializer
+esid: sec-automatic-semicolon-insertion
+features: [class, class-fields-public]
+negative:
+ phase: parse
+ type: SyntaxError
+---*/
+
+$DONOTEVALUATE();
+
+class C {
+ field = 1 /* no ASI here */ method(){}
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/fields-computed-name-propname-constructor.js b/js/src/tests/test262/language/statements/class/elements/fields-computed-name-propname-constructor.js
new file mode 100644
index 0000000000..2eef946b50
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/fields-computed-name-propname-constructor.js
@@ -0,0 +1,54 @@
+// Copyright (C) 2017 Valerie Young. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+description: class fields forbid PropName 'constructor' (no early error -- PropName of ComputedPropertyName not forbidden value)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-public]
+info: |
+ Static Semantics: PropName
+ ...
+ ComputedPropertyName : [ AssignmentExpression ]
+ Return empty.
+
+
+ // This test file tests the following early error:
+ Static Semantics: Early Errors
+
+ ClassElement : FieldDefinition;
+ It is a Syntax Error if PropName of FieldDefinition is "constructor".
+
+ DefineField(receiver, fieldRecord)
+
+ ...
+ 8. If fieldName is a Private Name,
+ ...
+ 9. Else,
+ a. ...
+ b. Perform ? CreateDataPropertyOrThrow(receiver, fieldName, initValue).
+
+ CreateDataPropertyOrThrow ( O, P, V )
+
+ ...
+ 3. Let success be ? CreateDataProperty(O, P, V).
+ 4. If success is false, throw a TypeError exception.
+ ...
+
+ CreateDataProperty ( O, P, V )
+
+ ...
+ 3. Let newDesc be the PropertyDescriptor { [[Value]]: V, [[Writable]]: true, [[Enumerable]]: true,
+ [[Configurable]]: true }.
+ 4. Return ? O.[[DefineOwnProperty]](P, newDesc).
+---*/
+
+var x = "constructor";
+class C1 {
+ [x];
+}
+
+var c1 = new C1();
+
+assert.sameValue(c1.hasOwnProperty("constructor"), true);
+assert.sameValue(C1.hasOwnProperty("constructor"), false);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/fields-computed-name-static-computed-var-propname-constructor.js b/js/src/tests/test262/language/statements/class/elements/fields-computed-name-static-computed-var-propname-constructor.js
new file mode 100644
index 0000000000..585dbac7de
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/fields-computed-name-static-computed-var-propname-constructor.js
@@ -0,0 +1,82 @@
+// Copyright (C) 2017 Leo Balter. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+description: static class fields forbid PropName 'constructor' (no early error -- PropName of ComputedPropertyName not forbidden value)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-static-fields-public]
+info: |
+ Static Semantics: PropName
+ ...
+ ComputedPropertyName : [ AssignmentExpression ]
+ Return empty.
+
+ This test file tests the following early error is only valid for a matching PropName:
+
+ Static Semantics: Early Errors
+
+ ClassElement : static FieldDefinition;
+ It is a Syntax Error if PropName of FieldDefinition is "prototype" or "constructor".
+
+ -- IDK what is calling InitializeClassElements but I guess it's supposed to be called to
+ -- set the fields
+
+ InitializeClassElements(F, proto)
+
+ ...
+ 6. For each item element in order from elements,
+ a. If element.[[Kind]] is "field" and element.[[Placement]] is "static" or "prototype",
+ ...
+ ii. Let receiver be F if element.[[Placement]] is "static", else let receiver be proto.
+ iii. Perform ? DefineClassElement(receiver, element).
+
+ -- DefineClassElement is probably DefineField in the class fields proposal
+
+ DefineField(receiver, fieldRecord)
+
+ ...
+ 8. If fieldName is a Private Name,
+ ...
+ 9. Else,
+ a. ...
+ b. Perform ? CreateDataPropertyOrThrow(receiver, fieldName, initValue).
+
+ CreateDataPropertyOrThrow ( O, P, V )
+
+ ...
+ 3. Let success be ? CreateDataProperty(O, P, V).
+ 4. If success is false, throw a TypeError exception.
+ ...
+
+ CreateDataProperty ( O, P, V )
+
+ ...
+ 3. Let newDesc be the PropertyDescriptor { [[Value]]: V, [[Writable]]: true, [[Enumerable]]: true,
+ [[Configurable]]: true }.
+ 4. Return ? O.[[DefineOwnProperty]](P, newDesc).
+includes: [propertyHelper.js]
+---*/
+
+var x = 'constructor';
+class C1 {
+ static [x];
+}
+
+verifyProperty(C1, 'constructor', {
+ value: undefined,
+ configurable: true,
+ writable: true,
+ enumerable: true,
+});
+
+class C2 {
+ static [x] = 42;
+}
+
+verifyProperty(C2, 'constructor', {
+ value: 42,
+ configurable: true,
+ writable: true,
+ enumerable: true,
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/fields-computed-name-static-computed-var-propname-prototype.js b/js/src/tests/test262/language/statements/class/elements/fields-computed-name-static-computed-var-propname-prototype.js
new file mode 100644
index 0000000000..7f4c43c8d3
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/fields-computed-name-static-computed-var-propname-prototype.js
@@ -0,0 +1,34 @@
+// Copyright (C) 2017 Valerie Young. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+description: static class fields forbid PropName 'prototype' (no early error -- PropName of ComputedPropertyName)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-static-fields-public]
+info: |
+ 14.6.13 Runtime Semantics: ClassDefinitionEvaluation
+
+ ...
+ 16. Perform MakeConstructor(F, false, proto).
+ ...
+
+ 9.2.10 MakeConstructor ( F [ , writablePrototype [ , prototype ] ] )
+
+ 6. Perform ! DefinePropertyOrThrow(F, "prototype", PropertyDescriptor { [[Value]]: prototype,
+ [[Writable]]: writablePrototype, [[Enumerable]]: false, [[Configurable]]: false }).
+---*/
+
+var x = "prototype";
+
+assert.throws(TypeError, function() {
+ class C {
+ static [x] = 42;
+ }
+});
+
+assert.throws(TypeError, function() {
+ class C {
+ static [x];
+ }
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/fields-computed-name-static-propname-constructor.js b/js/src/tests/test262/language/statements/class/elements/fields-computed-name-static-propname-constructor.js
new file mode 100644
index 0000000000..b8bf0f8826
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/fields-computed-name-static-propname-constructor.js
@@ -0,0 +1,81 @@
+// Copyright (C) 2017 Leo Balter. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+description: static class fields forbid PropName 'constructor' (no early error -- PropName of ComputedPropertyName not forbidden value)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-static-fields-public]
+info: |
+ Static Semantics: PropName
+ ...
+ ComputedPropertyName : [ AssignmentExpression ]
+ Return empty.
+
+ This test file tests the following early error is only valid for a matching PropName:
+
+ Static Semantics: Early Errors
+
+ ClassElement : static FieldDefinition;
+ It is a Syntax Error if PropName of FieldDefinition is "prototype" or "constructor".
+
+ -- IDK what is calling InitializeClassElements but I guess it's supposed to be called to
+ -- set the fields
+
+ InitializeClassElements(F, proto)
+
+ ...
+ 6. For each item element in order from elements,
+ a. If element.[[Kind]] is "field" and element.[[Placement]] is "static" or "prototype",
+ ...
+ ii. Let receiver be F if element.[[Placement]] is "static", else let receiver be proto.
+ iii. Perform ? DefineClassElement(receiver, element).
+
+ -- DefineClassElement is probably DefineField in the class fields proposal
+
+ DefineField(receiver, fieldRecord)
+
+ ...
+ 8. If fieldName is a Private Name,
+ ...
+ 9. Else,
+ a. ...
+ b. Perform ? CreateDataPropertyOrThrow(receiver, fieldName, initValue).
+
+ CreateDataPropertyOrThrow ( O, P, V )
+
+ ...
+ 3. Let success be ? CreateDataProperty(O, P, V).
+ 4. If success is false, throw a TypeError exception.
+ ...
+
+ CreateDataProperty ( O, P, V )
+
+ ...
+ 3. Let newDesc be the PropertyDescriptor { [[Value]]: V, [[Writable]]: true, [[Enumerable]]: true,
+ [[Configurable]]: true }.
+ 4. Return ? O.[[DefineOwnProperty]](P, newDesc).
+includes: [propertyHelper.js]
+---*/
+
+class C1 {
+ static ['constructor'];
+}
+
+verifyProperty(C1, 'constructor', {
+ value: undefined,
+ configurable: true,
+ writable: true,
+ enumerable: true,
+});
+
+class C2 {
+ static ['constructor'] = 42;
+}
+
+verifyProperty(C2, 'constructor', {
+ value: 42,
+ configurable: true,
+ writable: true,
+ enumerable: true,
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/fields-computed-name-static-propname-prototype.js b/js/src/tests/test262/language/statements/class/elements/fields-computed-name-static-propname-prototype.js
new file mode 100644
index 0000000000..5fba6d2d6c
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/fields-computed-name-static-propname-prototype.js
@@ -0,0 +1,32 @@
+// Copyright (C) 2017 Valerie Young. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+description: static class fields forbid PropName 'prototype' (no early error -- PropName of ComputedPropertyName)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-static-fields-public]
+info: |
+ 14.6.13 Runtime Semantics: ClassDefinitionEvaluation
+
+ ...
+ 16. Perform MakeConstructor(F, false, proto).
+ ...
+
+ 9.2.10 MakeConstructor ( F [ , writablePrototype [ , prototype ] ] )
+
+ 6. Perform ! DefinePropertyOrThrow(F, "prototype", PropertyDescriptor { [[Value]]: prototype,
+ [[Writable]]: writablePrototype, [[Enumerable]]: false, [[Configurable]]: false }).
+---*/
+
+assert.throws(TypeError, function() {
+ class C {
+ static ['prototype'] = 42;
+ }
+});
+
+assert.throws(TypeError, function() {
+ class C {
+ static ['prototype'];
+ }
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/fields-duplicate-privatenames.js b/js/src/tests/test262/language/statements/class/elements/fields-duplicate-privatenames.js
new file mode 100644
index 0000000000..da13cf7b43
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/fields-duplicate-privatenames.js
@@ -0,0 +1,25 @@
+// |reftest| error:SyntaxError
+// Copyright 2017 Valerie Young. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: Syntax error if the same private field defined twice
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-private]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ ClassBody : ClassElementList
+ It is a Syntax Error if PrivateBoundNames of ClassBody contains any duplicate entries.
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+ #x;
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/fields-hash-constructor-is-a-valid-name.js b/js/src/tests/test262/language/statements/class/elements/fields-hash-constructor-is-a-valid-name.js
new file mode 100644
index 0000000000..0372cfa317
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/fields-hash-constructor-is-a-valid-name.js
@@ -0,0 +1,42 @@
+// Copyright (C) 2018 Leo Balter. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+description: "#constructor is a valid property name for a public field"
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-public]
+info: |
+ ClassElementName : PrivateName;
+
+ It is a Syntax Error if StringValue of PrivateName is "#constructor".
+includes: [propertyHelper.js]
+---*/
+
+class C1 {
+ ["#constructor"];
+}
+
+var c1 = new C1();
+
+assert.sameValue(Object.prototype.hasOwnProperty.call(C1, '#constructor'), false);
+verifyProperty(c1, '#constructor', {
+ value: undefined,
+ configurable: true,
+ enumerable: true,
+ writable: true,
+});
+
+class C2 {
+ ["#constructor"] = 42;
+}
+
+var c2 = new C2();
+
+assert.sameValue(Object.prototype.hasOwnProperty.call(C2, '#constructor'), false);
+verifyProperty(c2, '#constructor', {
+ value: 42,
+ configurable: true,
+ enumerable: true,
+ writable: true,
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/fields-literal-name-propname-constructor.js b/js/src/tests/test262/language/statements/class/elements/fields-literal-name-propname-constructor.js
new file mode 100644
index 0000000000..3bb17a4524
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/fields-literal-name-propname-constructor.js
@@ -0,0 +1,30 @@
+// |reftest| error:SyntaxError
+// Copyright (C) 2017 Valerie Young. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+description: class fields forbid PropName 'constructor' (early error -- PropName of IdentifierName is forbidden value)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-public]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: PropName
+ LiteralPropertyName : IdentifierName
+ Return StringValue of IdentifierName.
+
+
+ // This test file tests the following early error:
+ Static Semantics: Early Errors
+
+ ClassElement : FieldDefinition;
+ It is a Syntax Error if PropName of FieldDefinition is "constructor".
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ constructor;
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/fields-literal-name-static-propname-constructor.js b/js/src/tests/test262/language/statements/class/elements/fields-literal-name-static-propname-constructor.js
new file mode 100644
index 0000000000..27b3ed35d4
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/fields-literal-name-static-propname-constructor.js
@@ -0,0 +1,30 @@
+// |reftest| error:SyntaxError
+// Copyright (C) 2017 Valerie Young. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+description: static class field forbid PropName 'constructor' (early error -- PropName of IdentifierName is forbidden value)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-static-fields-public]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: PropName
+ LiteralPropertyName : IdentifierName
+ Return StringValue of IdentifierName.
+
+
+ // This test file tests the following early error:
+ Static Semantics: Early Errors
+
+ ClassElement : staticFieldDefinition;
+ It is a Syntax Error if PropName of FieldDefinition is "prototype" or "constructor".
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ static constructor;
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/fields-literal-name-static-propname-prototype.js b/js/src/tests/test262/language/statements/class/elements/fields-literal-name-static-propname-prototype.js
new file mode 100644
index 0000000000..032744bc63
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/fields-literal-name-static-propname-prototype.js
@@ -0,0 +1,30 @@
+// |reftest| error:SyntaxError
+// Copyright (C) 2017 Valerie Young. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+description: static class fields forbid PropName 'prototype' (early error -- PropName of IdentifierName is forbidden value)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-static-fields-public]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: PropName
+ LiteralPropertyName : IdentifierName
+ Return StringValue of IdentifierName.
+
+
+ // This test file tests the following early error:
+ Static Semantics: Early Errors
+
+ ClassElement : staticFieldDefinition;
+ It is a Syntax Error if PropName of FieldDefinition is "prototype" or "constructor".
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ static prototype;
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/fields-string-name-propname-constructor.js b/js/src/tests/test262/language/statements/class/elements/fields-string-name-propname-constructor.js
new file mode 100644
index 0000000000..f81ce20424
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/fields-string-name-propname-constructor.js
@@ -0,0 +1,31 @@
+// |reftest| error:SyntaxError
+// Copyright (C) 2017 Valerie Young. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+description: class fields forbid PropName 'constructor' (early error -- PropName of StringLiteral is forbidden value)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-public]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: PropName
+ ...
+ LiteralPropertyName : StringLiteral
+ Return the String value whose code units are the SV of the StringLiteral.
+
+
+ // This test file tests the following early error:
+ Static Semantics: Early Errors
+
+ ClassElement : FieldDefinition;
+ It is a Syntax Error if PropName of FieldDefinition is "constructor".
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ 'constructor';
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/fields-string-name-static-propname-constructor.js b/js/src/tests/test262/language/statements/class/elements/fields-string-name-static-propname-constructor.js
new file mode 100644
index 0000000000..fe1a8bdbd3
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/fields-string-name-static-propname-constructor.js
@@ -0,0 +1,31 @@
+// |reftest| error:SyntaxError
+// Copyright (C) 2017 Valerie Young. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+description: static class field forbid PropName 'constructor' (early error -- PropName of StringLiteral is forbidden value)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-static-fields-public]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: PropName
+ ...
+ LiteralPropertyName : StringLiteral
+ Return the String value whose code units are the SV of the StringLiteral.
+
+
+ // This test file tests the following early error:
+ Static Semantics: Early Errors
+
+ ClassElement : staticFieldDefinition;
+ It is a Syntax Error if PropName of FieldDefinition is "prototype" or "constructor".
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ static 'constructor';
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/fields-string-name-static-propname-prototype.js b/js/src/tests/test262/language/statements/class/elements/fields-string-name-static-propname-prototype.js
new file mode 100644
index 0000000000..3a8b62d3c0
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/fields-string-name-static-propname-prototype.js
@@ -0,0 +1,31 @@
+// |reftest| error:SyntaxError
+// Copyright (C) 2017 Valerie Young. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+description: static class fields forbid PropName 'prototype' (early error -- PropName of StringLiteral is forbidden value)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-static-fields-public]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: PropName
+ ...
+ LiteralPropertyName : StringLiteral
+ Return the String value whose code units are the SV of the StringLiteral.
+
+
+ // This test file tests the following early error:
+ Static Semantics: Early Errors
+
+ ClassElement : staticFieldDefinition;
+ It is a Syntax Error if PropName of FieldDefinition is "prototype" or "constructor".
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ static 'prototype';
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/gen-private-method-static/browser.js b/js/src/tests/test262/language/statements/class/elements/gen-private-method-static/browser.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/gen-private-method-static/browser.js
diff --git a/js/src/tests/test262/language/statements/class/elements/gen-private-method-static/shell.js b/js/src/tests/test262/language/statements/class/elements/gen-private-method-static/shell.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/gen-private-method-static/shell.js
diff --git a/js/src/tests/test262/language/statements/class/elements/gen-private-method-static/yield-as-binding-identifier-escaped.js b/js/src/tests/test262/language/statements/class/elements/gen-private-method-static/yield-as-binding-identifier-escaped.js
new file mode 100644
index 0000000000..0e43f77456
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/gen-private-method-static/yield-as-binding-identifier-escaped.js
@@ -0,0 +1,36 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/generators/yield-as-binding-identifier-escaped.case
+// - src/generators/syntax/class-decl-static-private-method.template
+/*---
+description: yield is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Static generator method as a ClassDeclaration element)
+esid: prod-GeneratorMethod
+features: [generators, class-static-methods-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ GeneratorMethod
+
+ 14.4 Generator Function Definitions
+
+ GeneratorMethod :
+ * # PropertyName ( UniqueFormalParameters ) { GeneratorBody }
+
+
+ BindingIdentifier : Identifier
+
+ It is a Syntax Error if this production has a [Yield] parameter and
+ StringValue of Identifier is "yield".
+
+---*/
+$DONOTEVALUATE();
+
+class C {static *#gen() {
+ var yi\u0065ld;
+}}
diff --git a/js/src/tests/test262/language/statements/class/elements/gen-private-method-static/yield-as-binding-identifier.js b/js/src/tests/test262/language/statements/class/elements/gen-private-method-static/yield-as-binding-identifier.js
new file mode 100644
index 0000000000..b33a4d456b
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/gen-private-method-static/yield-as-binding-identifier.js
@@ -0,0 +1,36 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/generators/yield-as-binding-identifier.case
+// - src/generators/syntax/class-decl-static-private-method.template
+/*---
+description: yield is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Static generator method as a ClassDeclaration element)
+esid: prod-GeneratorMethod
+features: [generators, class-static-methods-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ GeneratorMethod
+
+ 14.4 Generator Function Definitions
+
+ GeneratorMethod :
+ * # PropertyName ( UniqueFormalParameters ) { GeneratorBody }
+
+
+ BindingIdentifier : Identifier
+
+ It is a Syntax Error if this production has a [Yield] parameter and
+ StringValue of Identifier is "yield".
+
+---*/
+$DONOTEVALUATE();
+
+class C {static *#gen() {
+ var yield;
+}}
diff --git a/js/src/tests/test262/language/statements/class/elements/gen-private-method-static/yield-as-identifier-reference-escaped.js b/js/src/tests/test262/language/statements/class/elements/gen-private-method-static/yield-as-identifier-reference-escaped.js
new file mode 100644
index 0000000000..04677528e4
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/gen-private-method-static/yield-as-identifier-reference-escaped.js
@@ -0,0 +1,36 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/generators/yield-as-identifier-reference-escaped.case
+// - src/generators/syntax/class-decl-static-private-method.template
+/*---
+description: yield is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Static generator method as a ClassDeclaration element)
+esid: prod-GeneratorMethod
+features: [generators, class-static-methods-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ GeneratorMethod
+
+ 14.4 Generator Function Definitions
+
+ GeneratorMethod :
+ * # PropertyName ( UniqueFormalParameters ) { GeneratorBody }
+
+
+ IdentifierReference : Identifier
+
+ It is a Syntax Error if this production has a [Yield] parameter and
+ StringValue of Identifier is "yield".
+
+---*/
+$DONOTEVALUATE();
+
+class C {static *#gen() {
+ void yi\u0065ld;
+}}
diff --git a/js/src/tests/test262/language/statements/class/elements/gen-private-method-static/yield-as-identifier-reference.js b/js/src/tests/test262/language/statements/class/elements/gen-private-method-static/yield-as-identifier-reference.js
new file mode 100644
index 0000000000..be6cfcd5bf
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/gen-private-method-static/yield-as-identifier-reference.js
@@ -0,0 +1,36 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/generators/yield-as-identifier-reference.case
+// - src/generators/syntax/class-decl-static-private-method.template
+/*---
+description: yield is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Static generator method as a ClassDeclaration element)
+esid: prod-GeneratorMethod
+features: [generators, class-static-methods-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ GeneratorMethod
+
+ 14.4 Generator Function Definitions
+
+ GeneratorMethod :
+ * # PropertyName ( UniqueFormalParameters ) { GeneratorBody }
+
+
+ IdentifierReference : Identifier
+
+ It is a Syntax Error if this production has a [Yield] parameter and
+ StringValue of Identifier is "yield".
+
+---*/
+$DONOTEVALUATE();
+
+class C {static *#gen() {
+ void yield;
+}}
diff --git a/js/src/tests/test262/language/statements/class/elements/gen-private-method-static/yield-as-label-identifier-escaped.js b/js/src/tests/test262/language/statements/class/elements/gen-private-method-static/yield-as-label-identifier-escaped.js
new file mode 100644
index 0000000000..5dcb4df908
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/gen-private-method-static/yield-as-label-identifier-escaped.js
@@ -0,0 +1,36 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/generators/yield-as-label-identifier-escaped.case
+// - src/generators/syntax/class-decl-static-private-method.template
+/*---
+description: yield is a reserved keyword within generator function bodies and may not be used as a label identifier. (Static generator method as a ClassDeclaration element)
+esid: prod-GeneratorMethod
+features: [generators, class-static-methods-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ GeneratorMethod
+
+ 14.4 Generator Function Definitions
+
+ GeneratorMethod :
+ * # PropertyName ( UniqueFormalParameters ) { GeneratorBody }
+
+
+ LabelIdentifier : Identifier
+
+ It is a Syntax Error if this production has a [Yield] parameter and
+ StringValue of Identifier is "yield".
+
+---*/
+$DONOTEVALUATE();
+
+class C {static *#gen() {
+ yi\u0065ld: ;
+}}
diff --git a/js/src/tests/test262/language/statements/class/elements/gen-private-method-static/yield-as-label-identifier.js b/js/src/tests/test262/language/statements/class/elements/gen-private-method-static/yield-as-label-identifier.js
new file mode 100644
index 0000000000..4371c8dba0
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/gen-private-method-static/yield-as-label-identifier.js
@@ -0,0 +1,36 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/generators/yield-as-label-identifier.case
+// - src/generators/syntax/class-decl-static-private-method.template
+/*---
+description: yield is a reserved keyword within generator function bodies and may not be used as a label identifier. (Static generator method as a ClassDeclaration element)
+esid: prod-GeneratorMethod
+features: [generators, class-static-methods-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ GeneratorMethod
+
+ 14.4 Generator Function Definitions
+
+ GeneratorMethod :
+ * # PropertyName ( UniqueFormalParameters ) { GeneratorBody }
+
+
+ LabelIdentifier : Identifier
+
+ It is a Syntax Error if this production has a [Yield] parameter and
+ StringValue of Identifier is "yield".
+
+---*/
+$DONOTEVALUATE();
+
+class C {static *#gen() {
+ yield: ;
+}}
diff --git a/js/src/tests/test262/language/statements/class/elements/gen-private-method-static/yield-identifier-spread-strict-strict.js b/js/src/tests/test262/language/statements/class/elements/gen-private-method-static/yield-identifier-spread-strict-strict.js
new file mode 100644
index 0000000000..258b126d5b
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/gen-private-method-static/yield-identifier-spread-strict-strict.js
@@ -0,0 +1,75 @@
+// |reftest| error:SyntaxError
+'use strict';
+// This file was procedurally generated from the following sources:
+// - src/generators/yield-identifier-spread-strict.case
+// - src/generators/default/class-decl-static-private-method.template
+/*---
+description: It's an early error if the AssignmentExpression is a function body with yield as an identifier in strict mode. (Static generator private method as a ClassDeclaration element)
+esid: prod-GeneratorPrivateMethod
+features: [object-spread, generators, class-static-methods-private]
+flags: [generated, onlyStrict]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ GeneratorMethod
+
+ 14.4 Generator Function Definitions
+
+ GeneratorMethod :
+ * PropertyName ( UniqueFormalParameters ) { GeneratorBody }
+
+
+ Spread Properties
+
+ PropertyDefinition[Yield]:
+ (...)
+ ...AssignmentExpression[In, ?Yield]
+
+---*/
+$DONOTEVALUATE();
+
+var callCount = 0;
+
+class C {
+ static *#gen() {
+ callCount += 1;
+ return {
+ ...(function() {
+ var yield;
+ throw new Test262Error();
+ }()),
+ }
+ }
+ static get gen() { return this.#gen; }
+}
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "Private field '#gen' does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "Private field '#gen' does not appear as an own property on C constructor"
+);
+
+var iter = C.gen();
+
+
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "Private field '#gen' does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "Private field '#gen' does not appear as an own property on C constructor"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/gen-private-method-static/yield-identifier-strict-strict.js b/js/src/tests/test262/language/statements/class/elements/gen-private-method-static/yield-identifier-strict-strict.js
new file mode 100644
index 0000000000..38bd773506
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/gen-private-method-static/yield-identifier-strict-strict.js
@@ -0,0 +1,66 @@
+// |reftest| error:SyntaxError
+'use strict';
+// This file was procedurally generated from the following sources:
+// - src/generators/yield-identifier-strict.case
+// - src/generators/default/class-decl-static-private-method.template
+/*---
+description: It's an early error if the generator body has another function body with yield as an identifier in strict mode. (Static generator private method as a ClassDeclaration element)
+esid: prod-GeneratorPrivateMethod
+features: [generators, class-static-methods-private]
+flags: [generated, onlyStrict]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ GeneratorMethod
+
+ 14.4 Generator Function Definitions
+
+ GeneratorMethod :
+ * PropertyName ( UniqueFormalParameters ) { GeneratorBody }
+
+---*/
+$DONOTEVALUATE();
+
+var callCount = 0;
+
+class C {
+ static *#gen() {
+ callCount += 1;
+ (function() {
+ var yield;
+ throw new Test262Error();
+ }())
+ }
+ static get gen() { return this.#gen; }
+}
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "Private field '#gen' does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "Private field '#gen' does not appear as an own property on C constructor"
+);
+
+var iter = C.gen();
+
+
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "Private field '#gen' does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "Private field '#gen' does not appear as an own property on C constructor"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/gen-private-method-static/yield-spread-arr-multiple.js b/js/src/tests/test262/language/statements/class/elements/gen-private-method-static/yield-spread-arr-multiple.js
new file mode 100644
index 0000000000..c1ba1a5916
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/gen-private-method-static/yield-spread-arr-multiple.js
@@ -0,0 +1,73 @@
+// This file was procedurally generated from the following sources:
+// - src/generators/yield-spread-arr-multiple.case
+// - src/generators/default/class-decl-static-private-method.template
+/*---
+description: Use yield value in a array spread position (Static generator private method as a ClassDeclaration element)
+esid: prod-GeneratorPrivateMethod
+features: [generators, class-static-methods-private]
+flags: [generated]
+includes: [compareArray.js]
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ GeneratorMethod
+
+ 14.4 Generator Function Definitions
+
+ GeneratorMethod :
+ * PropertyName ( UniqueFormalParameters ) { GeneratorBody }
+
+
+ Array Initializer
+
+ SpreadElement[Yield, Await]:
+ ...AssignmentExpression[+In, ?Yield, ?Await]
+
+---*/
+var arr = ['a', 'b', 'c'];
+var item;
+
+var callCount = 0;
+
+class C {
+ static *#gen() {
+ callCount += 1;
+ yield [...yield yield];
+ }
+ static get gen() { return this.#gen; }
+}
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "Private field '#gen' does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "Private field '#gen' does not appear as an own property on C constructor"
+);
+
+var iter = C.gen();
+
+iter.next(false);
+item = iter.next(['a', 'b', 'c']);
+item = iter.next(item.value);
+
+assert.compareArray(item.value, arr);
+assert.sameValue(item.done, false);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "Private field '#gen' does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "Private field '#gen' does not appear as an own property on C constructor"
+);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/gen-private-method-static/yield-spread-arr-single.js b/js/src/tests/test262/language/statements/class/elements/gen-private-method-static/yield-spread-arr-single.js
new file mode 100644
index 0000000000..06b50e2a37
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/gen-private-method-static/yield-spread-arr-single.js
@@ -0,0 +1,75 @@
+// This file was procedurally generated from the following sources:
+// - src/generators/yield-spread-arr-single.case
+// - src/generators/default/class-decl-static-private-method.template
+/*---
+description: Use yield value in a array spread position (Static generator private method as a ClassDeclaration element)
+esid: prod-GeneratorPrivateMethod
+features: [generators, class-static-methods-private]
+flags: [generated]
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ GeneratorMethod
+
+ 14.4 Generator Function Definitions
+
+ GeneratorMethod :
+ * PropertyName ( UniqueFormalParameters ) { GeneratorBody }
+
+
+ Array Initializer
+
+ SpreadElement[Yield, Await]:
+ ...AssignmentExpression[+In, ?Yield, ?Await]
+---*/
+var arr = ['a', 'b', 'c'];
+
+var callCount = 0;
+
+class C {
+ static *#gen() {
+ callCount += 1;
+ yield [...yield];
+ }
+ static get gen() { return this.#gen; }
+}
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "Private field '#gen' does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "Private field '#gen' does not appear as an own property on C constructor"
+);
+
+var iter = C.gen();
+
+iter.next(false);
+var item = iter.next(arr);
+var value = item.value;
+
+assert.notSameValue(value, arr, 'value is a new array');
+assert(Array.isArray(value), 'value is an Array exotic object');
+assert.sameValue(value.length, 3)
+assert.sameValue(value[0], 'a');
+assert.sameValue(value[1], 'b');
+assert.sameValue(value[2], 'c');
+assert.sameValue(item.done, false);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "Private field '#gen' does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "Private field '#gen' does not appear as an own property on C constructor"
+);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/gen-private-method-static/yield-spread-obj.js b/js/src/tests/test262/language/statements/class/elements/gen-private-method-static/yield-spread-obj.js
new file mode 100644
index 0000000000..a98fdf4aad
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/gen-private-method-static/yield-spread-obj.js
@@ -0,0 +1,78 @@
+// This file was procedurally generated from the following sources:
+// - src/generators/yield-spread-obj.case
+// - src/generators/default/class-decl-static-private-method.template
+/*---
+description: Use yield value in a object spread position (Static generator private method as a ClassDeclaration element)
+esid: prod-GeneratorPrivateMethod
+features: [object-spread, generators, class-static-methods-private]
+flags: [generated]
+info: |
+ ClassElement :
+ static PrivateMethodDefinition
+
+ MethodDefinition :
+ GeneratorMethod
+
+ 14.4 Generator Function Definitions
+
+ GeneratorMethod :
+ * PropertyName ( UniqueFormalParameters ) { GeneratorBody }
+
+
+ Spread Properties
+
+ PropertyDefinition[Yield]:
+ (...)
+ ...AssignmentExpression[In, ?Yield]
+
+---*/
+
+var callCount = 0;
+
+class C {
+ static *#gen() {
+ callCount += 1;
+ yield {
+ ...yield,
+ y: 1,
+ ...yield yield,
+ };
+ }
+ static get gen() { return this.#gen; }
+}
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "Private field '#gen' does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "Private field '#gen' does not appear as an own property on C constructor"
+);
+
+var iter = C.gen();
+
+iter.next();
+iter.next({ x: 42 });
+iter.next({ x: 'lol' });
+var item = iter.next({ y: 39 });
+
+assert.sameValue(item.value.x, 42);
+assert.sameValue(item.value.y, 39);
+assert.sameValue(Object.keys(item.value).length, 2);
+assert.sameValue(item.done, false);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "Private field '#gen' does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "Private field '#gen' does not appear as an own property on C constructor"
+);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/gen-private-method/browser.js b/js/src/tests/test262/language/statements/class/elements/gen-private-method/browser.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/gen-private-method/browser.js
diff --git a/js/src/tests/test262/language/statements/class/elements/gen-private-method/shell.js b/js/src/tests/test262/language/statements/class/elements/gen-private-method/shell.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/gen-private-method/shell.js
diff --git a/js/src/tests/test262/language/statements/class/elements/gen-private-method/yield-as-binding-identifier-escaped.js b/js/src/tests/test262/language/statements/class/elements/gen-private-method/yield-as-binding-identifier-escaped.js
new file mode 100644
index 0000000000..385e2b978c
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/gen-private-method/yield-as-binding-identifier-escaped.js
@@ -0,0 +1,36 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/generators/yield-as-binding-identifier-escaped.case
+// - src/generators/syntax/class-decl-private-method.template
+/*---
+description: yield is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Generator method as a ClassDeclaration element)
+esid: prod-GeneratorMethod
+features: [generators, class-methods-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ GeneratorMethod
+
+ 14.4 Generator Function Definitions
+
+ GeneratorMethod :
+ * # PropertyName ( UniqueFormalParameters ) { GeneratorBody }
+
+
+ BindingIdentifier : Identifier
+
+ It is a Syntax Error if this production has a [Yield] parameter and
+ StringValue of Identifier is "yield".
+
+---*/
+$DONOTEVALUATE();
+
+class C { *#gen() {
+ var yi\u0065ld;
+}}
diff --git a/js/src/tests/test262/language/statements/class/elements/gen-private-method/yield-as-binding-identifier.js b/js/src/tests/test262/language/statements/class/elements/gen-private-method/yield-as-binding-identifier.js
new file mode 100644
index 0000000000..22dbaab59b
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/gen-private-method/yield-as-binding-identifier.js
@@ -0,0 +1,36 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/generators/yield-as-binding-identifier.case
+// - src/generators/syntax/class-decl-private-method.template
+/*---
+description: yield is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Generator method as a ClassDeclaration element)
+esid: prod-GeneratorMethod
+features: [generators, class-methods-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ GeneratorMethod
+
+ 14.4 Generator Function Definitions
+
+ GeneratorMethod :
+ * # PropertyName ( UniqueFormalParameters ) { GeneratorBody }
+
+
+ BindingIdentifier : Identifier
+
+ It is a Syntax Error if this production has a [Yield] parameter and
+ StringValue of Identifier is "yield".
+
+---*/
+$DONOTEVALUATE();
+
+class C { *#gen() {
+ var yield;
+}}
diff --git a/js/src/tests/test262/language/statements/class/elements/gen-private-method/yield-as-identifier-reference-escaped.js b/js/src/tests/test262/language/statements/class/elements/gen-private-method/yield-as-identifier-reference-escaped.js
new file mode 100644
index 0000000000..2795745d2c
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/gen-private-method/yield-as-identifier-reference-escaped.js
@@ -0,0 +1,36 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/generators/yield-as-identifier-reference-escaped.case
+// - src/generators/syntax/class-decl-private-method.template
+/*---
+description: yield is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Generator method as a ClassDeclaration element)
+esid: prod-GeneratorMethod
+features: [generators, class-methods-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ GeneratorMethod
+
+ 14.4 Generator Function Definitions
+
+ GeneratorMethod :
+ * # PropertyName ( UniqueFormalParameters ) { GeneratorBody }
+
+
+ IdentifierReference : Identifier
+
+ It is a Syntax Error if this production has a [Yield] parameter and
+ StringValue of Identifier is "yield".
+
+---*/
+$DONOTEVALUATE();
+
+class C { *#gen() {
+ void yi\u0065ld;
+}}
diff --git a/js/src/tests/test262/language/statements/class/elements/gen-private-method/yield-as-identifier-reference.js b/js/src/tests/test262/language/statements/class/elements/gen-private-method/yield-as-identifier-reference.js
new file mode 100644
index 0000000000..b67e9655e0
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/gen-private-method/yield-as-identifier-reference.js
@@ -0,0 +1,36 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/generators/yield-as-identifier-reference.case
+// - src/generators/syntax/class-decl-private-method.template
+/*---
+description: yield is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Generator method as a ClassDeclaration element)
+esid: prod-GeneratorMethod
+features: [generators, class-methods-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ GeneratorMethod
+
+ 14.4 Generator Function Definitions
+
+ GeneratorMethod :
+ * # PropertyName ( UniqueFormalParameters ) { GeneratorBody }
+
+
+ IdentifierReference : Identifier
+
+ It is a Syntax Error if this production has a [Yield] parameter and
+ StringValue of Identifier is "yield".
+
+---*/
+$DONOTEVALUATE();
+
+class C { *#gen() {
+ void yield;
+}}
diff --git a/js/src/tests/test262/language/statements/class/elements/gen-private-method/yield-as-label-identifier-escaped.js b/js/src/tests/test262/language/statements/class/elements/gen-private-method/yield-as-label-identifier-escaped.js
new file mode 100644
index 0000000000..c08efad0c1
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/gen-private-method/yield-as-label-identifier-escaped.js
@@ -0,0 +1,36 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/generators/yield-as-label-identifier-escaped.case
+// - src/generators/syntax/class-decl-private-method.template
+/*---
+description: yield is a reserved keyword within generator function bodies and may not be used as a label identifier. (Generator method as a ClassDeclaration element)
+esid: prod-GeneratorMethod
+features: [generators, class-methods-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ GeneratorMethod
+
+ 14.4 Generator Function Definitions
+
+ GeneratorMethod :
+ * # PropertyName ( UniqueFormalParameters ) { GeneratorBody }
+
+
+ LabelIdentifier : Identifier
+
+ It is a Syntax Error if this production has a [Yield] parameter and
+ StringValue of Identifier is "yield".
+
+---*/
+$DONOTEVALUATE();
+
+class C { *#gen() {
+ yi\u0065ld: ;
+}}
diff --git a/js/src/tests/test262/language/statements/class/elements/gen-private-method/yield-as-label-identifier.js b/js/src/tests/test262/language/statements/class/elements/gen-private-method/yield-as-label-identifier.js
new file mode 100644
index 0000000000..3137bbb7dd
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/gen-private-method/yield-as-label-identifier.js
@@ -0,0 +1,36 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/generators/yield-as-label-identifier.case
+// - src/generators/syntax/class-decl-private-method.template
+/*---
+description: yield is a reserved keyword within generator function bodies and may not be used as a label identifier. (Generator method as a ClassDeclaration element)
+esid: prod-GeneratorMethod
+features: [generators, class-methods-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ GeneratorMethod
+
+ 14.4 Generator Function Definitions
+
+ GeneratorMethod :
+ * # PropertyName ( UniqueFormalParameters ) { GeneratorBody }
+
+
+ LabelIdentifier : Identifier
+
+ It is a Syntax Error if this production has a [Yield] parameter and
+ StringValue of Identifier is "yield".
+
+---*/
+$DONOTEVALUATE();
+
+class C { *#gen() {
+ yield: ;
+}}
diff --git a/js/src/tests/test262/language/statements/class/elements/gen-private-method/yield-identifier-spread-strict-strict.js b/js/src/tests/test262/language/statements/class/elements/gen-private-method/yield-identifier-spread-strict-strict.js
new file mode 100644
index 0000000000..d8ec3056cf
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/gen-private-method/yield-identifier-spread-strict-strict.js
@@ -0,0 +1,85 @@
+// |reftest| error:SyntaxError
+'use strict';
+// This file was procedurally generated from the following sources:
+// - src/generators/yield-identifier-spread-strict.case
+// - src/generators/default/class-decl-private-method.template
+/*---
+description: It's an early error if the AssignmentExpression is a function body with yield as an identifier in strict mode. (Generator private method as a ClassDeclaration element)
+esid: prod-GeneratorPrivateMethod
+features: [object-spread, generators, class-methods-private]
+flags: [generated, onlyStrict]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ GeneratorMethod
+
+ 14.4 Generator Function Definitions
+
+ GeneratorMethod :
+ * PropertyName ( UniqueFormalParameters ) { GeneratorBody }
+
+
+ Spread Properties
+
+ PropertyDefinition[Yield]:
+ (...)
+ ...AssignmentExpression[In, ?Yield]
+
+---*/
+$DONOTEVALUATE();
+
+var callCount = 0;
+
+class C {
+ *#gen() {
+ callCount += 1;
+ return {
+ ...(function() {
+ var yield;
+ throw new Test262Error();
+ }()),
+ }
+ }
+ get gen() { return this.#gen; }
+}
+
+const c = new C();
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "Private field '#gen' does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "Private field '#gen' does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "Private field '#gen' does not appear as an own property on C instance"
+);
+
+var iter = c.gen();
+
+
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "Private field '#gen' does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "Private field '#gen' does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "Private field '#gen' does not appear as an own property on C instance"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/gen-private-method/yield-identifier-strict-strict.js b/js/src/tests/test262/language/statements/class/elements/gen-private-method/yield-identifier-strict-strict.js
new file mode 100644
index 0000000000..0d4ecfecc4
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/gen-private-method/yield-identifier-strict-strict.js
@@ -0,0 +1,76 @@
+// |reftest| error:SyntaxError
+'use strict';
+// This file was procedurally generated from the following sources:
+// - src/generators/yield-identifier-strict.case
+// - src/generators/default/class-decl-private-method.template
+/*---
+description: It's an early error if the generator body has another function body with yield as an identifier in strict mode. (Generator private method as a ClassDeclaration element)
+esid: prod-GeneratorPrivateMethod
+features: [generators, class-methods-private]
+flags: [generated, onlyStrict]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ GeneratorMethod
+
+ 14.4 Generator Function Definitions
+
+ GeneratorMethod :
+ * PropertyName ( UniqueFormalParameters ) { GeneratorBody }
+
+---*/
+$DONOTEVALUATE();
+
+var callCount = 0;
+
+class C {
+ *#gen() {
+ callCount += 1;
+ (function() {
+ var yield;
+ throw new Test262Error();
+ }())
+ }
+ get gen() { return this.#gen; }
+}
+
+const c = new C();
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "Private field '#gen' does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "Private field '#gen' does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "Private field '#gen' does not appear as an own property on C instance"
+);
+
+var iter = c.gen();
+
+
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "Private field '#gen' does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "Private field '#gen' does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "Private field '#gen' does not appear as an own property on C instance"
+);
diff --git a/js/src/tests/test262/language/statements/class/elements/gen-private-method/yield-spread-arr-multiple.js b/js/src/tests/test262/language/statements/class/elements/gen-private-method/yield-spread-arr-multiple.js
new file mode 100644
index 0000000000..5f066c3b1d
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/gen-private-method/yield-spread-arr-multiple.js
@@ -0,0 +1,83 @@
+// This file was procedurally generated from the following sources:
+// - src/generators/yield-spread-arr-multiple.case
+// - src/generators/default/class-decl-private-method.template
+/*---
+description: Use yield value in a array spread position (Generator private method as a ClassDeclaration element)
+esid: prod-GeneratorPrivateMethod
+features: [generators, class-methods-private]
+flags: [generated]
+includes: [compareArray.js]
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ GeneratorMethod
+
+ 14.4 Generator Function Definitions
+
+ GeneratorMethod :
+ * PropertyName ( UniqueFormalParameters ) { GeneratorBody }
+
+
+ Array Initializer
+
+ SpreadElement[Yield, Await]:
+ ...AssignmentExpression[+In, ?Yield, ?Await]
+
+---*/
+var arr = ['a', 'b', 'c'];
+var item;
+
+var callCount = 0;
+
+class C {
+ *#gen() {
+ callCount += 1;
+ yield [...yield yield];
+ }
+ get gen() { return this.#gen; }
+}
+
+const c = new C();
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "Private field '#gen' does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "Private field '#gen' does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "Private field '#gen' does not appear as an own property on C instance"
+);
+
+var iter = c.gen();
+
+iter.next(false);
+item = iter.next(['a', 'b', 'c']);
+item = iter.next(item.value);
+
+assert.compareArray(item.value, arr);
+assert.sameValue(item.done, false);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "Private field '#gen' does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "Private field '#gen' does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "Private field '#gen' does not appear as an own property on C instance"
+);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/gen-private-method/yield-spread-arr-single.js b/js/src/tests/test262/language/statements/class/elements/gen-private-method/yield-spread-arr-single.js
new file mode 100644
index 0000000000..e683264094
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/gen-private-method/yield-spread-arr-single.js
@@ -0,0 +1,85 @@
+// This file was procedurally generated from the following sources:
+// - src/generators/yield-spread-arr-single.case
+// - src/generators/default/class-decl-private-method.template
+/*---
+description: Use yield value in a array spread position (Generator private method as a ClassDeclaration element)
+esid: prod-GeneratorPrivateMethod
+features: [generators, class-methods-private]
+flags: [generated]
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ GeneratorMethod
+
+ 14.4 Generator Function Definitions
+
+ GeneratorMethod :
+ * PropertyName ( UniqueFormalParameters ) { GeneratorBody }
+
+
+ Array Initializer
+
+ SpreadElement[Yield, Await]:
+ ...AssignmentExpression[+In, ?Yield, ?Await]
+---*/
+var arr = ['a', 'b', 'c'];
+
+var callCount = 0;
+
+class C {
+ *#gen() {
+ callCount += 1;
+ yield [...yield];
+ }
+ get gen() { return this.#gen; }
+}
+
+const c = new C();
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "Private field '#gen' does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "Private field '#gen' does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "Private field '#gen' does not appear as an own property on C instance"
+);
+
+var iter = c.gen();
+
+iter.next(false);
+var item = iter.next(arr);
+var value = item.value;
+
+assert.notSameValue(value, arr, 'value is a new array');
+assert(Array.isArray(value), 'value is an Array exotic object');
+assert.sameValue(value.length, 3)
+assert.sameValue(value[0], 'a');
+assert.sameValue(value[1], 'b');
+assert.sameValue(value[2], 'c');
+assert.sameValue(item.done, false);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "Private field '#gen' does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "Private field '#gen' does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "Private field '#gen' does not appear as an own property on C instance"
+);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/gen-private-method/yield-spread-obj.js b/js/src/tests/test262/language/statements/class/elements/gen-private-method/yield-spread-obj.js
new file mode 100644
index 0000000000..cf3eb131fd
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/gen-private-method/yield-spread-obj.js
@@ -0,0 +1,88 @@
+// This file was procedurally generated from the following sources:
+// - src/generators/yield-spread-obj.case
+// - src/generators/default/class-decl-private-method.template
+/*---
+description: Use yield value in a object spread position (Generator private method as a ClassDeclaration element)
+esid: prod-GeneratorPrivateMethod
+features: [object-spread, generators, class-methods-private]
+flags: [generated]
+info: |
+ ClassElement :
+ PrivateMethodDefinition
+
+ MethodDefinition :
+ GeneratorMethod
+
+ 14.4 Generator Function Definitions
+
+ GeneratorMethod :
+ * PropertyName ( UniqueFormalParameters ) { GeneratorBody }
+
+
+ Spread Properties
+
+ PropertyDefinition[Yield]:
+ (...)
+ ...AssignmentExpression[In, ?Yield]
+
+---*/
+
+var callCount = 0;
+
+class C {
+ *#gen() {
+ callCount += 1;
+ yield {
+ ...yield,
+ y: 1,
+ ...yield yield,
+ };
+ }
+ get gen() { return this.#gen; }
+}
+
+const c = new C();
+
+// Test the private fields do not appear as properties before set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "Private field '#gen' does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "Private field '#gen' does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "Private field '#gen' does not appear as an own property on C instance"
+);
+
+var iter = c.gen();
+
+iter.next();
+iter.next({ x: 42 });
+iter.next({ x: 'lol' });
+var item = iter.next({ y: 39 });
+
+assert.sameValue(item.value.x, 42);
+assert.sameValue(item.value.y, 39);
+assert.sameValue(Object.keys(item.value).length, 2);
+assert.sameValue(item.done, false);
+
+assert.sameValue(callCount, 1);
+
+// Test the private fields do not appear as properties after set to value
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "#gen"),
+ "Private field '#gen' does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "#gen"),
+ "Private field '#gen' does not appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "#gen"),
+ "Private field '#gen' does not appear as an own property on C instance"
+);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/get-access-of-missing-private-getter.js b/js/src/tests/test262/language/statements/class/elements/get-access-of-missing-private-getter.js
new file mode 100644
index 0000000000..900bb55fe0
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/get-access-of-missing-private-getter.js
@@ -0,0 +1,41 @@
+// Copyright (C) 2019 Caio Lima (Igalia SL). All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: Trying to get a private member without getter throws TypeError
+esid: sec-privatefieldget
+info: |
+ PrivateFieldGet ( P, O )
+ 1. Assert: P is a Private Name.
+ 2. If O is not an object, throw a TypeError exception.
+ 3. If P.[[Kind]] is "field",
+ a. Let entry be PrivateFieldFind(P, O).
+ b. If entry is empty, throw a TypeError exception.
+ c. Return entry.[[PrivateFieldValue]].
+ 4. Perform ? PrivateBrandCheck(O, P).
+ 5. If P.[[Kind]] is "method",
+ a. Return P.[[Value]].
+ 6. Else,
+ a. Assert: P.[[Kind]] is "accessor".
+ b. If P does not have a [[Get]] field, throw a TypeError exception.
+ c. Let getter be P.[[Get]].
+ d. Return ? Call(getter, O).
+features: [class-methods-private, class]
+---*/
+
+class C {
+ set #f(v) {
+ throw new Test262Error();
+ }
+
+ getAccess() {
+ return this.#f;
+ }
+}
+
+let c = new C();
+assert.throws(TypeError, function() {
+ c.getAccess();
+}, 'get operation on private accessor without getter should throw TypeError');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/get-access-of-missing-private-static-getter.js b/js/src/tests/test262/language/statements/class/elements/get-access-of-missing-private-static-getter.js
new file mode 100644
index 0000000000..9958b1e474
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/get-access-of-missing-private-static-getter.js
@@ -0,0 +1,40 @@
+// Copyright (C) 2021 André Bargull. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: Trying to get a private member without getter throws TypeError
+esid: sec-privatefieldget
+info: |
+ PrivateFieldGet ( P, O )
+ 1. Assert: P is a Private Name.
+ 2. If O is not an object, throw a TypeError exception.
+ 3. If P.[[Kind]] is "field",
+ a. Let entry be PrivateFieldFind(P, O).
+ b. If entry is empty, throw a TypeError exception.
+ c. Return entry.[[PrivateFieldValue]].
+ 4. Perform ? PrivateBrandCheck(O, P).
+ 5. If P.[[Kind]] is "method",
+ a. Return P.[[Value]].
+ 6. Else,
+ a. Assert: P.[[Kind]] is "accessor".
+ b. If P does not have a [[Get]] field, throw a TypeError exception.
+ c. Let getter be P.[[Get]].
+ d. Return ? Call(getter, O).
+features: [class-static-methods-private, class]
+---*/
+
+class C {
+ static set #f(v) {
+ throw new Test262Error();
+ }
+
+ static getAccess() {
+ return this.#f;
+ }
+}
+
+assert.throws(TypeError, function() {
+ C.getAccess();
+}, 'get operation on private accessor without getter should throw TypeError');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/get-access-of-missing-shadowed-private-getter.js b/js/src/tests/test262/language/statements/class/elements/get-access-of-missing-shadowed-private-getter.js
new file mode 100644
index 0000000000..c35e339eef
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/get-access-of-missing-shadowed-private-getter.js
@@ -0,0 +1,91 @@
+// Copyright (C) 2019 Caio Lima (Igalia SL). All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: Trying to get from PrivateName without [[Get]] throws TypeError
+esid: sec-privatefieldget
+info: |
+ PrivateFieldGet (P, O )
+ 1. Assert: P is a Private Name.
+ 2. If O is not an object, throw a TypeError exception.
+ 3. If P.[[Kind]] is "field",
+ a. Let entry be PrivateFieldFind(P, O).
+ b. If entry is empty, throw a TypeError exception.
+ c. Return entry.[[PrivateFieldValue]].
+ 4. Perform ? PrivateBrandCheck(O, P).
+ 5. If P.[[Kind]] is "method",
+ a. Return P.[[Value]].
+ 6. Else,
+ a. Assert: P.[[Kind]] is "accessor".
+ b. If P does not have a [[Get]] field, throw a TypeError exception.
+ c. Let getter be P.[[Get]].
+ d. Return ? Call(getter, O).
+features: [class-methods-private, class-fields-public, class]
+---*/
+
+class A {
+ get #f() {
+ throw new Test262Error();
+ }
+}
+
+class C extends A {
+ set #f(v) {
+ throw new Test262Error();
+ }
+
+ getAccess() {
+ return this.#f;
+ }
+}
+
+let c = new C();
+assert.throws(TypeError, function() {
+ c.getAccess();
+}, 'subclass private accessor should shadow super class private accessor');
+
+class B {
+ get #f() {
+ throw new Test262Error();
+ }
+
+ Inner = class {
+ set #f(v) {
+ throw new Test262Error();
+ }
+
+ getAccess() {
+ return this.#f;
+ }
+ }
+}
+
+let b = new B();
+let innerB = new b.Inner();
+assert.throws(TypeError, function() {
+ innerB.getAccess();
+}, 'inner class private accessor should shadow outer class private accessor');
+
+class D {
+ set #f(v) {
+ throw new Test262Error();
+ }
+
+ Inner = class {
+ get #f() {
+ throw new Test262Error();
+ }
+ }
+
+ getAccess() {
+ return this.#f;
+ }
+}
+
+let d = new D();
+assert.throws(TypeError, function() {
+ d.getAccess();
+}, 'inner class private accessor should not be visible to outer class private accessor');
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/grammar-private-field-optional-chaining.js b/js/src/tests/test262/language/statements/class/elements/grammar-private-field-optional-chaining.js
new file mode 100644
index 0000000000..d0c3fc7cbe
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/grammar-private-field-optional-chaining.js
@@ -0,0 +1,42 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-private-field-optional-chaining.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: PrivateName after '?.' is valid syntax (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-fields-private, optional-chaining, class]
+flags: [generated]
+info: |
+ Updated Productions
+
+ OptionalChain[Yield, Await]:
+ `?.` `[` Expression[+In, ?Yield, ?Await] `]`
+ `?.` IdentifierName
+ `?.` Arguments[?Yield, ?Await]
+ `?.` TemplateLiteral[?Yield, ?Await, +Tagged]
+ `?.` PrivateIdentifier
+
+---*/
+
+
+class C {
+ #m = 'test262';
+
+ static access(obj) {
+ return obj?.#m;
+ }
+}
+
+let c = new C();
+
+assert.sameValue(C.access(c), 'test262');
+
+assert.sameValue(C.access(null), undefined);
+assert.sameValue(C.access(undefined), undefined);
+
+assert.throws(TypeError, function() {
+ C.access({});
+}, 'accessed private field from an ordinary object');
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/indirect-eval-contains-arguments.js b/js/src/tests/test262/language/statements/class/elements/indirect-eval-contains-arguments.js
new file mode 100644
index 0000000000..5223d5dd2b
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/indirect-eval-contains-arguments.js
@@ -0,0 +1,23 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/eval-contains-arguments.case
+// - src/class-elements/initializer-indirect-eval-arguments/cls-decl-fields-indirect-eval.template
+/*---
+description: No error if `arguments` in StatementList of eval (indirect eval)
+esid: sec-performeval-rules-in-initializer
+features: [class, class-fields-public]
+flags: [generated, noStrict]
+info: |
+ For indirect eval, the "Additional Early Error Rules for Eval Inside Initializer"
+ (in #sec-performeval-rules-in-initializer) are NOT applicable.
+
+---*/
+
+
+var arguments = 1;
+class C {
+ x = (0, eval)('arguments;');
+}
+
+assert.sameValue(new C().x, arguments);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/indirect-eval-err-contains-newtarget.js b/js/src/tests/test262/language/statements/class/elements/indirect-eval-err-contains-newtarget.js
new file mode 100644
index 0000000000..23dfc171bb
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/indirect-eval-err-contains-newtarget.js
@@ -0,0 +1,37 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/eval-err-contains-newtarget.case
+// - src/class-elements/initializer-eval-newtarget/cls-decl-fields-indirect-eval.template
+/*---
+description: error if `new.target` in StatementList of eval (indirect eval)
+esid: sec-performeval-rules-in-initializer
+features: [class, new.target, class-fields-public]
+flags: [generated]
+info: |
+ Additional Early Error Rules for Eval Inside Initializer
+ These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer.
+ ScriptBody : StatementList
+
+ ...
+ The remaining eval rules apply as outside a constructor, inside a method, and inside a function.
+
+ Additional Early Error Rules for Eval Outside Functions
+ These static semantics are applied by PerformEval when a direct eval call occurs outside of any function.
+ ScriptBody : StatementList
+
+ It is a Syntax Error if StatementList Contains NewTarget.
+
+---*/
+
+
+var executed = false;
+class C {
+ x = (0, eval)('executed = true; new.target;');
+}
+
+assert.throws(SyntaxError, function() {
+ new C();
+});
+
+assert.sameValue(executed, false);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/init-err-evaluation.js b/js/src/tests/test262/language/statements/class/elements/init-err-evaluation.js
new file mode 100644
index 0000000000..d661a37ab6
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/init-err-evaluation.js
@@ -0,0 +1,38 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/init-err-evaluation.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: Return abrupt completion evaluating the field initializer (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-fields-public, class]
+flags: [generated]
+info: |
+ [[Construct]] ( argumentsList, newTarget)
+
+ 8. If kind is "base", then
+ a. Perform OrdinaryCallBindThis(F, calleeContext, thisArgument).
+ b. Let result be InitializeInstanceFields(thisArgument, F).
+ ...
+ ...
+ 11. Let result be OrdinaryCallEvaluateBody(F, argumentsList).
+ ...
+
+---*/
+var x = 0;
+function fn1() { x += 1; }
+function fn2() { throw new Test262Error(); }
+
+
+class C {
+ x = fn1();
+ y = fn2();
+ z = fn1();
+}
+
+assert.throws(Test262Error, function() {
+ new C();
+});
+
+assert.sameValue(x, 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/init-value-defined-after-class.js b/js/src/tests/test262/language/statements/class/elements/init-value-defined-after-class.js
new file mode 100644
index 0000000000..d5e0029d15
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/init-value-defined-after-class.js
@@ -0,0 +1,50 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/init-value-defined-after-class.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: The initializer value is defined after the class evaluation (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-fields-public, computed-property-names, class]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ [[Construct]] ( argumentsList, newTarget)
+
+ 8. If kind is "base", then
+ a. Perform OrdinaryCallBindThis(F, calleeContext, thisArgument).
+ b. Let result be InitializeInstanceFields(thisArgument, F).
+ ...
+ ...
+ 11. Let result be OrdinaryCallEvaluateBody(F, argumentsList).
+ ...
+
+---*/
+var x = false;
+
+
+class C {
+ [x] = x;
+}
+
+var c1 = new C();
+
+x = true;
+var c2 = new C();
+
+verifyProperty(c1, "false", {
+ value: false,
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+verifyProperty(c2, "false", {
+ value: true,
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c1.hasOwnProperty("true"), false);
+assert.sameValue(c2.hasOwnProperty("true"), false);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/init-value-incremental.js b/js/src/tests/test262/language/statements/class/elements/init-value-incremental.js
new file mode 100644
index 0000000000..6fd18c1f7a
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/init-value-incremental.js
@@ -0,0 +1,70 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/init-value-incremental.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: The initializer value is defined during the class instatiation (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-fields-public, computed-property-names, class]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ Runtime Semantics: ClassDefinitionEvaluation
+
+ 27. For each ClassElement e in order from elements
+ ...
+ d. Append to fieldRecords the elements of fields.
+ ...
+ 33. Let result be InitializeStaticFields(F).
+ ...
+
+ [[Construct]] ( argumentsList, newTarget)
+
+ 8. If kind is "base", then
+ a. Perform OrdinaryCallBindThis(F, calleeContext, thisArgument).
+ b. Let result be InitializeInstanceFields(thisArgument, F).
+ ...
+ ...
+ 11. Let result be OrdinaryCallEvaluateBody(F, argumentsList).
+ ...
+
+---*/
+var x = 1;
+
+
+class C {
+ [x++] = x++;
+ [x++] = x++;
+}
+
+var c1 = new C();
+var c2 = new C();
+
+verifyProperty(c1, "1", {
+ value: 3,
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+verifyProperty(c1, "2", {
+ value: 4,
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+verifyProperty(c2, "1", {
+ value: 5,
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+verifyProperty(c2, "2", {
+ value: 6,
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/intercalated-static-non-static-computed-fields.js b/js/src/tests/test262/language/statements/class/elements/intercalated-static-non-static-computed-fields.js
new file mode 100644
index 0000000000..5cd4ef79f2
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/intercalated-static-non-static-computed-fields.js
@@ -0,0 +1,78 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/intercalated-static-non-static-computed-fields.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: Computed class fields are executed in the order they are delcared, regardless it is static or instance field (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-static-fields-public, class-fields-public, class]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassTail : ClassHeritage { ClassBody }
+ ...
+ 28. For each ClassElement e in order from elements,
+ a. If IsStatic of e is false, then
+ i. Let field be the result of performing ClassElementEvaluation for e with arguments proto and false.
+ b. Else,
+ i. Let field be the result of performing PropertyDefinitionEvaluation for mClassElementEvaluation for e with arguments F and false.
+ c. If field is an abrupt completion, then
+ ...
+ d. If field is not empty,
+ i. If IsStatic of e is false, append field to instanceFields.
+ ii. Otherwise, append field to staticFields.
+ ...
+ 34. For each item fieldRecord in order from staticFields,
+ a. Perform ? DefineField(F, field).
+ ...
+
+ [[Construct]] (argumentsList, newTarget)
+ ...
+ 8. If kind is "base", then
+ a. Perform OrdinaryCallBindThis(F, calleeContext, thisArgument).
+ b. Let result be InitializeInstanceFields(thisArgument, F).
+ c. If result is an abrupt completion, then
+ i. Remove calleeContext from execution context stack and restore callerContext as the running execution context.
+ ii. Return Completion(result).
+
+---*/
+
+let i = 0;
+
+
+class C {
+ [i++] = i++;
+ static [i++] = i++;
+ [i++] = i++;
+}
+
+let c = new C();
+
+// It is important to notice that static field initializer will run before any instance initializer
+verifyProperty(c, "0", {
+ value: 4,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+verifyProperty(c, "2", {
+ value: 5,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+verifyProperty(C, "1", {
+ value: 3,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert.sameValue(i, 6);
+assert.sameValue(c.hasOwnProperty('1'), false);
+assert.sameValue(C.hasOwnProperty('0'), false);
+assert.sameValue(C.hasOwnProperty('2'), false);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/literal-name-init-err-contains-arguments.js b/js/src/tests/test262/language/statements/class/elements/literal-name-init-err-contains-arguments.js
new file mode 100644
index 0000000000..39a2bd81fa
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/literal-name-init-err-contains-arguments.js
@@ -0,0 +1,35 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/init-err-contains-arguments.case
+// - src/class-elements/initializer-error/cls-decl-fields-literal-name.template
+/*---
+description: Syntax error if `arguments` used in class field (literal ClassElementName)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-public]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ FieldDefinition:
+ PropertyNameInitializeropt
+
+ - It is a Syntax Error if ContainsArguments of Initializer is true.
+
+ Static Semantics: ContainsArguments
+ IdentifierReference : Identifier
+
+ 1. If the StringValue of Identifier is "arguments", return true.
+ ...
+ For all other grammatical productions, recurse on all nonterminals. If any piece returns true, then return true. Otherwise return false.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ x = arguments;
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/literal-name-init-err-contains-super.js b/js/src/tests/test262/language/statements/class/elements/literal-name-init-err-contains-super.js
new file mode 100644
index 0000000000..a44c5fbb79
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/literal-name-init-err-contains-super.js
@@ -0,0 +1,28 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/init-err-contains-super.case
+// - src/class-elements/initializer-error/cls-decl-fields-literal-name.template
+/*---
+description: Syntax error if `super()` used in class field (literal ClassElementName)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-public]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ FieldDefinition:
+ PropertyNameInitializeropt
+
+ - It is a Syntax Error if Initializer is present and Initializer Contains SuperCall is true.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ x = super();
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/multiple-definitions-computed-names.js b/js/src/tests/test262/language/statements/class/elements/multiple-definitions-computed-names.js
new file mode 100644
index 0000000000..860928b3e2
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/multiple-definitions-computed-names.js
@@ -0,0 +1,158 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/computed-names.case
+// - src/class-elements/productions/cls-decl-multiple-definitions.template
+/*---
+description: Computed property names (multiple fields definitions)
+esid: prod-FieldDefinition
+features: [class-fields-public, computed-property-names, class]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement:
+ ...
+ FieldDefinition ;
+
+ FieldDefinition:
+ ClassElementName Initializer_opt
+
+ ClassElementName:
+ PropertyName
+
+---*/
+var x = "b";
+
+
+
+class C {
+ foo = "foobar";
+ m() { return 42 }
+ [x] = 42; [10] = "meep"; ["not initialized"]
+ m2() { return 39 }
+ bar = "barbaz";
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.m2(), 39);
+assert(!
+ Object.prototype.hasOwnProperty.call(c, "m2"),
+ "m2 doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m2, C.prototype.m2);
+
+verifyProperty(C.prototype, "m2", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.foo, "foobar");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "foo"),
+ "foo doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "foo"),
+ "foo doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "foo", {
+ value: "foobar",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.bar, "barbaz");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "bar"),
+ "bar doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "bar"),
+ "bar doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "bar", {
+ value: "barbaz",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "b"),
+ "b doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "b"),
+ "b doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "b", {
+ value: 42,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "x"),
+ "x doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "x"),
+ "x doesn't appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "x"),
+ "x doesn't appear as an own property on C instance"
+);
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "10"),
+ "10 doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "10"),
+ "10 doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "10", {
+ value: "meep",
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "not initialized"),
+ "'not initialized' doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "not initialized"),
+ "'not initialized' doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "not initialized", {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/multiple-definitions-computed-symbol-names.js b/js/src/tests/test262/language/statements/class/elements/multiple-definitions-computed-symbol-names.js
new file mode 100644
index 0000000000..fe31aada9d
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/multiple-definitions-computed-symbol-names.js
@@ -0,0 +1,156 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/computed-symbol-names.case
+// - src/class-elements/productions/cls-decl-multiple-definitions.template
+/*---
+description: Computed property symbol names (multiple fields definitions)
+esid: prod-FieldDefinition
+features: [class-fields-public, Symbol, computed-property-names, class]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement:
+ ...
+ FieldDefinition ;
+
+ FieldDefinition:
+ ClassElementName Initializer_opt
+
+ ClassElementName:
+ PropertyName
+
+---*/
+var x = Symbol();
+var y = Symbol();
+
+
+
+class C {
+ foo = "foobar";
+ m() { return 42 }
+ [x]; [y] = 42
+ m2() { return 39 }
+ bar = "barbaz";
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.m2(), 39);
+assert(!
+ Object.prototype.hasOwnProperty.call(c, "m2"),
+ "m2 doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m2, C.prototype.m2);
+
+verifyProperty(C.prototype, "m2", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.foo, "foobar");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "foo"),
+ "foo doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "foo"),
+ "foo doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "foo", {
+ value: "foobar",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.bar, "barbaz");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "bar"),
+ "bar doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "bar"),
+ "bar doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "bar", {
+ value: "barbaz",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, x),
+ "Symbol x doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, x),
+ "Symbol x doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, x, {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, y),
+ "Symbol y doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, y),
+ "Symbol y doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, y, {
+ value: 42,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "x"),
+ "x doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "x"),
+ "x doesn't appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "x"),
+ "x doesn't appear as an own property on C instance"
+);
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "y"),
+ "y doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "y"),
+ "y doesn't appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "y"),
+ "y doesn't appear as an own property on C instance"
+);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/multiple-definitions-grammar-privatename-identifier-semantics-stringvalue.js b/js/src/tests/test262/language/statements/class/elements/multiple-definitions-grammar-privatename-identifier-semantics-stringvalue.js
new file mode 100644
index 0000000000..d014f636f4
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/multiple-definitions-grammar-privatename-identifier-semantics-stringvalue.js
@@ -0,0 +1,160 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-privatename-identifier-semantics-stringvalue.case
+// - src/class-elements/productions/cls-decl-multiple-definitions.template
+/*---
+description: PrivateName Static Semantics, StringValue (multiple fields definitions)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+
+ 1. Return the String value consisting of the sequence of code
+ units corresponding to PrivateName. In determining the sequence
+ any occurrences of \ UnicodeEscapeSequence are first replaced
+ with the code point represented by the UnicodeEscapeSequence
+ and then the code points of the entire PrivateName are converted
+ to code units by UTF16Encoding (10.1.1) each code point.
+
+---*/
+
+
+class C {
+ foo = "foobar";
+ m() { return 42 }
+ #\u{6F};
+ #\u2118;
+ #ZW_\u200C_NJ;
+ #ZW_\u200D_J;
+ m2() { return 39 }
+ bar = "barbaz";
+ o(value) {
+ this.#o = value;
+ return this.#o;
+ }
+ ℘(value) {
+ this.#℘ = value;
+ return this.#℘;
+ }
+ ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS METHOD
+ this.#ZW_‌_NJ = value;
+ return this.#ZW_‌_NJ;
+ }
+ ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS METHOD
+ this.#ZW_‍_J = value;
+ return this.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.m2(), 39);
+assert(!
+ Object.prototype.hasOwnProperty.call(c, "m2"),
+ "m2 doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m2, C.prototype.m2);
+
+verifyProperty(C.prototype, "m2", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.foo, "foobar");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "foo"),
+ "foo doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "foo"),
+ "foo doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "foo", {
+ value: "foobar",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.bar, "barbaz");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "bar"),
+ "bar doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "bar"),
+ "bar doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "bar", {
+ value: "barbaz",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.o(1), 1);
+assert.sameValue(c.℘(1), 1);
+assert.sameValue(c.ZW_‌_NJ(1), 1);
+assert.sameValue(c.ZW_‍_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/multiple-definitions-literal-names-asi.js b/js/src/tests/test262/language/statements/class/elements/multiple-definitions-literal-names-asi.js
new file mode 100644
index 0000000000..8ed80fdd78
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/multiple-definitions-literal-names-asi.js
@@ -0,0 +1,128 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/literal-names-asi.case
+// - src/class-elements/productions/cls-decl-multiple-definitions.template
+/*---
+description: Literal property names with ASI (multiple fields definitions)
+esid: prod-FieldDefinition
+features: [class-fields-public, class]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement:
+ ...
+ FieldDefinition ;
+
+ FieldDefinition:
+ ClassElementName Initializer_opt
+
+ ClassElementName:
+ PropertyName
+
+---*/
+
+
+class C {
+ foo = "foobar";
+ m() { return 42 }
+ a
+ b = 42;
+ m2() { return 39 }
+ bar = "barbaz";
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.m2(), 39);
+assert(!
+ Object.prototype.hasOwnProperty.call(c, "m2"),
+ "m2 doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m2, C.prototype.m2);
+
+verifyProperty(C.prototype, "m2", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.foo, "foobar");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "foo"),
+ "foo doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "foo"),
+ "foo doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "foo", {
+ value: "foobar",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.bar, "barbaz");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "bar"),
+ "bar doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "bar"),
+ "bar doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "bar", {
+ value: "barbaz",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "a"),
+ "a doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "a"),
+ "a doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "a", {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "b"),
+ "b doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "b"),
+ "b doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "b", {
+ value: 42,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/multiple-definitions-literal-names.js b/js/src/tests/test262/language/statements/class/elements/multiple-definitions-literal-names.js
new file mode 100644
index 0000000000..052d34112d
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/multiple-definitions-literal-names.js
@@ -0,0 +1,147 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/literal-names.case
+// - src/class-elements/productions/cls-decl-multiple-definitions.template
+/*---
+description: Literal property names (multiple fields definitions)
+esid: prod-FieldDefinition
+features: [class-fields-public, class]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement:
+ ...
+ FieldDefinition ;
+
+ FieldDefinition:
+ ClassElementName Initializer_opt
+
+ ClassElementName:
+ PropertyName
+
+---*/
+const fn = function() {}
+
+
+
+class C {
+ foo = "foobar";
+ m() { return 42 }
+ a; b = 42;
+ c = fn
+ m2() { return 39 }
+ bar = "barbaz";
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.m2(), 39);
+assert(!
+ Object.prototype.hasOwnProperty.call(c, "m2"),
+ "m2 doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m2, C.prototype.m2);
+
+verifyProperty(C.prototype, "m2", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.foo, "foobar");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "foo"),
+ "foo doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "foo"),
+ "foo doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "foo", {
+ value: "foobar",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.bar, "barbaz");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "bar"),
+ "bar doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "bar"),
+ "bar doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "bar", {
+ value: "barbaz",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "a"),
+ "a doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "a"),
+ "a doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "a", {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "b"),
+ "b doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "b"),
+ "b doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "b", {
+ value: 42,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "c"),
+ "c doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "c"),
+ "c doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "c", {
+ value: fn,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/multiple-definitions-private-field-usage.js b/js/src/tests/test262/language/statements/class/elements/multiple-definitions-private-field-usage.js
new file mode 100644
index 0000000000..66093b3c15
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/multiple-definitions-private-field-usage.js
@@ -0,0 +1,100 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-field-usage.case
+// - src/class-elements/productions/cls-decl-multiple-definitions.template
+/*---
+description: PrivateName CallExpression usage (private field) (multiple fields definitions)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ Updated Productions
+
+ CallExpression[Yield, Await]:
+ CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+ SuperCall[?Yield, ?Await]
+ CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+ CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+ CallExpression[?Yield, ?Await].IdentifierName
+ CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+ CallExpression[?Yield, ?Await].PrivateName
+
+---*/
+
+
+class C {
+ foo = "foobar";
+ m() { return 42 }
+ #m = 'test262';
+ m2() { return 39 }
+ bar = "barbaz";
+ method() {
+ return this.#m;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.m2(), 39);
+assert(!
+ Object.prototype.hasOwnProperty.call(c, "m2"),
+ "m2 doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m2, C.prototype.m2);
+
+verifyProperty(C.prototype, "m2", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.foo, "foobar");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "foo"),
+ "foo doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "foo"),
+ "foo doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "foo", {
+ value: "foobar",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.bar, "barbaz");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "bar"),
+ "bar doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "bar"),
+ "bar doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "bar", {
+ value: "barbaz",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.method(), 'test262');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/multiple-definitions-private-method-getter-usage.js b/js/src/tests/test262/language/statements/class/elements/multiple-definitions-private-method-getter-usage.js
new file mode 100644
index 0000000000..b750b761cf
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/multiple-definitions-private-method-getter-usage.js
@@ -0,0 +1,100 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-method-getter-usage.case
+// - src/class-elements/productions/cls-decl-multiple-definitions.template
+/*---
+description: PrivateName CallExpression usage (Accesor get method) (multiple fields definitions)
+esid: prod-FieldDefinition
+features: [class-methods-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ Updated Productions
+
+ CallExpression[Yield, Await]:
+ CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+ SuperCall[?Yield, ?Await]
+ CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+ CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+ CallExpression[?Yield, ?Await].IdentifierName
+ CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+ CallExpression[?Yield, ?Await].PrivateName
+
+---*/
+
+
+class C {
+ foo = "foobar";
+ m() { return 42 }
+ get #m() { return 'test262'; }
+ m2() { return 39 }
+ bar = "barbaz";
+ method() {
+ return this.#m;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.m2(), 39);
+assert(!
+ Object.prototype.hasOwnProperty.call(c, "m2"),
+ "m2 doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m2, C.prototype.m2);
+
+verifyProperty(C.prototype, "m2", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.foo, "foobar");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "foo"),
+ "foo doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "foo"),
+ "foo doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "foo", {
+ value: "foobar",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.bar, "barbaz");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "bar"),
+ "bar doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "bar"),
+ "bar doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "bar", {
+ value: "barbaz",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.method(), 'test262');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/multiple-definitions-private-method-usage.js b/js/src/tests/test262/language/statements/class/elements/multiple-definitions-private-method-usage.js
new file mode 100644
index 0000000000..b4818b335d
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/multiple-definitions-private-method-usage.js
@@ -0,0 +1,100 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-method-usage.case
+// - src/class-elements/productions/cls-decl-multiple-definitions.template
+/*---
+description: PrivateName CallExpression usage (private method) (multiple fields definitions)
+esid: prod-FieldDefinition
+features: [class-methods-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ Updated Productions
+
+ CallExpression[Yield, Await]:
+ CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+ SuperCall[?Yield, ?Await]
+ CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+ CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+ CallExpression[?Yield, ?Await].IdentifierName
+ CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+ CallExpression[?Yield, ?Await].PrivateName
+
+---*/
+
+
+class C {
+ foo = "foobar";
+ m() { return 42 }
+ #m() { return 'test262'; }
+ m2() { return 39 }
+ bar = "barbaz";
+ method() {
+ return this.#m();
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.m2(), 39);
+assert(!
+ Object.prototype.hasOwnProperty.call(c, "m2"),
+ "m2 doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m2, C.prototype.m2);
+
+verifyProperty(C.prototype, "m2", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.foo, "foobar");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "foo"),
+ "foo doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "foo"),
+ "foo doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "foo", {
+ value: "foobar",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.bar, "barbaz");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "bar"),
+ "bar doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "bar"),
+ "bar doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "bar", {
+ value: "barbaz",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.method(), 'test262');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/multiple-definitions-private-names.js b/js/src/tests/test262/language/statements/class/elements/multiple-definitions-private-names.js
new file mode 100644
index 0000000000..a369a26e8f
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/multiple-definitions-private-names.js
@@ -0,0 +1,122 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-names.case
+// - src/class-elements/productions/cls-decl-multiple-definitions.template
+/*---
+description: private names (multiple fields definitions)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ FieldDefinition ;
+
+ FieldDefinition :
+ ClassElementName Initializer_opt
+
+ ClassElementName :
+ PrivateName
+
+ PrivateName :
+ # IdentifierName
+
+---*/
+
+
+class C {
+ foo = "foobar";
+ m() { return 42 }
+ #x; #y
+ m2() { return 39 }
+ bar = "barbaz";
+ x() {
+ this.#x = 42;
+ return this.#x;
+ }
+ y() {
+ this.#y = 43;
+ return this.#y;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.m2(), 39);
+assert(!
+ Object.prototype.hasOwnProperty.call(c, "m2"),
+ "m2 doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m2, C.prototype.m2);
+
+verifyProperty(C.prototype, "m2", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.foo, "foobar");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "foo"),
+ "foo doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "foo"),
+ "foo doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "foo", {
+ value: "foobar",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.bar, "barbaz");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "bar"),
+ "bar doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "bar"),
+ "bar doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "bar", {
+ value: "barbaz",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+// Test the private fields do not appear as properties before set to value
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#x"), "test 1");
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 2");
+assert(!Object.prototype.hasOwnProperty.call(c, "#x"), "test 3");
+
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#y"), "test 4");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 5");
+assert(!Object.prototype.hasOwnProperty.call(c, "#y"), "test 6");
+
+// Test if private fields can be sucessfully accessed and set to value
+assert.sameValue(c.x(), 42, "test 7");
+assert.sameValue(c.y(), 43, "test 8");
+
+// Test the private fields do not appear as properties before after set to value
+assert(!Object.prototype.hasOwnProperty.call(c, "#x"), "test 9");
+assert(!Object.prototype.hasOwnProperty.call(c, "#y"), "test 10");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-field-identifier-initializer.js b/js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-field-identifier-initializer.js
new file mode 100644
index 0000000000..6cb971c04a
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-field-identifier-initializer.js
@@ -0,0 +1,138 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-field-identifier-initializer.case
+// - src/class-elements/productions/cls-decl-multiple-definitions.template
+/*---
+description: Valid FieldDefinition (multiple fields definitions)
+esid: prod-FieldDefinition
+features: [class-fields-public, class]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+
+ PropertyName :
+ LiteralPropertyName
+ ComputedPropertyName
+
+ LiteralPropertyName :
+ IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ foo = "foobar";
+ m() { return 42 }
+ $ = 1; _ = 1; \u{6F} = 1; \u2118 = 1; ZW_\u200C_NJ = 1; ZW_\u200D_J = 1
+ m2() { return 39 }
+ bar = "barbaz";
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.m2(), 39);
+assert(!
+ Object.prototype.hasOwnProperty.call(c, "m2"),
+ "m2 doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m2, C.prototype.m2);
+
+verifyProperty(C.prototype, "m2", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.foo, "foobar");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "foo"),
+ "foo doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "foo"),
+ "foo doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "foo", {
+ value: "foobar",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.bar, "barbaz");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "bar"),
+ "bar doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "bar"),
+ "bar doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "bar", {
+ value: "barbaz",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$, 1);
+assert.sameValue(c._, 1);
+assert.sameValue(c.\u{6F}, 1);
+assert.sameValue(c.\u2118, 1);
+assert.sameValue(c.ZW_\u200C_NJ, 1);
+assert.sameValue(c.ZW_\u200D_J, 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-field-identifier.js b/js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-field-identifier.js
new file mode 100644
index 0000000000..a239133820
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-field-identifier.js
@@ -0,0 +1,145 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-field-identifier.case
+// - src/class-elements/productions/cls-decl-multiple-definitions.template
+/*---
+description: Valid FieldDefinition (multiple fields definitions)
+esid: prod-FieldDefinition
+features: [class-fields-public, class]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+
+ PropertyName :
+ LiteralPropertyName
+ ComputedPropertyName
+
+ LiteralPropertyName :
+ IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ foo = "foobar";
+ m() { return 42 }
+ $; _; \u{6F}; \u2118; ZW_\u200C_NJ; ZW_\u200D_J
+ m2() { return 39 }
+ bar = "barbaz";
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.m2(), 39);
+assert(!
+ Object.prototype.hasOwnProperty.call(c, "m2"),
+ "m2 doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m2, C.prototype.m2);
+
+verifyProperty(C.prototype, "m2", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.foo, "foobar");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "foo"),
+ "foo doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "foo"),
+ "foo doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "foo", {
+ value: "foobar",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.bar, "barbaz");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "bar"),
+ "bar doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "bar"),
+ "bar doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "bar", {
+ value: "barbaz",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+c.$ = 1;
+c._ = 1;
+c.\u{6F} = 1;
+c.\u2118 = 1;
+c.ZW_\u200C_NJ = 1;
+c.ZW_\u200D_J = 1;
+
+assert.sameValue(c.$, 1);
+assert.sameValue(c._, 1);
+assert.sameValue(c.\u{6F}, 1);
+assert.sameValue(c.\u2118, 1);
+assert.sameValue(c.ZW_\u200C_NJ, 1);
+assert.sameValue(c.ZW_\u200D_J, 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-private-getter-alt.js b/js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-private-getter-alt.js
new file mode 100644
index 0000000000..3a346bad69
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-private-getter-alt.js
@@ -0,0 +1,179 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-getter-alt.case
+// - src/class-elements/productions/cls-decl-multiple-definitions.template
+/*---
+description: Valid PrivateName as private getter (multiple fields definitions)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ...
+ get ClassElementName ( ){ FunctionBody }
+ ...
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ foo = "foobar";
+ m() { return 42 }
+ #$_; #__; #\u{6F}_; #℘_; #ZW_‌_NJ_; #ZW_‍_J_;
+ get #$() {
+ return this.#$_;
+ }
+ get #_() {
+ return this.#__;
+ }
+ get #\u{6F}() {
+ return this.#\u{6F}_;
+ }
+ get #℘() {
+ return this.#℘_;
+ }
+ get #ZW_‌_NJ() {
+ return this.#ZW_‌_NJ_;
+ }
+ get #ZW_‍_J() {
+ return this.#ZW_‍_J_;
+ }
+
+ m2() { return 39 }
+ bar = "barbaz";
+ $(value) {
+ this.#$_ = value;
+ return this.#$;
+ }
+ _(value) {
+ this.#__ = value;
+ return this.#_;
+ }
+ \u{6F}(value) {
+ this.#\u{6F}_ = value;
+ return this.#\u{6F};
+ }
+ ℘(value) {
+ this.#℘_ = value;
+ return this.#℘;
+ }
+ ZW_‌_NJ(value) {
+ this.#ZW_‌_NJ_ = value;
+ return this.#ZW_‌_NJ;
+ }
+ ZW_‍_J(value) {
+ this.#ZW_‍_J_ = value;
+ return this.#ZW_‍_J;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.m2(), 39);
+assert(!
+ Object.prototype.hasOwnProperty.call(c, "m2"),
+ "m2 doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m2, C.prototype.m2);
+
+verifyProperty(C.prototype, "m2", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.foo, "foobar");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "foo"),
+ "foo doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "foo"),
+ "foo doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "foo", {
+ value: "foobar",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.bar, "barbaz");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "bar"),
+ "bar doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "bar"),
+ "bar doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "bar", {
+ value: "barbaz",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.℘(1), 1);
+assert.sameValue(c.ZW_‌_NJ(1), 1);
+assert.sameValue(c.ZW_‍_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-private-getter.js b/js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-private-getter.js
new file mode 100644
index 0000000000..7825d5d35d
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-private-getter.js
@@ -0,0 +1,179 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-getter.case
+// - src/class-elements/productions/cls-decl-multiple-definitions.template
+/*---
+description: Valid PrivateName as private getter (multiple fields definitions)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ...
+ get ClassElementName ( ){ FunctionBody }
+ ...
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ foo = "foobar";
+ m() { return 42 }
+ #$_; #__; #\u{6F}_; #\u2118_; #ZW_\u200C_NJ_; #ZW_\u200D_J_;
+ get #$() {
+ return this.#$_;
+ }
+ get #_() {
+ return this.#__;
+ }
+ get #\u{6F}() {
+ return this.#\u{6F}_;
+ }
+ get #\u2118() {
+ return this.#\u2118_;
+ }
+ get #ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ_;
+ }
+ get #ZW_\u200D_J() {
+ return this.#ZW_\u200D_J_;
+ }
+
+ m2() { return 39 }
+ bar = "barbaz";
+ $(value) {
+ this.#$_ = value;
+ return this.#$;
+ }
+ _(value) {
+ this.#__ = value;
+ return this.#_;
+ }
+ \u{6F}(value) {
+ this.#\u{6F}_ = value;
+ return this.#\u{6F};
+ }
+ \u2118(value) {
+ this.#\u2118_ = value;
+ return this.#\u2118;
+ }
+ ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ_ = value;
+ return this.#ZW_\u200C_NJ;
+ }
+ ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J_ = value;
+ return this.#ZW_\u200D_J;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.m2(), 39);
+assert(!
+ Object.prototype.hasOwnProperty.call(c, "m2"),
+ "m2 doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m2, C.prototype.m2);
+
+verifyProperty(C.prototype, "m2", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.foo, "foobar");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "foo"),
+ "foo doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "foo"),
+ "foo doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "foo", {
+ value: "foobar",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.bar, "barbaz");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "bar"),
+ "bar doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "bar"),
+ "bar doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "bar", {
+ value: "barbaz",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.\u2118(1), 1);
+assert.sameValue(c.ZW_\u200C_NJ(1), 1);
+assert.sameValue(c.ZW_\u200D_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-private-method-alt.js b/js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-private-method-alt.js
new file mode 100644
index 0000000000..424a19e2e1
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-private-method-alt.js
@@ -0,0 +1,178 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-method-alt.case
+// - src/class-elements/productions/cls-decl-multiple-definitions.template
+/*---
+description: Valid PrivateName as private method (multiple fields definitions)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ClassElementName ( UniqueFormalParameters ) { FunctionBody }
+ ...
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ foo = "foobar";
+ m() { return 42 }
+ #$_; #__; #\u{6F}_; #℘_; #ZW_‌_NJ_; #ZW_‍_J_;
+ #$() {
+ return this.#$_;
+ }
+ #_() {
+ return this.#__;
+ }
+ #\u{6F}() {
+ return this.#\u{6F}_;
+ }
+ #℘() {
+ return this.#℘_;
+ }
+ #ZW_‌_NJ() {
+ return this.#ZW_‌_NJ_;
+ }
+ #ZW_‍_J() {
+ return this.#ZW_‍_J_;
+ }
+
+ m2() { return 39 }
+ bar = "barbaz";
+ $(value) {
+ this.#$_ = value;
+ return this.#$();
+ }
+ _(value) {
+ this.#__ = value;
+ return this.#_();
+ }
+ \u{6F}(value) {
+ this.#\u{6F}_ = value;
+ return this.#\u{6F}();
+ }
+ ℘(value) {
+ this.#℘_ = value;
+ return this.#℘();
+ }
+ ZW_‌_NJ(value) {
+ this.#ZW_‌_NJ_ = value;
+ return this.#ZW_‌_NJ();
+ }
+ ZW_‍_J(value) {
+ this.#ZW_‍_J_ = value;
+ return this.#ZW_‍_J();
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.m2(), 39);
+assert(!
+ Object.prototype.hasOwnProperty.call(c, "m2"),
+ "m2 doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m2, C.prototype.m2);
+
+verifyProperty(C.prototype, "m2", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.foo, "foobar");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "foo"),
+ "foo doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "foo"),
+ "foo doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "foo", {
+ value: "foobar",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.bar, "barbaz");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "bar"),
+ "bar doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "bar"),
+ "bar doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "bar", {
+ value: "barbaz",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.℘(1), 1);
+assert.sameValue(c.ZW_‌_NJ(1), 1);
+assert.sameValue(c.ZW_‍_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-private-method.js b/js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-private-method.js
new file mode 100644
index 0000000000..e956a4dc94
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-private-method.js
@@ -0,0 +1,178 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-method.case
+// - src/class-elements/productions/cls-decl-multiple-definitions.template
+/*---
+description: Valid PrivateName as private method (multiple fields definitions)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ClassElementName ( UniqueFormalParameters ) { FunctionBody }
+ ...
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ foo = "foobar";
+ m() { return 42 }
+ #$_; #__; #\u{6F}_; #\u2118_; #ZW_\u200C_NJ_; #ZW_\u200D_J_;
+ #$() {
+ return this.#$_;
+ }
+ #_() {
+ return this.#__;
+ }
+ #\u{6F}() {
+ return this.#\u{6F}_;
+ }
+ #\u2118() {
+ return this.#\u2118_;
+ }
+ #ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ_;
+ }
+ #ZW_\u200D_J() {
+ return this.#ZW_\u200D_J_;
+ }
+
+ m2() { return 39 }
+ bar = "barbaz";
+ $(value) {
+ this.#$_ = value;
+ return this.#$();
+ }
+ _(value) {
+ this.#__ = value;
+ return this.#_();
+ }
+ \u{6F}(value) {
+ this.#\u{6F}_ = value;
+ return this.#\u{6F}();
+ }
+ \u2118(value) {
+ this.#\u2118_ = value;
+ return this.#\u2118();
+ }
+ ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ_ = value;
+ return this.#ZW_\u200C_NJ();
+ }
+ ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J_ = value;
+ return this.#ZW_\u200D_J();
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.m2(), 39);
+assert(!
+ Object.prototype.hasOwnProperty.call(c, "m2"),
+ "m2 doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m2, C.prototype.m2);
+
+verifyProperty(C.prototype, "m2", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.foo, "foobar");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "foo"),
+ "foo doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "foo"),
+ "foo doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "foo", {
+ value: "foobar",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.bar, "barbaz");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "bar"),
+ "bar doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "bar"),
+ "bar doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "bar", {
+ value: "barbaz",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.\u2118(1), 1);
+assert.sameValue(c.ZW_\u200C_NJ(1), 1);
+assert.sameValue(c.ZW_\u200D_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-private-setter-alt.js b/js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-private-setter-alt.js
new file mode 100644
index 0000000000..ec5b69c42d
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-private-setter-alt.js
@@ -0,0 +1,178 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-setter-alt.case
+// - src/class-elements/productions/cls-decl-multiple-definitions.template
+/*---
+description: Valid PrivateName as private setter (multiple fields definitions)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ...
+ set ClassElementName ( PropertySetParameterList ) { FunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ foo = "foobar";
+ m() { return 42 }
+ #$_; #__; #\u{6F}_; #℘_; #ZW_‌_NJ_; #ZW_‍_J_;
+ set #$(value) {
+ this.#$_ = value;
+ }
+ set #_(value) {
+ this.#__ = value;
+ }
+ set #\u{6F}(value) {
+ this.#\u{6F}_ = value;
+ }
+ set #℘(value) {
+ this.#℘_ = value;
+ }
+ set #ZW_‌_NJ(value) {
+ this.#ZW_‌_NJ_ = value;
+ }
+ set #ZW_‍_J(value) {
+ this.#ZW_‍_J_ = value;
+ }
+
+ m2() { return 39 }
+ bar = "barbaz";
+ $(value) {
+ this.#$ = value;
+ return this.#$_;
+ }
+ _(value) {
+ this.#_ = value;
+ return this.#__;
+ }
+ \u{6F}(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F}_;
+ }
+ ℘(value) {
+ this.#℘ = value;
+ return this.#℘_;
+ }
+ ZW_‌_NJ(value) {
+ this.#ZW_‌_NJ = value;
+ return this.#ZW_‌_NJ_;
+ }
+ ZW_‍_J(value) {
+ this.#ZW_‍_J = value;
+ return this.#ZW_‍_J_;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.m2(), 39);
+assert(!
+ Object.prototype.hasOwnProperty.call(c, "m2"),
+ "m2 doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m2, C.prototype.m2);
+
+verifyProperty(C.prototype, "m2", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.foo, "foobar");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "foo"),
+ "foo doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "foo"),
+ "foo doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "foo", {
+ value: "foobar",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.bar, "barbaz");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "bar"),
+ "bar doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "bar"),
+ "bar doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "bar", {
+ value: "barbaz",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.℘(1), 1);
+assert.sameValue(c.ZW_‌_NJ(1), 1);
+assert.sameValue(c.ZW_‍_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-private-setter.js b/js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-private-setter.js
new file mode 100644
index 0000000000..7d8736bd41
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-private-setter.js
@@ -0,0 +1,178 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-setter.case
+// - src/class-elements/productions/cls-decl-multiple-definitions.template
+/*---
+description: Valid PrivateName as private setter (multiple fields definitions)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ...
+ set ClassElementName ( PropertySetParameterList ) { FunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ foo = "foobar";
+ m() { return 42 }
+ #$_; #__; #\u{6F}_; #\u2118_; #ZW_\u200C_NJ_; #ZW_\u200D_J_;
+ set #$(value) {
+ this.#$_ = value;
+ }
+ set #_(value) {
+ this.#__ = value;
+ }
+ set #\u{6F}(value) {
+ this.#\u{6F}_ = value;
+ }
+ set #\u2118(value) {
+ this.#\u2118_ = value;
+ }
+ set #ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ_ = value;
+ }
+ set #ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J_ = value;
+ }
+
+ m2() { return 39 }
+ bar = "barbaz";
+ $(value) {
+ this.#$ = value;
+ return this.#$_;
+ }
+ _(value) {
+ this.#_ = value;
+ return this.#__;
+ }
+ \u{6F}(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F}_;
+ }
+ \u2118(value) {
+ this.#\u2118 = value;
+ return this.#\u2118_;
+ }
+ ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ = value;
+ return this.#ZW_\u200C_NJ_;
+ }
+ ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J = value;
+ return this.#ZW_\u200D_J_;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.m2(), 39);
+assert(!
+ Object.prototype.hasOwnProperty.call(c, "m2"),
+ "m2 doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m2, C.prototype.m2);
+
+verifyProperty(C.prototype, "m2", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.foo, "foobar");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "foo"),
+ "foo doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "foo"),
+ "foo doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "foo", {
+ value: "foobar",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.bar, "barbaz");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "bar"),
+ "bar doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "bar"),
+ "bar doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "bar", {
+ value: "barbaz",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.\u2118(1), 1);
+assert.sameValue(c.ZW_\u200C_NJ(1), 1);
+assert.sameValue(c.ZW_\u200D_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-privatename-identifier-alt.js
new file mode 100644
index 0000000000..62f2d55a44
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-privatename-identifier-alt.js
@@ -0,0 +1,160 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-multiple-definitions.template
+/*---
+description: Valid PrivateName (multiple fields definitions)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ foo = "foobar";
+ m() { return 42 }
+ #$; #_; #\u{6F}; #℘; #ZW_‌_NJ; #ZW_‍_J
+ m2() { return 39 }
+ bar = "barbaz";
+ $(value) {
+ this.#$ = value;
+ return this.#$;
+ }
+ _(value) {
+ this.#_ = value;
+ return this.#_;
+ }
+ \u{6F}(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F};
+ }
+ ℘(value) {
+ this.#℘ = value;
+ return this.#℘;
+ }
+ ZW_‌_NJ(value) {
+ this.#ZW_‌_NJ = value;
+ return this.#ZW_‌_NJ;
+ }
+ ZW_‍_J(value) {
+ this.#ZW_‍_J = value;
+ return this.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.m2(), 39);
+assert(!
+ Object.prototype.hasOwnProperty.call(c, "m2"),
+ "m2 doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m2, C.prototype.m2);
+
+verifyProperty(C.prototype, "m2", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.foo, "foobar");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "foo"),
+ "foo doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "foo"),
+ "foo doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "foo", {
+ value: "foobar",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.bar, "barbaz");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "bar"),
+ "bar doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "bar"),
+ "bar doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "bar", {
+ value: "barbaz",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.℘(1), 1);
+assert.sameValue(c.ZW_‌_NJ(1), 1);
+assert.sameValue(c.ZW_‍_J(1), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-privatename-identifier-initializer-alt.js b/js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-privatename-identifier-initializer-alt.js
new file mode 100644
index 0000000000..984a087064
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-privatename-identifier-initializer-alt.js
@@ -0,0 +1,154 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-privatename-identifier-initializer-alt.case
+// - src/class-elements/productions/cls-decl-multiple-definitions.template
+/*---
+description: Valid PrivateName (multiple fields definitions)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ foo = "foobar";
+ m() { return 42 }
+ #$ = 1; #_ = 1; #\u{6F} = 1; #℘ = 1; #ZW_‌_NJ = 1; #ZW_‍_J = 1
+ m2() { return 39 }
+ bar = "barbaz";
+ $() {
+ return this.#$;
+ }
+ _() {
+ return this.#_;
+ }
+ \u{6F}() {
+ return this.#\u{6F};
+ }
+ ℘() {
+ return this.#℘;
+ }
+ ZW_‌_NJ() {
+ return this.#ZW_‌_NJ;
+ }
+ ZW_‍_J() {
+ return this.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.m2(), 39);
+assert(!
+ Object.prototype.hasOwnProperty.call(c, "m2"),
+ "m2 doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m2, C.prototype.m2);
+
+verifyProperty(C.prototype, "m2", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.foo, "foobar");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "foo"),
+ "foo doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "foo"),
+ "foo doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "foo", {
+ value: "foobar",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.bar, "barbaz");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "bar"),
+ "bar doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "bar"),
+ "bar doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "bar", {
+ value: "barbaz",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(), 1);
+assert.sameValue(c._(), 1);
+assert.sameValue(c.\u{6F}(), 1);
+assert.sameValue(c.℘(), 1);
+assert.sameValue(c.ZW_‌_NJ(), 1);
+assert.sameValue(c.ZW_‍_J(), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-privatename-identifier-initializer.js b/js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-privatename-identifier-initializer.js
new file mode 100644
index 0000000000..ae13ceac12
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-privatename-identifier-initializer.js
@@ -0,0 +1,154 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-privatename-identifier-initializer.case
+// - src/class-elements/productions/cls-decl-multiple-definitions.template
+/*---
+description: Valid PrivateName (multiple fields definitions)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ foo = "foobar";
+ m() { return 42 }
+ #$ = 1; #_ = 1; #\u{6F} = 1; #\u2118 = 1; #ZW_\u200C_NJ = 1; #ZW_\u200D_J = 1
+ m2() { return 39 }
+ bar = "barbaz";
+ $() {
+ return this.#$;
+ }
+ _() {
+ return this.#_;
+ }
+ \u{6F}() {
+ return this.#\u{6F};
+ }
+ \u2118() {
+ return this.#\u2118;
+ }
+ ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ;
+ }
+ ZW_\u200D_J() {
+ return this.#ZW_\u200D_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.m2(), 39);
+assert(!
+ Object.prototype.hasOwnProperty.call(c, "m2"),
+ "m2 doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m2, C.prototype.m2);
+
+verifyProperty(C.prototype, "m2", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.foo, "foobar");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "foo"),
+ "foo doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "foo"),
+ "foo doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "foo", {
+ value: "foobar",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.bar, "barbaz");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "bar"),
+ "bar doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "bar"),
+ "bar doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "bar", {
+ value: "barbaz",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(), 1);
+assert.sameValue(c._(), 1);
+assert.sameValue(c.\u{6F}(), 1);
+assert.sameValue(c.\u2118(), 1);
+assert.sameValue(c.ZW_\u200C_NJ(), 1);
+assert.sameValue(c.ZW_\u200D_J(), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-privatename-identifier.js
new file mode 100644
index 0000000000..745f56f68d
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-privatename-identifier.js
@@ -0,0 +1,160 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-multiple-definitions.template
+/*---
+description: Valid PrivateName (multiple fields definitions)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ foo = "foobar";
+ m() { return 42 }
+ #$; #_; #\u{6F}; #\u2118; #ZW_\u200C_NJ; #ZW_\u200D_J
+ m2() { return 39 }
+ bar = "barbaz";
+ $(value) {
+ this.#$ = value;
+ return this.#$;
+ }
+ _(value) {
+ this.#_ = value;
+ return this.#_;
+ }
+ \u{6F}(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F};
+ }
+ \u2118(value) {
+ this.#\u2118 = value;
+ return this.#\u2118;
+ }
+ ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ = value;
+ return this.#ZW_\u200C_NJ;
+ }
+ ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J = value;
+ return this.#ZW_\u200D_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.m2(), 39);
+assert(!
+ Object.prototype.hasOwnProperty.call(c, "m2"),
+ "m2 doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m2, C.prototype.m2);
+
+verifyProperty(C.prototype, "m2", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.foo, "foobar");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "foo"),
+ "foo doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "foo"),
+ "foo doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "foo", {
+ value: "foobar",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.bar, "barbaz");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "bar"),
+ "bar doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "bar"),
+ "bar doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "bar", {
+ value: "barbaz",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.\u2118(1), 1);
+assert.sameValue(c.ZW_\u200C_NJ(1), 1);
+assert.sameValue(c.ZW_\u200D_J(1), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-static-async-generator-method-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-static-async-generator-method-privatename-identifier-alt.js
new file mode 100644
index 0000000000..aa20ede391
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-static-async-generator-method-privatename-identifier-alt.js
@@ -0,0 +1,185 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-async-generator-method-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-multiple-definitions.template
+/*---
+description: Valid Static AsyncGeneratorMethod PrivateName (multiple fields definitions)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ foo = "foobar";
+ m() { return 42 }
+ static async * #$(value) {
+ yield * await value;
+ }
+ static async * #_(value) {
+ yield * await value;
+ }
+ static async * #o(value) {
+ yield * await value;
+ }
+ static async * #℘(value) {
+ yield * await value;
+ }
+ static async * #ZW_‌_NJ(value) {
+ yield * await value;
+ }
+ static async * #ZW_‍_J(value) {
+ yield * await value;
+ }
+ m2() { return 39 }
+ bar = "barbaz";
+ static get $() {
+ return this.#$;
+ }
+ static get _() {
+ return this.#_;
+ }
+ static get o() {
+ return this.#o;
+ }
+ static get ℘() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#℘;
+ }
+ static get ZW_‌_NJ() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‌_NJ;
+ }
+ static get ZW_‍_J() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‍_J;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.m2(), 39);
+assert(!
+ Object.prototype.hasOwnProperty.call(c, "m2"),
+ "m2 doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m2, C.prototype.m2);
+
+verifyProperty(C.prototype, "m2", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.foo, "foobar");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "foo"),
+ "foo doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "foo"),
+ "foo doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "foo", {
+ value: "foobar",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.bar, "barbaz");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "bar"),
+ "bar doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "bar"),
+ "bar doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "bar", {
+ value: "barbaz",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+Promise.all([
+ C.$([1]).next(),
+ C._([1]).next(),
+ C.o([1]).next(),
+ C.℘([1]).next(), // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.ZW_‌_NJ([1]).next(), // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.ZW_‍_J([1]).next(), // DO NOT CHANGE THE NAME OF THIS FIELD
+]).then(results => {
+
+ assert.sameValue(results[0].value, 1);
+ assert.sameValue(results[1].value, 1);
+ assert.sameValue(results[2].value, 1);
+ assert.sameValue(results[3].value, 1);
+ assert.sameValue(results[4].value, 1);
+ assert.sameValue(results[5].value, 1);
+
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-static-async-generator-method-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-static-async-generator-method-privatename-identifier.js
new file mode 100644
index 0000000000..b627bf9127
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-static-async-generator-method-privatename-identifier.js
@@ -0,0 +1,186 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-async-generator-method-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-multiple-definitions.template
+/*---
+description: Valid Static AsyncGeneratorMethod PrivateName (multiple fields definitions)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ foo = "foobar";
+ m() { return 42 }
+ static async * #$(value) {
+ yield * await value;
+ }
+ static async * #_(value) {
+ yield * await value;
+ }
+ static async * #\u{6F}(value) {
+ yield * await value;
+ }
+ static async * #\u2118(value) {
+ yield * await value;
+ }
+ static async * #ZW_\u200C_NJ(value) {
+ yield * await value;
+ }
+ static async * #ZW_\u200D_J(value) {
+ yield * await value;
+ }
+ m2() { return 39 }
+ bar = "barbaz";
+ static get $() {
+ return this.#$;
+ }
+ static get _() {
+ return this.#_;
+ }
+ static get \u{6F}() {
+ return this.#\u{6F};
+ }
+ static get \u2118() {
+ return this.#\u2118;
+ }
+ static get ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ;
+ }
+ static get ZW_\u200D_J() {
+ return this.#ZW_\u200D_J;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.m2(), 39);
+assert(!
+ Object.prototype.hasOwnProperty.call(c, "m2"),
+ "m2 doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m2, C.prototype.m2);
+
+verifyProperty(C.prototype, "m2", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.foo, "foobar");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "foo"),
+ "foo doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "foo"),
+ "foo doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "foo", {
+ value: "foobar",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.bar, "barbaz");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "bar"),
+ "bar doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "bar"),
+ "bar doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "bar", {
+ value: "barbaz",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+Promise.all([
+ C.$([1]).next(),
+ C._([1]).next(),
+ C.\u{6F}([1]).next(),
+ C.\u2118([1]).next(),
+ C.ZW_\u200C_NJ([1]).next(),
+ C.ZW_\u200D_J([1]).next(),
+]).then(results => {
+
+ assert.sameValue(results[0].value, 1);
+ assert.sameValue(results[1].value, 1);
+ assert.sameValue(results[2].value, 1);
+ assert.sameValue(results[3].value, 1);
+ assert.sameValue(results[4].value, 1);
+ assert.sameValue(results[5].value, 1);
+
+}).then($DONE, $DONE);
+
diff --git a/js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-static-async-method-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-static-async-method-privatename-identifier-alt.js
new file mode 100644
index 0000000000..ac5f408b1b
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-static-async-method-privatename-identifier-alt.js
@@ -0,0 +1,185 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-async-method-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-multiple-definitions.template
+/*---
+description: Valid Static AsyncMethod PrivateName (multiple fields definitions)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ AsyncMethod
+
+ AsyncMethod :
+ async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ foo = "foobar";
+ m() { return 42 }
+ static async #$(value) {
+ return await value;
+ }
+ static async #_(value) {
+ return await value;
+ }
+ static async #o(value) {
+ return await value;
+ }
+ static async #℘(value) {
+ return await value;
+ }
+ static async #ZW_‌_NJ(value) {
+ return await value;
+ }
+ static async #ZW_‍_J(value) {
+ return await value;
+ }
+ m2() { return 39 }
+ bar = "barbaz";
+ static async $(value) {
+ return await this.#$(value);
+ }
+ static async _(value) {
+ return await this.#_(value);
+ }
+ static async o(value) {
+ return await this.#o(value);
+ }
+ static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return await this.#℘(value);
+ }
+ static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return await this.#ZW_‌_NJ(value);
+ }
+ static async ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return await this.#ZW_‍_J(value);
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.m2(), 39);
+assert(!
+ Object.prototype.hasOwnProperty.call(c, "m2"),
+ "m2 doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m2, C.prototype.m2);
+
+verifyProperty(C.prototype, "m2", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.foo, "foobar");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "foo"),
+ "foo doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "foo"),
+ "foo doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "foo", {
+ value: "foobar",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.bar, "barbaz");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "bar"),
+ "bar doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "bar"),
+ "bar doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "bar", {
+ value: "barbaz",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+Promise.all([
+ C.$(1),
+ C._(1),
+ C.o(1),
+ C.℘(1), // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.ZW_‌_NJ(1), // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.ZW_‍_J(1), // DO NOT CHANGE THE NAME OF THIS FIELD
+]).then(results => {
+
+ assert.sameValue(results[0], 1);
+ assert.sameValue(results[1], 1);
+ assert.sameValue(results[2], 1);
+ assert.sameValue(results[3], 1);
+ assert.sameValue(results[4], 1);
+ assert.sameValue(results[5], 1);
+
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-static-async-method-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-static-async-method-privatename-identifier.js
new file mode 100644
index 0000000000..32a004095c
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-static-async-method-privatename-identifier.js
@@ -0,0 +1,186 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-async-method-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-multiple-definitions.template
+/*---
+description: Valid Static AsyncMethod PrivateName (multiple fields definitions)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ AsyncMethod
+
+ AsyncMethod :
+ async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ foo = "foobar";
+ m() { return 42 }
+ static async #$(value) {
+ return await value;
+ }
+ static async #_(value) {
+ return await value;
+ }
+ static async #\u{6F}(value) {
+ return await value;
+ }
+ static async #\u2118(value) {
+ return await value;
+ }
+ static async #ZW_\u200C_NJ(value) {
+ return await value;
+ }
+ static async #ZW_\u200D_J(value) {
+ return await value;
+ }
+ m2() { return 39 }
+ bar = "barbaz";
+ static async $(value) {
+ return await this.#$(value);
+ }
+ static async _(value) {
+ return await this.#_(value);
+ }
+ static async \u{6F}(value) {
+ return await this.#\u{6F}(value);
+ }
+ static async \u2118(value) {
+ return await this.#\u2118(value);
+ }
+ static async ZW_\u200C_NJ(value) {
+ return await this.#ZW_\u200C_NJ(value);
+ }
+ static async ZW_\u200D_J(value) {
+ return await this.#ZW_\u200D_J(value);
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.m2(), 39);
+assert(!
+ Object.prototype.hasOwnProperty.call(c, "m2"),
+ "m2 doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m2, C.prototype.m2);
+
+verifyProperty(C.prototype, "m2", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.foo, "foobar");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "foo"),
+ "foo doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "foo"),
+ "foo doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "foo", {
+ value: "foobar",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.bar, "barbaz");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "bar"),
+ "bar doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "bar"),
+ "bar doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "bar", {
+ value: "barbaz",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+Promise.all([
+ C.$(1),
+ C._(1),
+ C.\u{6F}(1),
+ C.\u2118(1),
+ C.ZW_\u200C_NJ(1),
+ C.ZW_\u200D_J(1),
+]).then(results => {
+
+ assert.sameValue(results[0], 1);
+ assert.sameValue(results[1], 1);
+ assert.sameValue(results[2], 1);
+ assert.sameValue(results[3], 1);
+ assert.sameValue(results[4], 1);
+ assert.sameValue(results[5], 1);
+
+}).then($DONE, $DONE);
+
diff --git a/js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-static-generator-method-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-static-generator-method-privatename-identifier-alt.js
new file mode 100644
index 0000000000..95ebc4013d
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-static-generator-method-privatename-identifier-alt.js
@@ -0,0 +1,175 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-generator-method-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-multiple-definitions.template
+/*---
+description: Valid Static GeneratorMethod PrivateName (multiple fields definitions)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ GeneratorMethod
+
+ GeneratorMethod :
+ * ClassElementName ( UniqueFormalParameters ){ GeneratorBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ foo = "foobar";
+ m() { return 42 }
+ static * #$(value) {
+ yield * value;
+ }
+ static * #_(value) {
+ yield * value;
+ }
+ static * #o(value) {
+ yield * value;
+ }
+ static * #℘(value) {
+ yield * value;
+ }
+ static * #ZW_‌_NJ(value) {
+ yield * value;
+ }
+ static * #ZW_‍_J(value) {
+ yield * value;
+ }
+ m2() { return 39 }
+ bar = "barbaz";
+ static get $() {
+ return this.#$;
+ }
+ static get _() {
+ return this.#_;
+ }
+ static get o() {
+ return this.#o;
+ }
+ static get ℘() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#℘;
+ }
+ static get ZW_‌_NJ() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‌_NJ;
+ }
+ static get ZW_‍_J() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‍_J;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.m2(), 39);
+assert(!
+ Object.prototype.hasOwnProperty.call(c, "m2"),
+ "m2 doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m2, C.prototype.m2);
+
+verifyProperty(C.prototype, "m2", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.foo, "foobar");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "foo"),
+ "foo doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "foo"),
+ "foo doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "foo", {
+ value: "foobar",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.bar, "barbaz");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "bar"),
+ "bar doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "bar"),
+ "bar doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "bar", {
+ value: "barbaz",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$([1]).next().value, 1);
+assert.sameValue(C._([1]).next().value, 1);
+assert.sameValue(C.o([1]).next().value, 1);
+assert.sameValue(C.℘([1]).next().value, 1);
+assert.sameValue(C.ZW_‌_NJ([1]).next().value, 1);
+assert.sameValue(C.ZW_‍_J([1]).next().value, 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-static-generator-method-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-static-generator-method-privatename-identifier.js
new file mode 100644
index 0000000000..4829fb1886
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-static-generator-method-privatename-identifier.js
@@ -0,0 +1,176 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-generator-method-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-multiple-definitions.template
+/*---
+description: Valid Static GeneratorMethod PrivateName (multiple fields definitions)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ GeneratorMethod
+
+ GeneratorMethod :
+ * ClassElementName ( UniqueFormalParameters ){ GeneratorBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ foo = "foobar";
+ m() { return 42 }
+ static * #$(value) {
+ yield * value;
+ }
+ static * #_(value) {
+ yield * value;
+ }
+ static * #\u{6F}(value) {
+ yield * value;
+ }
+ static * #\u2118(value) {
+ yield * value;
+ }
+ static * #ZW_\u200C_NJ(value) {
+ yield * value;
+ }
+ static * #ZW_\u200D_J(value) {
+ yield * value;
+ }
+ m2() { return 39 }
+ bar = "barbaz";
+ static get $() {
+ return this.#$;
+ }
+ static get _() {
+ return this.#_;
+ }
+ static get \u{6F}() {
+ return this.#\u{6F};
+ }
+ static get \u2118() {
+ return this.#\u2118;
+ }
+ static get ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ;
+ }
+ static get ZW_\u200D_J() {
+ return this.#ZW_\u200D_J;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.m2(), 39);
+assert(!
+ Object.prototype.hasOwnProperty.call(c, "m2"),
+ "m2 doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m2, C.prototype.m2);
+
+verifyProperty(C.prototype, "m2", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.foo, "foobar");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "foo"),
+ "foo doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "foo"),
+ "foo doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "foo", {
+ value: "foobar",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.bar, "barbaz");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "bar"),
+ "bar doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "bar"),
+ "bar doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "bar", {
+ value: "barbaz",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$([1]).next().value, 1);
+assert.sameValue(C._([1]).next().value, 1);
+assert.sameValue(C.\u{6F}([1]).next().value, 1);
+assert.sameValue(C.\u2118([1]).next().value, 1);
+assert.sameValue(C.ZW_\u200C_NJ([1]).next().value, 1);
+assert.sameValue(C.ZW_\u200D_J([1]).next().value, 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-static-method-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-static-method-privatename-identifier-alt.js
new file mode 100644
index 0000000000..81d12a9690
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-static-method-privatename-identifier-alt.js
@@ -0,0 +1,173 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-method-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-multiple-definitions.template
+/*---
+description: Valid Static Method PrivateName (multiple fields definitions)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ ClassElementName ( UniqueFormalParameters ){ FunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ foo = "foobar";
+ m() { return 42 }
+ static #$(value) {
+ return value;
+ }
+ static #_(value) {
+ return value;
+ }
+ static #o(value) {
+ return value;
+ }
+ static #℘(value) {
+ return value;
+ }
+ static #ZW_‌_NJ(value) {
+ return value;
+ }
+ static #ZW_‍_J(value) {
+ return value;
+ }
+ m2() { return 39 }
+ bar = "barbaz";
+ static $(value) {
+ return this.#$(value);
+ }
+ static _(value) {
+ return this.#_(value);
+ }
+ static o(value) {
+ return this.#o(value);
+ }
+ static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#℘(value);
+ }
+ static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‌_NJ(value);
+ }
+ static ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‍_J(value);
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.m2(), 39);
+assert(!
+ Object.prototype.hasOwnProperty.call(c, "m2"),
+ "m2 doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m2, C.prototype.m2);
+
+verifyProperty(C.prototype, "m2", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.foo, "foobar");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "foo"),
+ "foo doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "foo"),
+ "foo doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "foo", {
+ value: "foobar",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.bar, "barbaz");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "bar"),
+ "bar doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "bar"),
+ "bar doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "bar", {
+ value: "barbaz",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(1), 1);
+assert.sameValue(C._(1), 1);
+assert.sameValue(C.o(1), 1);
+assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+assert.sameValue(C.ZW_‌_NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+assert.sameValue(C.ZW_‍_J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-static-method-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-static-method-privatename-identifier.js
new file mode 100644
index 0000000000..9605b7ee9e
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-static-method-privatename-identifier.js
@@ -0,0 +1,173 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-method-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-multiple-definitions.template
+/*---
+description: Valid Static Method PrivateName (multiple fields definitions)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ ClassElementName ( UniqueFormalParameters ){ FunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ foo = "foobar";
+ m() { return 42 }
+ static #$(value) {
+ return value;
+ }
+ static #_(value) {
+ return value;
+ }
+ static #\u{6F}(value) {
+ return value;
+ }
+ static #\u2118(value) {
+ return value;
+ }
+ static #ZW_\u200C_NJ(value) {
+ return value;
+ }
+ static #ZW_\u200D_J(value) {
+ return value;
+ }
+ m2() { return 39 }
+ bar = "barbaz";
+ static $(value) {
+ return this.#$(value);
+ }
+ static _(value) {
+ return this.#_(value);
+ }
+ static \u{6F}(value) {
+ return this.#\u{6F}(value);
+ }
+ static \u2118(value) {
+ return this.#\u2118(value);
+ }
+ static ZW_\u200C_NJ(value) {
+ return this.#ZW_\u200C_NJ(value);
+ }
+ static ZW_\u200D_J(value) {
+ return this.#ZW_\u200D_J(value);
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.m2(), 39);
+assert(!
+ Object.prototype.hasOwnProperty.call(c, "m2"),
+ "m2 doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m2, C.prototype.m2);
+
+verifyProperty(C.prototype, "m2", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.foo, "foobar");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "foo"),
+ "foo doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "foo"),
+ "foo doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "foo", {
+ value: "foobar",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.bar, "barbaz");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "bar"),
+ "bar doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "bar"),
+ "bar doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "bar", {
+ value: "barbaz",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(1), 1);
+assert.sameValue(C._(1), 1);
+assert.sameValue(C.\u{6F}(1), 1);
+assert.sameValue(C.\u2118(1), 1);
+assert.sameValue(C.ZW_\u200C_NJ(1), 1);
+assert.sameValue(C.ZW_\u200D_J(1), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-static-privatename-identifier-alt-by-classname.js b/js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-static-privatename-identifier-alt-by-classname.js
new file mode 100644
index 0000000000..86ab6e2259
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-static-privatename-identifier-alt-by-classname.js
@@ -0,0 +1,161 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-alt-by-classname.case
+// - src/class-elements/productions/cls-decl-multiple-definitions.template
+/*---
+description: Valid Static PrivateName (multiple fields definitions)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ foo = "foobar";
+ m() { return 42 }
+ static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_‍_J
+ m2() { return 39 }
+ bar = "barbaz";
+ static $(value) {
+ C.#$ = value;
+ return C.#$;
+ }
+ static _(value) {
+ C.#_ = value;
+ return C.#_;
+ }
+ static o(value) {
+ C.#\u{6F} = value;
+ return C.#\u{6F};
+ }
+ static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.#℘ = value;
+ return C.#℘;
+ }
+ static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.#ZW_‌_NJ = value;
+ return C.#ZW_‌_NJ;
+ }
+ static ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.#ZW_‍_J = value;
+ return C.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.m2(), 39);
+assert(!
+ Object.prototype.hasOwnProperty.call(c, "m2"),
+ "m2 doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m2, C.prototype.m2);
+
+verifyProperty(C.prototype, "m2", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.foo, "foobar");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "foo"),
+ "foo doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "foo"),
+ "foo doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "foo", {
+ value: "foobar",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.bar, "barbaz");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "bar"),
+ "bar doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "bar"),
+ "bar doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "bar", {
+ value: "barbaz",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(1), 1);
+assert.sameValue(C._(1), 1);
+assert.sameValue(C.o(1), 1);
+assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+assert.sameValue(C.ZW_‌_NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+assert.sameValue(C.ZW_‍_J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-static-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-static-privatename-identifier-alt.js
new file mode 100644
index 0000000000..06b667ddf4
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-static-privatename-identifier-alt.js
@@ -0,0 +1,161 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-multiple-definitions.template
+/*---
+description: Valid Static PrivateName (multiple fields definitions)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ foo = "foobar";
+ m() { return 42 }
+ static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_‍_J
+ m2() { return 39 }
+ bar = "barbaz";
+ static $(value) {
+ this.#$ = value;
+ return this.#$;
+ }
+ static _(value) {
+ this.#_ = value;
+ return this.#_;
+ }
+ static o(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F};
+ }
+ static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ this.#℘ = value;
+ return this.#℘;
+ }
+ static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ this.#ZW_‌_NJ = value;
+ return this.#ZW_‌_NJ;
+ }
+ static ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ this.#ZW_‍_J = value;
+ return this.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.m2(), 39);
+assert(!
+ Object.prototype.hasOwnProperty.call(c, "m2"),
+ "m2 doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m2, C.prototype.m2);
+
+verifyProperty(C.prototype, "m2", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.foo, "foobar");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "foo"),
+ "foo doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "foo"),
+ "foo doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "foo", {
+ value: "foobar",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.bar, "barbaz");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "bar"),
+ "bar doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "bar"),
+ "bar doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "bar", {
+ value: "barbaz",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(1), 1);
+assert.sameValue(C._(1), 1);
+assert.sameValue(C.o(1), 1);
+assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+assert.sameValue(C.ZW_‌_NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+assert.sameValue(C.ZW_‍_J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-static-privatename-identifier-by-classname.js b/js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-static-privatename-identifier-by-classname.js
new file mode 100644
index 0000000000..c0ba4475a5
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-static-privatename-identifier-by-classname.js
@@ -0,0 +1,161 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-by-classname.case
+// - src/class-elements/productions/cls-decl-multiple-definitions.template
+/*---
+description: Valid Static PrivateName (multiple fields definitions)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ foo = "foobar";
+ m() { return 42 }
+ static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J
+ m2() { return 39 }
+ bar = "barbaz";
+ static $(value) {
+ C.#$ = value;
+ return C.#$;
+ }
+ static _(value) {
+ C.#_ = value;
+ return C.#_;
+ }
+ static \u{6F}(value) {
+ C.#\u{6F} = value;
+ return C.#\u{6F};
+ }
+ static \u2118(value) {
+ C.#\u2118 = value;
+ return C.#\u2118;
+ }
+ static ZW_\u200C_NJ(value) {
+ C.#ZW_\u200C_NJ = value;
+ return C.#ZW_\u200C_NJ;
+ }
+ static ZW_\u200D_J(value) {
+ C.#ZW_\u200D_J = value;
+ return C.#ZW_\u200D_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.m2(), 39);
+assert(!
+ Object.prototype.hasOwnProperty.call(c, "m2"),
+ "m2 doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m2, C.prototype.m2);
+
+verifyProperty(C.prototype, "m2", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.foo, "foobar");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "foo"),
+ "foo doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "foo"),
+ "foo doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "foo", {
+ value: "foobar",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.bar, "barbaz");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "bar"),
+ "bar doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "bar"),
+ "bar doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "bar", {
+ value: "barbaz",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(1), 1);
+assert.sameValue(C._(1), 1);
+assert.sameValue(C.\u{6F}(1), 1);
+assert.sameValue(C.\u2118(1), 1);
+assert.sameValue(C.ZW_\u200C_NJ(1), 1);
+assert.sameValue(C.ZW_\u200D_J(1), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-static-privatename-identifier-initializer-alt-by-classname.js b/js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-static-privatename-identifier-initializer-alt-by-classname.js
new file mode 100644
index 0000000000..fde32f87d6
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-static-privatename-identifier-initializer-alt-by-classname.js
@@ -0,0 +1,155 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-initializer-alt-by-classname.case
+// - src/class-elements/productions/cls-decl-multiple-definitions.template
+/*---
+description: Valid Static PrivateName (multiple fields definitions)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ foo = "foobar";
+ m() { return 42 }
+ static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_‍_J = 1
+ m2() { return 39 }
+ bar = "barbaz";
+ static $() {
+ return C.#$;
+ }
+ static _() {
+ return C.#_;
+ }
+ static \u{6F}() {
+ return C.#\u{6F};
+ }
+ static ℘() {
+ return C.#℘;
+ }
+ static ZW_‌_NJ() {
+ return C.#ZW_‌_NJ;
+ }
+ static ZW_‍_J() {
+ return C.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.m2(), 39);
+assert(!
+ Object.prototype.hasOwnProperty.call(c, "m2"),
+ "m2 doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m2, C.prototype.m2);
+
+verifyProperty(C.prototype, "m2", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.foo, "foobar");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "foo"),
+ "foo doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "foo"),
+ "foo doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "foo", {
+ value: "foobar",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.bar, "barbaz");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "bar"),
+ "bar doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "bar"),
+ "bar doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "bar", {
+ value: "barbaz",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(), 1);
+assert.sameValue(C._(), 1);
+assert.sameValue(C.\u{6F}(), 1);
+assert.sameValue(C.℘(), 1);
+assert.sameValue(C.ZW_‌_NJ(), 1);
+assert.sameValue(C.ZW_‍_J(), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-static-privatename-identifier-initializer-alt.js b/js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-static-privatename-identifier-initializer-alt.js
new file mode 100644
index 0000000000..1800c41d03
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-static-privatename-identifier-initializer-alt.js
@@ -0,0 +1,155 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-initializer-alt.case
+// - src/class-elements/productions/cls-decl-multiple-definitions.template
+/*---
+description: Valid Static PrivateName (multiple fields definitions)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ foo = "foobar";
+ m() { return 42 }
+ static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_‍_J = 1
+ m2() { return 39 }
+ bar = "barbaz";
+ static $() {
+ return this.#$;
+ }
+ static _() {
+ return this.#_;
+ }
+ static \u{6F}() {
+ return this.#\u{6F};
+ }
+ static ℘() {
+ return this.#℘;
+ }
+ static ZW_‌_NJ() {
+ return this.#ZW_‌_NJ;
+ }
+ static ZW_‍_J() {
+ return this.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.m2(), 39);
+assert(!
+ Object.prototype.hasOwnProperty.call(c, "m2"),
+ "m2 doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m2, C.prototype.m2);
+
+verifyProperty(C.prototype, "m2", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.foo, "foobar");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "foo"),
+ "foo doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "foo"),
+ "foo doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "foo", {
+ value: "foobar",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.bar, "barbaz");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "bar"),
+ "bar doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "bar"),
+ "bar doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "bar", {
+ value: "barbaz",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(), 1);
+assert.sameValue(C._(), 1);
+assert.sameValue(C.\u{6F}(), 1);
+assert.sameValue(C.℘(), 1);
+assert.sameValue(C.ZW_‌_NJ(), 1);
+assert.sameValue(C.ZW_‍_J(), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-static-privatename-identifier-initializer.js b/js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-static-privatename-identifier-initializer.js
new file mode 100644
index 0000000000..8da79d7865
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-static-privatename-identifier-initializer.js
@@ -0,0 +1,155 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-initializer.case
+// - src/class-elements/productions/cls-decl-multiple-definitions.template
+/*---
+description: Valid Static PrivateName (multiple fields definitions)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ foo = "foobar";
+ m() { return 42 }
+ static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #\u2118 = 1; static #ZW_\u200C_NJ = 1; static #ZW_\u200D_J = 1
+ m2() { return 39 }
+ bar = "barbaz";
+ static $() {
+ return this.#$;
+ }
+ static _() {
+ return this.#_;
+ }
+ static \u{6F}() {
+ return this.#\u{6F};
+ }
+ static \u2118() {
+ return this.#\u2118;
+ }
+ static ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ;
+ }
+ static ZW_\u200D_J() {
+ return this.#ZW_\u200D_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.m2(), 39);
+assert(!
+ Object.prototype.hasOwnProperty.call(c, "m2"),
+ "m2 doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m2, C.prototype.m2);
+
+verifyProperty(C.prototype, "m2", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.foo, "foobar");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "foo"),
+ "foo doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "foo"),
+ "foo doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "foo", {
+ value: "foobar",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.bar, "barbaz");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "bar"),
+ "bar doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "bar"),
+ "bar doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "bar", {
+ value: "barbaz",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(), 1);
+assert.sameValue(C._(), 1);
+assert.sameValue(C.\u{6F}(), 1);
+assert.sameValue(C.\u2118(), 1);
+assert.sameValue(C.ZW_\u200C_NJ(), 1);
+assert.sameValue(C.ZW_\u200D_J(), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-static-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-static-privatename-identifier.js
new file mode 100644
index 0000000000..6aa6f017c9
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/multiple-definitions-rs-static-privatename-identifier.js
@@ -0,0 +1,161 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-multiple-definitions.template
+/*---
+description: Valid Static PrivateName (multiple fields definitions)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ foo = "foobar";
+ m() { return 42 }
+ static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J
+ m2() { return 39 }
+ bar = "barbaz";
+ static $(value) {
+ this.#$ = value;
+ return this.#$;
+ }
+ static _(value) {
+ this.#_ = value;
+ return this.#_;
+ }
+ static \u{6F}(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F};
+ }
+ static \u2118(value) {
+ this.#\u2118 = value;
+ return this.#\u2118;
+ }
+ static ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ = value;
+ return this.#ZW_\u200C_NJ;
+ }
+ static ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J = value;
+ return this.#ZW_\u200D_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.m2(), 39);
+assert(!
+ Object.prototype.hasOwnProperty.call(c, "m2"),
+ "m2 doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m2, C.prototype.m2);
+
+verifyProperty(C.prototype, "m2", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.foo, "foobar");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "foo"),
+ "foo doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "foo"),
+ "foo doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "foo", {
+ value: "foobar",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.bar, "barbaz");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "bar"),
+ "bar doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "bar"),
+ "bar doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "bar", {
+ value: "barbaz",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(1), 1);
+assert.sameValue(C._(1), 1);
+assert.sameValue(C.\u{6F}(1), 1);
+assert.sameValue(C.\u2118(1), 1);
+assert.sameValue(C.ZW_\u200C_NJ(1), 1);
+assert.sameValue(C.ZW_\u200D_J(1), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/multiple-definitions-static-private-fields.js b/js/src/tests/test262/language/statements/class/elements/multiple-definitions-static-private-fields.js
new file mode 100644
index 0000000000..2d79468c3c
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/multiple-definitions-static-private-fields.js
@@ -0,0 +1,122 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/static-private-fields.case
+// - src/class-elements/productions/cls-decl-multiple-definitions.template
+/*---
+description: static private fields (multiple fields definitions)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ static FieldDefinition ;
+
+ FieldDefinition :
+ ClassElementName Initializer_opt
+
+ ClassElementName :
+ PrivateName
+
+ PrivateName :
+ # IdentifierName
+
+---*/
+
+
+class C {
+ foo = "foobar";
+ m() { return 42 }
+ static #x; static #y
+ m2() { return 39 }
+ bar = "barbaz";
+ static x() {
+ this.#x = 42;
+ return this.#x;
+ }
+ static y() {
+ this.#y = 43;
+ return this.#y;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.m2(), 39);
+assert(!
+ Object.prototype.hasOwnProperty.call(c, "m2"),
+ "m2 doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m2, C.prototype.m2);
+
+verifyProperty(C.prototype, "m2", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.foo, "foobar");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "foo"),
+ "foo doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "foo"),
+ "foo doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "foo", {
+ value: "foobar",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.bar, "barbaz");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "bar"),
+ "bar doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "bar"),
+ "bar doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "bar", {
+ value: "barbaz",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+// Test the private fields do not appear as properties before set to value
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#x"), "test 1");
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 2");
+assert(!Object.prototype.hasOwnProperty.call(c, "#x"), "test 3");
+
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#y"), "test 4");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 5");
+assert(!Object.prototype.hasOwnProperty.call(c, "#y"), "test 6");
+
+// Test if private fields can be sucessfully accessed and set to value
+assert.sameValue(C.x(), 42, "test 7");
+assert.sameValue(C.y(), 43, "test 8");
+
+// Test the private fields do not appear as properties before after set to value
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 9");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 10");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/multiple-definitions-static-private-methods-with-fields.js b/js/src/tests/test262/language/statements/class/elements/multiple-definitions-static-private-methods-with-fields.js
new file mode 100644
index 0000000000..ae07f13ca4
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/multiple-definitions-static-private-methods-with-fields.js
@@ -0,0 +1,139 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/static-private-methods-with-fields.case
+// - src/class-elements/productions/cls-decl-multiple-definitions.template
+/*---
+description: static private methods with fields (multiple fields definitions)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class-static-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ static FieldDefinition ;
+
+ FieldDefinition :
+ ClassElementName Initializer_opt
+
+ ClassElementName :
+ PrivateName
+
+ PrivateName :
+ # IdentifierName
+
+---*/
+
+
+class C {
+ foo = "foobar";
+ m() { return 42 }
+ static #xVal; static #yVal
+ m2() { return 39 }
+ bar = "barbaz";
+ static #x(value) {
+ this.#xVal = value;
+ return this.#xVal;
+ }
+ static #y(value) {
+ this.#yVal = value;
+ return this.#yVal;
+ }
+ static x() {
+ return this.#x(42);
+ }
+ static y() {
+ return this.#y(43);
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.m2(), 39);
+assert(!
+ Object.prototype.hasOwnProperty.call(c, "m2"),
+ "m2 doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m2, C.prototype.m2);
+
+verifyProperty(C.prototype, "m2", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.foo, "foobar");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "foo"),
+ "foo doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "foo"),
+ "foo doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "foo", {
+ value: "foobar",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.bar, "barbaz");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "bar"),
+ "bar doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "bar"),
+ "bar doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "bar", {
+ value: "barbaz",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+// Test the private methods do not appear as properties before set to value
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#x"), "test 1");
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 2");
+assert(!Object.prototype.hasOwnProperty.call(c, "#x"), "test 3");
+
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#y"), "test 4");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 5");
+assert(!Object.prototype.hasOwnProperty.call(c, "#y"), "test 6");
+
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#xVal"), "test 7");
+assert(!Object.prototype.hasOwnProperty.call(C, "#xVal"), "test 8");
+assert(!Object.prototype.hasOwnProperty.call(c, "#xVal"), "test 9");
+
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#yVal"), "test 10");
+assert(!Object.prototype.hasOwnProperty.call(C, "#yVal"), "test 11");
+assert(!Object.prototype.hasOwnProperty.call(c, "#yVal"), "test 12");
+
+// Test if private fields can be sucessfully accessed and set to value
+assert.sameValue(C.x(), 42, "test 13");
+assert.sameValue(C.y(), 43, "test 14");
+
+// Test the private fields do not appear as properties before after set to value
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 15");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 16");
+
+assert(!Object.prototype.hasOwnProperty.call(C, "#xVal"), "test 17");
+assert(!Object.prototype.hasOwnProperty.call(C, "#yVal"), "test 18");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/multiple-definitions-static-private-methods.js b/js/src/tests/test262/language/statements/class/elements/multiple-definitions-static-private-methods.js
new file mode 100644
index 0000000000..73afd18ea3
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/multiple-definitions-static-private-methods.js
@@ -0,0 +1,126 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/static-private-methods.case
+// - src/class-elements/productions/cls-decl-multiple-definitions.template
+/*---
+description: static private methods (multiple fields definitions)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ static FieldDefinition ;
+
+ FieldDefinition :
+ ClassElementName Initializer_opt
+
+ ClassElementName :
+ PrivateName
+
+ PrivateName :
+ # IdentifierName
+
+---*/
+
+
+class C {
+ foo = "foobar";
+ m() { return 42 }
+
+ m2() { return 39 }
+ bar = "barbaz";
+ static #x(value) {
+ return value / 2;
+ }
+ static #y(value) {
+ return value * 2;
+ }
+ static x() {
+ return this.#x(84);
+ }
+ static y() {
+ return this.#y(43);
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.m2(), 39);
+assert(!
+ Object.prototype.hasOwnProperty.call(c, "m2"),
+ "m2 doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m2, C.prototype.m2);
+
+verifyProperty(C.prototype, "m2", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.foo, "foobar");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "foo"),
+ "foo doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "foo"),
+ "foo doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "foo", {
+ value: "foobar",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.bar, "barbaz");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "bar"),
+ "bar doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "bar"),
+ "bar doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "bar", {
+ value: "barbaz",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+// Test the private methods do not appear as properties before set to value
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#x"), "test 1");
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 2");
+assert(!Object.prototype.hasOwnProperty.call(c, "#x"), "test 3");
+
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#y"), "test 4");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 5");
+assert(!Object.prototype.hasOwnProperty.call(c, "#y"), "test 6");
+
+// Test if private fields can be sucessfully accessed and set to value
+assert.sameValue(C.x(), 42, "test 7");
+assert.sameValue(C.y(), 86, "test 8");
+
+// Test the private fields do not appear as properties before after set to value
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 9");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 10");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/multiple-definitions-string-literal-names.js b/js/src/tests/test262/language/statements/class/elements/multiple-definitions-string-literal-names.js
new file mode 100644
index 0000000000..0c19e95ae7
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/multiple-definitions-string-literal-names.js
@@ -0,0 +1,160 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/string-literal-names.case
+// - src/class-elements/productions/cls-decl-multiple-definitions.template
+/*---
+description: String literal names (multiple fields definitions)
+esid: prod-FieldDefinition
+features: [class-fields-public, class]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement:
+ ...
+ FieldDefinition ;
+
+ FieldDefinition:
+ ClassElementName Initializer_opt
+
+ ClassElementName:
+ PropertyName
+
+---*/
+
+
+class C {
+ foo = "foobar";
+ m() { return 42 }
+ 'a'; "b"; 'c' = 39;
+ "d" = 42
+ m2() { return 39 }
+ bar = "barbaz";
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.m2(), 39);
+assert(!
+ Object.prototype.hasOwnProperty.call(c, "m2"),
+ "m2 doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m2, C.prototype.m2);
+
+verifyProperty(C.prototype, "m2", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.foo, "foobar");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "foo"),
+ "foo doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "foo"),
+ "foo doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "foo", {
+ value: "foobar",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.bar, "barbaz");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "bar"),
+ "bar doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "bar"),
+ "bar doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "bar", {
+ value: "barbaz",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "a"),
+ "a does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "a"),
+ "a does not appear as an own property on C constructor"
+);
+
+verifyProperty(c, "a", {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "b"),
+ "b does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "b"),
+ "b does not appear as an own property on C constructor"
+);
+
+verifyProperty(c, "b", {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "c"),
+ "c does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "c"),
+ "c does not appear as an own property on C constructor"
+);
+
+verifyProperty(c, "c", {
+ value: 39,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "d"),
+ "d does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "d"),
+ "d does not appear as an own property on C constructor"
+);
+
+verifyProperty(c, "d", {
+ value: 42,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-computed-names.js b/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-computed-names.js
new file mode 100644
index 0000000000..33a3cd84b1
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-computed-names.js
@@ -0,0 +1,130 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/computed-names.case
+// - src/class-elements/productions/cls-decl-multiple-stacked-definitions.template
+/*---
+description: Computed property names (multiple stacked fields definitions through ASI)
+esid: prod-FieldDefinition
+features: [class-fields-public, computed-property-names, class]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement:
+ ...
+ FieldDefinition ;
+
+ FieldDefinition:
+ ClassElementName Initializer_opt
+
+ ClassElementName:
+ PropertyName
+
+---*/
+var x = "b";
+
+
+
+class C {
+ [x] = 42; [10] = "meep"; ["not initialized"]
+ foo = "foobar"
+ bar = "barbaz";
+
+}
+
+var c = new C();
+
+assert.sameValue(c.foo, "foobar");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "foo"),
+ "foo doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "foo"),
+ "foo doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "foo", {
+ value: "foobar",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.bar, "barbaz");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "bar"),
+ "bar doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "bar"),
+ "bar doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "bar", {
+ value: "barbaz",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "b"),
+ "b doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "b"),
+ "b doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "b", {
+ value: 42,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "x"),
+ "x doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "x"),
+ "x doesn't appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "x"),
+ "x doesn't appear as an own property on C instance"
+);
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "10"),
+ "10 doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "10"),
+ "10 doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "10", {
+ value: "meep",
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "not initialized"),
+ "'not initialized' doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "not initialized"),
+ "'not initialized' doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "not initialized", {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-computed-symbol-names.js b/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-computed-symbol-names.js
new file mode 100644
index 0000000000..dcc67070a1
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-computed-symbol-names.js
@@ -0,0 +1,128 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/computed-symbol-names.case
+// - src/class-elements/productions/cls-decl-multiple-stacked-definitions.template
+/*---
+description: Computed property symbol names (multiple stacked fields definitions through ASI)
+esid: prod-FieldDefinition
+features: [class-fields-public, Symbol, computed-property-names, class]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement:
+ ...
+ FieldDefinition ;
+
+ FieldDefinition:
+ ClassElementName Initializer_opt
+
+ ClassElementName:
+ PropertyName
+
+---*/
+var x = Symbol();
+var y = Symbol();
+
+
+
+class C {
+ [x]; [y] = 42
+ foo = "foobar"
+ bar = "barbaz";
+
+}
+
+var c = new C();
+
+assert.sameValue(c.foo, "foobar");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "foo"),
+ "foo doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "foo"),
+ "foo doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "foo", {
+ value: "foobar",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.bar, "barbaz");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "bar"),
+ "bar doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "bar"),
+ "bar doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "bar", {
+ value: "barbaz",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, x),
+ "Symbol x doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, x),
+ "Symbol x doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, x, {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, y),
+ "Symbol y doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, y),
+ "Symbol y doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, y, {
+ value: 42,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "x"),
+ "x doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "x"),
+ "x doesn't appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "x"),
+ "x doesn't appear as an own property on C instance"
+);
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "y"),
+ "y doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "y"),
+ "y doesn't appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "y"),
+ "y doesn't appear as an own property on C instance"
+);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-grammar-privatename-identifier-semantics-stringvalue.js b/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-grammar-privatename-identifier-semantics-stringvalue.js
new file mode 100644
index 0000000000..24576d030b
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-grammar-privatename-identifier-semantics-stringvalue.js
@@ -0,0 +1,132 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-privatename-identifier-semantics-stringvalue.case
+// - src/class-elements/productions/cls-decl-multiple-stacked-definitions.template
+/*---
+description: PrivateName Static Semantics, StringValue (multiple stacked fields definitions through ASI)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+
+ 1. Return the String value consisting of the sequence of code
+ units corresponding to PrivateName. In determining the sequence
+ any occurrences of \ UnicodeEscapeSequence are first replaced
+ with the code point represented by the UnicodeEscapeSequence
+ and then the code points of the entire PrivateName are converted
+ to code units by UTF16Encoding (10.1.1) each code point.
+
+---*/
+
+
+class C {
+ #\u{6F};
+ #\u2118;
+ #ZW_\u200C_NJ;
+ #ZW_\u200D_J;
+ foo = "foobar"
+ bar = "barbaz";
+ o(value) {
+ this.#o = value;
+ return this.#o;
+ }
+ ℘(value) {
+ this.#℘ = value;
+ return this.#℘;
+ }
+ ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS METHOD
+ this.#ZW_‌_NJ = value;
+ return this.#ZW_‌_NJ;
+ }
+ ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS METHOD
+ this.#ZW_‍_J = value;
+ return this.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.foo, "foobar");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "foo"),
+ "foo doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "foo"),
+ "foo doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "foo", {
+ value: "foobar",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.bar, "barbaz");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "bar"),
+ "bar doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "bar"),
+ "bar doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "bar", {
+ value: "barbaz",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.o(1), 1);
+assert.sameValue(c.℘(1), 1);
+assert.sameValue(c.ZW_‌_NJ(1), 1);
+assert.sameValue(c.ZW_‍_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-literal-names-asi.js b/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-literal-names-asi.js
new file mode 100644
index 0000000000..18a29a486f
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-literal-names-asi.js
@@ -0,0 +1,100 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/literal-names-asi.case
+// - src/class-elements/productions/cls-decl-multiple-stacked-definitions.template
+/*---
+description: Literal property names with ASI (multiple stacked fields definitions through ASI)
+esid: prod-FieldDefinition
+features: [class-fields-public, class]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement:
+ ...
+ FieldDefinition ;
+
+ FieldDefinition:
+ ClassElementName Initializer_opt
+
+ ClassElementName:
+ PropertyName
+
+---*/
+
+
+class C {
+ a
+ b = 42;
+ foo = "foobar"
+ bar = "barbaz";
+
+}
+
+var c = new C();
+
+assert.sameValue(c.foo, "foobar");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "foo"),
+ "foo doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "foo"),
+ "foo doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "foo", {
+ value: "foobar",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.bar, "barbaz");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "bar"),
+ "bar doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "bar"),
+ "bar doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "bar", {
+ value: "barbaz",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "a"),
+ "a doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "a"),
+ "a doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "a", {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "b"),
+ "b doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "b"),
+ "b doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "b", {
+ value: 42,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-literal-names.js b/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-literal-names.js
new file mode 100644
index 0000000000..24d02c0387
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-literal-names.js
@@ -0,0 +1,119 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/literal-names.case
+// - src/class-elements/productions/cls-decl-multiple-stacked-definitions.template
+/*---
+description: Literal property names (multiple stacked fields definitions through ASI)
+esid: prod-FieldDefinition
+features: [class-fields-public, class]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement:
+ ...
+ FieldDefinition ;
+
+ FieldDefinition:
+ ClassElementName Initializer_opt
+
+ ClassElementName:
+ PropertyName
+
+---*/
+const fn = function() {}
+
+
+
+class C {
+ a; b = 42;
+ c = fn
+ foo = "foobar"
+ bar = "barbaz";
+
+}
+
+var c = new C();
+
+assert.sameValue(c.foo, "foobar");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "foo"),
+ "foo doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "foo"),
+ "foo doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "foo", {
+ value: "foobar",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.bar, "barbaz");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "bar"),
+ "bar doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "bar"),
+ "bar doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "bar", {
+ value: "barbaz",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "a"),
+ "a doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "a"),
+ "a doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "a", {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "b"),
+ "b doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "b"),
+ "b doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "b", {
+ value: 42,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "c"),
+ "c doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "c"),
+ "c doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "c", {
+ value: fn,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-private-field-usage.js b/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-private-field-usage.js
new file mode 100644
index 0000000000..924a3e50bc
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-private-field-usage.js
@@ -0,0 +1,72 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-field-usage.case
+// - src/class-elements/productions/cls-decl-multiple-stacked-definitions.template
+/*---
+description: PrivateName CallExpression usage (private field) (multiple stacked fields definitions through ASI)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ Updated Productions
+
+ CallExpression[Yield, Await]:
+ CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+ SuperCall[?Yield, ?Await]
+ CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+ CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+ CallExpression[?Yield, ?Await].IdentifierName
+ CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+ CallExpression[?Yield, ?Await].PrivateName
+
+---*/
+
+
+class C {
+ #m = 'test262';
+ foo = "foobar"
+ bar = "barbaz";
+ method() {
+ return this.#m;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.foo, "foobar");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "foo"),
+ "foo doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "foo"),
+ "foo doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "foo", {
+ value: "foobar",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.bar, "barbaz");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "bar"),
+ "bar doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "bar"),
+ "bar doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "bar", {
+ value: "barbaz",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.method(), 'test262');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-private-method-getter-usage.js b/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-private-method-getter-usage.js
new file mode 100644
index 0000000000..852b25356f
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-private-method-getter-usage.js
@@ -0,0 +1,72 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-method-getter-usage.case
+// - src/class-elements/productions/cls-decl-multiple-stacked-definitions.template
+/*---
+description: PrivateName CallExpression usage (Accesor get method) (multiple stacked fields definitions through ASI)
+esid: prod-FieldDefinition
+features: [class-methods-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ Updated Productions
+
+ CallExpression[Yield, Await]:
+ CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+ SuperCall[?Yield, ?Await]
+ CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+ CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+ CallExpression[?Yield, ?Await].IdentifierName
+ CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+ CallExpression[?Yield, ?Await].PrivateName
+
+---*/
+
+
+class C {
+ get #m() { return 'test262'; }
+ foo = "foobar"
+ bar = "barbaz";
+ method() {
+ return this.#m;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.foo, "foobar");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "foo"),
+ "foo doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "foo"),
+ "foo doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "foo", {
+ value: "foobar",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.bar, "barbaz");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "bar"),
+ "bar doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "bar"),
+ "bar doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "bar", {
+ value: "barbaz",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.method(), 'test262');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-private-method-usage.js b/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-private-method-usage.js
new file mode 100644
index 0000000000..5a14646ea9
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-private-method-usage.js
@@ -0,0 +1,72 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-method-usage.case
+// - src/class-elements/productions/cls-decl-multiple-stacked-definitions.template
+/*---
+description: PrivateName CallExpression usage (private method) (multiple stacked fields definitions through ASI)
+esid: prod-FieldDefinition
+features: [class-methods-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ Updated Productions
+
+ CallExpression[Yield, Await]:
+ CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+ SuperCall[?Yield, ?Await]
+ CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+ CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+ CallExpression[?Yield, ?Await].IdentifierName
+ CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+ CallExpression[?Yield, ?Await].PrivateName
+
+---*/
+
+
+class C {
+ #m() { return 'test262'; }
+ foo = "foobar"
+ bar = "barbaz";
+ method() {
+ return this.#m();
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.foo, "foobar");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "foo"),
+ "foo doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "foo"),
+ "foo doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "foo", {
+ value: "foobar",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.bar, "barbaz");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "bar"),
+ "bar doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "bar"),
+ "bar doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "bar", {
+ value: "barbaz",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.method(), 'test262');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-private-names.js b/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-private-names.js
new file mode 100644
index 0000000000..84db117fb4
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-private-names.js
@@ -0,0 +1,94 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-names.case
+// - src/class-elements/productions/cls-decl-multiple-stacked-definitions.template
+/*---
+description: private names (multiple stacked fields definitions through ASI)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ FieldDefinition ;
+
+ FieldDefinition :
+ ClassElementName Initializer_opt
+
+ ClassElementName :
+ PrivateName
+
+ PrivateName :
+ # IdentifierName
+
+---*/
+
+
+class C {
+ #x; #y
+ foo = "foobar"
+ bar = "barbaz";
+ x() {
+ this.#x = 42;
+ return this.#x;
+ }
+ y() {
+ this.#y = 43;
+ return this.#y;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.foo, "foobar");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "foo"),
+ "foo doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "foo"),
+ "foo doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "foo", {
+ value: "foobar",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.bar, "barbaz");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "bar"),
+ "bar doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "bar"),
+ "bar doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "bar", {
+ value: "barbaz",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+// Test the private fields do not appear as properties before set to value
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#x"), "test 1");
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 2");
+assert(!Object.prototype.hasOwnProperty.call(c, "#x"), "test 3");
+
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#y"), "test 4");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 5");
+assert(!Object.prototype.hasOwnProperty.call(c, "#y"), "test 6");
+
+// Test if private fields can be sucessfully accessed and set to value
+assert.sameValue(c.x(), 42, "test 7");
+assert.sameValue(c.y(), 43, "test 8");
+
+// Test the private fields do not appear as properties before after set to value
+assert(!Object.prototype.hasOwnProperty.call(c, "#x"), "test 9");
+assert(!Object.prototype.hasOwnProperty.call(c, "#y"), "test 10");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-field-identifier-initializer.js b/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-field-identifier-initializer.js
new file mode 100644
index 0000000000..533d2babf1
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-field-identifier-initializer.js
@@ -0,0 +1,110 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-field-identifier-initializer.case
+// - src/class-elements/productions/cls-decl-multiple-stacked-definitions.template
+/*---
+description: Valid FieldDefinition (multiple stacked fields definitions through ASI)
+esid: prod-FieldDefinition
+features: [class-fields-public, class]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+
+ PropertyName :
+ LiteralPropertyName
+ ComputedPropertyName
+
+ LiteralPropertyName :
+ IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ $ = 1; _ = 1; \u{6F} = 1; \u2118 = 1; ZW_\u200C_NJ = 1; ZW_\u200D_J = 1
+ foo = "foobar"
+ bar = "barbaz";
+
+}
+
+var c = new C();
+
+assert.sameValue(c.foo, "foobar");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "foo"),
+ "foo doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "foo"),
+ "foo doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "foo", {
+ value: "foobar",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.bar, "barbaz");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "bar"),
+ "bar doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "bar"),
+ "bar doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "bar", {
+ value: "barbaz",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$, 1);
+assert.sameValue(c._, 1);
+assert.sameValue(c.\u{6F}, 1);
+assert.sameValue(c.\u2118, 1);
+assert.sameValue(c.ZW_\u200C_NJ, 1);
+assert.sameValue(c.ZW_\u200D_J, 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-field-identifier.js b/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-field-identifier.js
new file mode 100644
index 0000000000..b374d79f0c
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-field-identifier.js
@@ -0,0 +1,117 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-field-identifier.case
+// - src/class-elements/productions/cls-decl-multiple-stacked-definitions.template
+/*---
+description: Valid FieldDefinition (multiple stacked fields definitions through ASI)
+esid: prod-FieldDefinition
+features: [class-fields-public, class]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+
+ PropertyName :
+ LiteralPropertyName
+ ComputedPropertyName
+
+ LiteralPropertyName :
+ IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ $; _; \u{6F}; \u2118; ZW_\u200C_NJ; ZW_\u200D_J
+ foo = "foobar"
+ bar = "barbaz";
+
+}
+
+var c = new C();
+
+assert.sameValue(c.foo, "foobar");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "foo"),
+ "foo doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "foo"),
+ "foo doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "foo", {
+ value: "foobar",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.bar, "barbaz");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "bar"),
+ "bar doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "bar"),
+ "bar doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "bar", {
+ value: "barbaz",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+c.$ = 1;
+c._ = 1;
+c.\u{6F} = 1;
+c.\u2118 = 1;
+c.ZW_\u200C_NJ = 1;
+c.ZW_\u200D_J = 1;
+
+assert.sameValue(c.$, 1);
+assert.sameValue(c._, 1);
+assert.sameValue(c.\u{6F}, 1);
+assert.sameValue(c.\u2118, 1);
+assert.sameValue(c.ZW_\u200C_NJ, 1);
+assert.sameValue(c.ZW_\u200D_J, 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-private-getter-alt.js b/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-private-getter-alt.js
new file mode 100644
index 0000000000..b7f773d106
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-private-getter-alt.js
@@ -0,0 +1,151 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-getter-alt.case
+// - src/class-elements/productions/cls-decl-multiple-stacked-definitions.template
+/*---
+description: Valid PrivateName as private getter (multiple stacked fields definitions through ASI)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ...
+ get ClassElementName ( ){ FunctionBody }
+ ...
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ #$_; #__; #\u{6F}_; #℘_; #ZW_‌_NJ_; #ZW_‍_J_;
+ get #$() {
+ return this.#$_;
+ }
+ get #_() {
+ return this.#__;
+ }
+ get #\u{6F}() {
+ return this.#\u{6F}_;
+ }
+ get #℘() {
+ return this.#℘_;
+ }
+ get #ZW_‌_NJ() {
+ return this.#ZW_‌_NJ_;
+ }
+ get #ZW_‍_J() {
+ return this.#ZW_‍_J_;
+ }
+
+ foo = "foobar"
+ bar = "barbaz";
+ $(value) {
+ this.#$_ = value;
+ return this.#$;
+ }
+ _(value) {
+ this.#__ = value;
+ return this.#_;
+ }
+ \u{6F}(value) {
+ this.#\u{6F}_ = value;
+ return this.#\u{6F};
+ }
+ ℘(value) {
+ this.#℘_ = value;
+ return this.#℘;
+ }
+ ZW_‌_NJ(value) {
+ this.#ZW_‌_NJ_ = value;
+ return this.#ZW_‌_NJ;
+ }
+ ZW_‍_J(value) {
+ this.#ZW_‍_J_ = value;
+ return this.#ZW_‍_J;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.foo, "foobar");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "foo"),
+ "foo doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "foo"),
+ "foo doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "foo", {
+ value: "foobar",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.bar, "barbaz");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "bar"),
+ "bar doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "bar"),
+ "bar doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "bar", {
+ value: "barbaz",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.℘(1), 1);
+assert.sameValue(c.ZW_‌_NJ(1), 1);
+assert.sameValue(c.ZW_‍_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-private-getter.js b/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-private-getter.js
new file mode 100644
index 0000000000..48445c7ee5
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-private-getter.js
@@ -0,0 +1,151 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-getter.case
+// - src/class-elements/productions/cls-decl-multiple-stacked-definitions.template
+/*---
+description: Valid PrivateName as private getter (multiple stacked fields definitions through ASI)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ...
+ get ClassElementName ( ){ FunctionBody }
+ ...
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ #$_; #__; #\u{6F}_; #\u2118_; #ZW_\u200C_NJ_; #ZW_\u200D_J_;
+ get #$() {
+ return this.#$_;
+ }
+ get #_() {
+ return this.#__;
+ }
+ get #\u{6F}() {
+ return this.#\u{6F}_;
+ }
+ get #\u2118() {
+ return this.#\u2118_;
+ }
+ get #ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ_;
+ }
+ get #ZW_\u200D_J() {
+ return this.#ZW_\u200D_J_;
+ }
+
+ foo = "foobar"
+ bar = "barbaz";
+ $(value) {
+ this.#$_ = value;
+ return this.#$;
+ }
+ _(value) {
+ this.#__ = value;
+ return this.#_;
+ }
+ \u{6F}(value) {
+ this.#\u{6F}_ = value;
+ return this.#\u{6F};
+ }
+ \u2118(value) {
+ this.#\u2118_ = value;
+ return this.#\u2118;
+ }
+ ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ_ = value;
+ return this.#ZW_\u200C_NJ;
+ }
+ ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J_ = value;
+ return this.#ZW_\u200D_J;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.foo, "foobar");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "foo"),
+ "foo doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "foo"),
+ "foo doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "foo", {
+ value: "foobar",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.bar, "barbaz");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "bar"),
+ "bar doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "bar"),
+ "bar doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "bar", {
+ value: "barbaz",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.\u2118(1), 1);
+assert.sameValue(c.ZW_\u200C_NJ(1), 1);
+assert.sameValue(c.ZW_\u200D_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-private-method-alt.js b/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-private-method-alt.js
new file mode 100644
index 0000000000..748cf0bee8
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-private-method-alt.js
@@ -0,0 +1,150 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-method-alt.case
+// - src/class-elements/productions/cls-decl-multiple-stacked-definitions.template
+/*---
+description: Valid PrivateName as private method (multiple stacked fields definitions through ASI)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ClassElementName ( UniqueFormalParameters ) { FunctionBody }
+ ...
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ #$_; #__; #\u{6F}_; #℘_; #ZW_‌_NJ_; #ZW_‍_J_;
+ #$() {
+ return this.#$_;
+ }
+ #_() {
+ return this.#__;
+ }
+ #\u{6F}() {
+ return this.#\u{6F}_;
+ }
+ #℘() {
+ return this.#℘_;
+ }
+ #ZW_‌_NJ() {
+ return this.#ZW_‌_NJ_;
+ }
+ #ZW_‍_J() {
+ return this.#ZW_‍_J_;
+ }
+
+ foo = "foobar"
+ bar = "barbaz";
+ $(value) {
+ this.#$_ = value;
+ return this.#$();
+ }
+ _(value) {
+ this.#__ = value;
+ return this.#_();
+ }
+ \u{6F}(value) {
+ this.#\u{6F}_ = value;
+ return this.#\u{6F}();
+ }
+ ℘(value) {
+ this.#℘_ = value;
+ return this.#℘();
+ }
+ ZW_‌_NJ(value) {
+ this.#ZW_‌_NJ_ = value;
+ return this.#ZW_‌_NJ();
+ }
+ ZW_‍_J(value) {
+ this.#ZW_‍_J_ = value;
+ return this.#ZW_‍_J();
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.foo, "foobar");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "foo"),
+ "foo doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "foo"),
+ "foo doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "foo", {
+ value: "foobar",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.bar, "barbaz");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "bar"),
+ "bar doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "bar"),
+ "bar doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "bar", {
+ value: "barbaz",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.℘(1), 1);
+assert.sameValue(c.ZW_‌_NJ(1), 1);
+assert.sameValue(c.ZW_‍_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-private-method.js b/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-private-method.js
new file mode 100644
index 0000000000..a73cd7cae0
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-private-method.js
@@ -0,0 +1,150 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-method.case
+// - src/class-elements/productions/cls-decl-multiple-stacked-definitions.template
+/*---
+description: Valid PrivateName as private method (multiple stacked fields definitions through ASI)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ClassElementName ( UniqueFormalParameters ) { FunctionBody }
+ ...
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ #$_; #__; #\u{6F}_; #\u2118_; #ZW_\u200C_NJ_; #ZW_\u200D_J_;
+ #$() {
+ return this.#$_;
+ }
+ #_() {
+ return this.#__;
+ }
+ #\u{6F}() {
+ return this.#\u{6F}_;
+ }
+ #\u2118() {
+ return this.#\u2118_;
+ }
+ #ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ_;
+ }
+ #ZW_\u200D_J() {
+ return this.#ZW_\u200D_J_;
+ }
+
+ foo = "foobar"
+ bar = "barbaz";
+ $(value) {
+ this.#$_ = value;
+ return this.#$();
+ }
+ _(value) {
+ this.#__ = value;
+ return this.#_();
+ }
+ \u{6F}(value) {
+ this.#\u{6F}_ = value;
+ return this.#\u{6F}();
+ }
+ \u2118(value) {
+ this.#\u2118_ = value;
+ return this.#\u2118();
+ }
+ ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ_ = value;
+ return this.#ZW_\u200C_NJ();
+ }
+ ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J_ = value;
+ return this.#ZW_\u200D_J();
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.foo, "foobar");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "foo"),
+ "foo doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "foo"),
+ "foo doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "foo", {
+ value: "foobar",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.bar, "barbaz");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "bar"),
+ "bar doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "bar"),
+ "bar doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "bar", {
+ value: "barbaz",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.\u2118(1), 1);
+assert.sameValue(c.ZW_\u200C_NJ(1), 1);
+assert.sameValue(c.ZW_\u200D_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-private-setter-alt.js b/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-private-setter-alt.js
new file mode 100644
index 0000000000..06ba60b3aa
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-private-setter-alt.js
@@ -0,0 +1,150 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-setter-alt.case
+// - src/class-elements/productions/cls-decl-multiple-stacked-definitions.template
+/*---
+description: Valid PrivateName as private setter (multiple stacked fields definitions through ASI)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ...
+ set ClassElementName ( PropertySetParameterList ) { FunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ #$_; #__; #\u{6F}_; #℘_; #ZW_‌_NJ_; #ZW_‍_J_;
+ set #$(value) {
+ this.#$_ = value;
+ }
+ set #_(value) {
+ this.#__ = value;
+ }
+ set #\u{6F}(value) {
+ this.#\u{6F}_ = value;
+ }
+ set #℘(value) {
+ this.#℘_ = value;
+ }
+ set #ZW_‌_NJ(value) {
+ this.#ZW_‌_NJ_ = value;
+ }
+ set #ZW_‍_J(value) {
+ this.#ZW_‍_J_ = value;
+ }
+
+ foo = "foobar"
+ bar = "barbaz";
+ $(value) {
+ this.#$ = value;
+ return this.#$_;
+ }
+ _(value) {
+ this.#_ = value;
+ return this.#__;
+ }
+ \u{6F}(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F}_;
+ }
+ ℘(value) {
+ this.#℘ = value;
+ return this.#℘_;
+ }
+ ZW_‌_NJ(value) {
+ this.#ZW_‌_NJ = value;
+ return this.#ZW_‌_NJ_;
+ }
+ ZW_‍_J(value) {
+ this.#ZW_‍_J = value;
+ return this.#ZW_‍_J_;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.foo, "foobar");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "foo"),
+ "foo doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "foo"),
+ "foo doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "foo", {
+ value: "foobar",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.bar, "barbaz");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "bar"),
+ "bar doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "bar"),
+ "bar doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "bar", {
+ value: "barbaz",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.℘(1), 1);
+assert.sameValue(c.ZW_‌_NJ(1), 1);
+assert.sameValue(c.ZW_‍_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-private-setter.js b/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-private-setter.js
new file mode 100644
index 0000000000..1e148929e7
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-private-setter.js
@@ -0,0 +1,150 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-setter.case
+// - src/class-elements/productions/cls-decl-multiple-stacked-definitions.template
+/*---
+description: Valid PrivateName as private setter (multiple stacked fields definitions through ASI)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ...
+ set ClassElementName ( PropertySetParameterList ) { FunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ #$_; #__; #\u{6F}_; #\u2118_; #ZW_\u200C_NJ_; #ZW_\u200D_J_;
+ set #$(value) {
+ this.#$_ = value;
+ }
+ set #_(value) {
+ this.#__ = value;
+ }
+ set #\u{6F}(value) {
+ this.#\u{6F}_ = value;
+ }
+ set #\u2118(value) {
+ this.#\u2118_ = value;
+ }
+ set #ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ_ = value;
+ }
+ set #ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J_ = value;
+ }
+
+ foo = "foobar"
+ bar = "barbaz";
+ $(value) {
+ this.#$ = value;
+ return this.#$_;
+ }
+ _(value) {
+ this.#_ = value;
+ return this.#__;
+ }
+ \u{6F}(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F}_;
+ }
+ \u2118(value) {
+ this.#\u2118 = value;
+ return this.#\u2118_;
+ }
+ ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ = value;
+ return this.#ZW_\u200C_NJ_;
+ }
+ ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J = value;
+ return this.#ZW_\u200D_J_;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.foo, "foobar");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "foo"),
+ "foo doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "foo"),
+ "foo doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "foo", {
+ value: "foobar",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.bar, "barbaz");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "bar"),
+ "bar doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "bar"),
+ "bar doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "bar", {
+ value: "barbaz",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.\u2118(1), 1);
+assert.sameValue(c.ZW_\u200C_NJ(1), 1);
+assert.sameValue(c.ZW_\u200D_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-privatename-identifier-alt.js
new file mode 100644
index 0000000000..b091d5ae3d
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-privatename-identifier-alt.js
@@ -0,0 +1,132 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-multiple-stacked-definitions.template
+/*---
+description: Valid PrivateName (multiple stacked fields definitions through ASI)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ #$; #_; #\u{6F}; #℘; #ZW_‌_NJ; #ZW_‍_J
+ foo = "foobar"
+ bar = "barbaz";
+ $(value) {
+ this.#$ = value;
+ return this.#$;
+ }
+ _(value) {
+ this.#_ = value;
+ return this.#_;
+ }
+ \u{6F}(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F};
+ }
+ ℘(value) {
+ this.#℘ = value;
+ return this.#℘;
+ }
+ ZW_‌_NJ(value) {
+ this.#ZW_‌_NJ = value;
+ return this.#ZW_‌_NJ;
+ }
+ ZW_‍_J(value) {
+ this.#ZW_‍_J = value;
+ return this.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.foo, "foobar");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "foo"),
+ "foo doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "foo"),
+ "foo doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "foo", {
+ value: "foobar",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.bar, "barbaz");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "bar"),
+ "bar doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "bar"),
+ "bar doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "bar", {
+ value: "barbaz",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.℘(1), 1);
+assert.sameValue(c.ZW_‌_NJ(1), 1);
+assert.sameValue(c.ZW_‍_J(1), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-privatename-identifier-initializer-alt.js b/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-privatename-identifier-initializer-alt.js
new file mode 100644
index 0000000000..e9ad66b790
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-privatename-identifier-initializer-alt.js
@@ -0,0 +1,126 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-privatename-identifier-initializer-alt.case
+// - src/class-elements/productions/cls-decl-multiple-stacked-definitions.template
+/*---
+description: Valid PrivateName (multiple stacked fields definitions through ASI)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ #$ = 1; #_ = 1; #\u{6F} = 1; #℘ = 1; #ZW_‌_NJ = 1; #ZW_‍_J = 1
+ foo = "foobar"
+ bar = "barbaz";
+ $() {
+ return this.#$;
+ }
+ _() {
+ return this.#_;
+ }
+ \u{6F}() {
+ return this.#\u{6F};
+ }
+ ℘() {
+ return this.#℘;
+ }
+ ZW_‌_NJ() {
+ return this.#ZW_‌_NJ;
+ }
+ ZW_‍_J() {
+ return this.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.foo, "foobar");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "foo"),
+ "foo doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "foo"),
+ "foo doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "foo", {
+ value: "foobar",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.bar, "barbaz");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "bar"),
+ "bar doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "bar"),
+ "bar doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "bar", {
+ value: "barbaz",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(), 1);
+assert.sameValue(c._(), 1);
+assert.sameValue(c.\u{6F}(), 1);
+assert.sameValue(c.℘(), 1);
+assert.sameValue(c.ZW_‌_NJ(), 1);
+assert.sameValue(c.ZW_‍_J(), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-privatename-identifier-initializer.js b/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-privatename-identifier-initializer.js
new file mode 100644
index 0000000000..d492a9b06f
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-privatename-identifier-initializer.js
@@ -0,0 +1,126 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-privatename-identifier-initializer.case
+// - src/class-elements/productions/cls-decl-multiple-stacked-definitions.template
+/*---
+description: Valid PrivateName (multiple stacked fields definitions through ASI)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ #$ = 1; #_ = 1; #\u{6F} = 1; #\u2118 = 1; #ZW_\u200C_NJ = 1; #ZW_\u200D_J = 1
+ foo = "foobar"
+ bar = "barbaz";
+ $() {
+ return this.#$;
+ }
+ _() {
+ return this.#_;
+ }
+ \u{6F}() {
+ return this.#\u{6F};
+ }
+ \u2118() {
+ return this.#\u2118;
+ }
+ ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ;
+ }
+ ZW_\u200D_J() {
+ return this.#ZW_\u200D_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.foo, "foobar");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "foo"),
+ "foo doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "foo"),
+ "foo doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "foo", {
+ value: "foobar",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.bar, "barbaz");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "bar"),
+ "bar doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "bar"),
+ "bar doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "bar", {
+ value: "barbaz",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(), 1);
+assert.sameValue(c._(), 1);
+assert.sameValue(c.\u{6F}(), 1);
+assert.sameValue(c.\u2118(), 1);
+assert.sameValue(c.ZW_\u200C_NJ(), 1);
+assert.sameValue(c.ZW_\u200D_J(), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-privatename-identifier.js
new file mode 100644
index 0000000000..750081b1a2
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-privatename-identifier.js
@@ -0,0 +1,132 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-multiple-stacked-definitions.template
+/*---
+description: Valid PrivateName (multiple stacked fields definitions through ASI)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ #$; #_; #\u{6F}; #\u2118; #ZW_\u200C_NJ; #ZW_\u200D_J
+ foo = "foobar"
+ bar = "barbaz";
+ $(value) {
+ this.#$ = value;
+ return this.#$;
+ }
+ _(value) {
+ this.#_ = value;
+ return this.#_;
+ }
+ \u{6F}(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F};
+ }
+ \u2118(value) {
+ this.#\u2118 = value;
+ return this.#\u2118;
+ }
+ ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ = value;
+ return this.#ZW_\u200C_NJ;
+ }
+ ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J = value;
+ return this.#ZW_\u200D_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.foo, "foobar");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "foo"),
+ "foo doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "foo"),
+ "foo doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "foo", {
+ value: "foobar",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.bar, "barbaz");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "bar"),
+ "bar doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "bar"),
+ "bar doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "bar", {
+ value: "barbaz",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.\u2118(1), 1);
+assert.sameValue(c.ZW_\u200C_NJ(1), 1);
+assert.sameValue(c.ZW_\u200D_J(1), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-static-async-generator-method-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-static-async-generator-method-privatename-identifier-alt.js
new file mode 100644
index 0000000000..8acf08510e
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-static-async-generator-method-privatename-identifier-alt.js
@@ -0,0 +1,157 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-async-generator-method-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-multiple-stacked-definitions.template
+/*---
+description: Valid Static AsyncGeneratorMethod PrivateName (multiple stacked fields definitions through ASI)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static async * #$(value) {
+ yield * await value;
+ }
+ static async * #_(value) {
+ yield * await value;
+ }
+ static async * #o(value) {
+ yield * await value;
+ }
+ static async * #℘(value) {
+ yield * await value;
+ }
+ static async * #ZW_‌_NJ(value) {
+ yield * await value;
+ }
+ static async * #ZW_‍_J(value) {
+ yield * await value;
+ }
+ foo = "foobar"
+ bar = "barbaz";
+ static get $() {
+ return this.#$;
+ }
+ static get _() {
+ return this.#_;
+ }
+ static get o() {
+ return this.#o;
+ }
+ static get ℘() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#℘;
+ }
+ static get ZW_‌_NJ() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‌_NJ;
+ }
+ static get ZW_‍_J() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‍_J;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.foo, "foobar");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "foo"),
+ "foo doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "foo"),
+ "foo doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "foo", {
+ value: "foobar",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.bar, "barbaz");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "bar"),
+ "bar doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "bar"),
+ "bar doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "bar", {
+ value: "barbaz",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+Promise.all([
+ C.$([1]).next(),
+ C._([1]).next(),
+ C.o([1]).next(),
+ C.℘([1]).next(), // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.ZW_‌_NJ([1]).next(), // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.ZW_‍_J([1]).next(), // DO NOT CHANGE THE NAME OF THIS FIELD
+]).then(results => {
+
+ assert.sameValue(results[0].value, 1);
+ assert.sameValue(results[1].value, 1);
+ assert.sameValue(results[2].value, 1);
+ assert.sameValue(results[3].value, 1);
+ assert.sameValue(results[4].value, 1);
+ assert.sameValue(results[5].value, 1);
+
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-static-async-generator-method-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-static-async-generator-method-privatename-identifier.js
new file mode 100644
index 0000000000..f70868376a
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-static-async-generator-method-privatename-identifier.js
@@ -0,0 +1,158 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-async-generator-method-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-multiple-stacked-definitions.template
+/*---
+description: Valid Static AsyncGeneratorMethod PrivateName (multiple stacked fields definitions through ASI)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static async * #$(value) {
+ yield * await value;
+ }
+ static async * #_(value) {
+ yield * await value;
+ }
+ static async * #\u{6F}(value) {
+ yield * await value;
+ }
+ static async * #\u2118(value) {
+ yield * await value;
+ }
+ static async * #ZW_\u200C_NJ(value) {
+ yield * await value;
+ }
+ static async * #ZW_\u200D_J(value) {
+ yield * await value;
+ }
+ foo = "foobar"
+ bar = "barbaz";
+ static get $() {
+ return this.#$;
+ }
+ static get _() {
+ return this.#_;
+ }
+ static get \u{6F}() {
+ return this.#\u{6F};
+ }
+ static get \u2118() {
+ return this.#\u2118;
+ }
+ static get ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ;
+ }
+ static get ZW_\u200D_J() {
+ return this.#ZW_\u200D_J;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.foo, "foobar");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "foo"),
+ "foo doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "foo"),
+ "foo doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "foo", {
+ value: "foobar",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.bar, "barbaz");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "bar"),
+ "bar doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "bar"),
+ "bar doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "bar", {
+ value: "barbaz",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+Promise.all([
+ C.$([1]).next(),
+ C._([1]).next(),
+ C.\u{6F}([1]).next(),
+ C.\u2118([1]).next(),
+ C.ZW_\u200C_NJ([1]).next(),
+ C.ZW_\u200D_J([1]).next(),
+]).then(results => {
+
+ assert.sameValue(results[0].value, 1);
+ assert.sameValue(results[1].value, 1);
+ assert.sameValue(results[2].value, 1);
+ assert.sameValue(results[3].value, 1);
+ assert.sameValue(results[4].value, 1);
+ assert.sameValue(results[5].value, 1);
+
+}).then($DONE, $DONE);
+
diff --git a/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-static-async-method-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-static-async-method-privatename-identifier-alt.js
new file mode 100644
index 0000000000..32a2350244
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-static-async-method-privatename-identifier-alt.js
@@ -0,0 +1,157 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-async-method-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-multiple-stacked-definitions.template
+/*---
+description: Valid Static AsyncMethod PrivateName (multiple stacked fields definitions through ASI)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ AsyncMethod
+
+ AsyncMethod :
+ async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static async #$(value) {
+ return await value;
+ }
+ static async #_(value) {
+ return await value;
+ }
+ static async #o(value) {
+ return await value;
+ }
+ static async #℘(value) {
+ return await value;
+ }
+ static async #ZW_‌_NJ(value) {
+ return await value;
+ }
+ static async #ZW_‍_J(value) {
+ return await value;
+ }
+ foo = "foobar"
+ bar = "barbaz";
+ static async $(value) {
+ return await this.#$(value);
+ }
+ static async _(value) {
+ return await this.#_(value);
+ }
+ static async o(value) {
+ return await this.#o(value);
+ }
+ static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return await this.#℘(value);
+ }
+ static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return await this.#ZW_‌_NJ(value);
+ }
+ static async ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return await this.#ZW_‍_J(value);
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.foo, "foobar");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "foo"),
+ "foo doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "foo"),
+ "foo doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "foo", {
+ value: "foobar",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.bar, "barbaz");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "bar"),
+ "bar doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "bar"),
+ "bar doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "bar", {
+ value: "barbaz",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+Promise.all([
+ C.$(1),
+ C._(1),
+ C.o(1),
+ C.℘(1), // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.ZW_‌_NJ(1), // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.ZW_‍_J(1), // DO NOT CHANGE THE NAME OF THIS FIELD
+]).then(results => {
+
+ assert.sameValue(results[0], 1);
+ assert.sameValue(results[1], 1);
+ assert.sameValue(results[2], 1);
+ assert.sameValue(results[3], 1);
+ assert.sameValue(results[4], 1);
+ assert.sameValue(results[5], 1);
+
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-static-async-method-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-static-async-method-privatename-identifier.js
new file mode 100644
index 0000000000..376984d386
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-static-async-method-privatename-identifier.js
@@ -0,0 +1,158 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-async-method-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-multiple-stacked-definitions.template
+/*---
+description: Valid Static AsyncMethod PrivateName (multiple stacked fields definitions through ASI)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ AsyncMethod
+
+ AsyncMethod :
+ async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static async #$(value) {
+ return await value;
+ }
+ static async #_(value) {
+ return await value;
+ }
+ static async #\u{6F}(value) {
+ return await value;
+ }
+ static async #\u2118(value) {
+ return await value;
+ }
+ static async #ZW_\u200C_NJ(value) {
+ return await value;
+ }
+ static async #ZW_\u200D_J(value) {
+ return await value;
+ }
+ foo = "foobar"
+ bar = "barbaz";
+ static async $(value) {
+ return await this.#$(value);
+ }
+ static async _(value) {
+ return await this.#_(value);
+ }
+ static async \u{6F}(value) {
+ return await this.#\u{6F}(value);
+ }
+ static async \u2118(value) {
+ return await this.#\u2118(value);
+ }
+ static async ZW_\u200C_NJ(value) {
+ return await this.#ZW_\u200C_NJ(value);
+ }
+ static async ZW_\u200D_J(value) {
+ return await this.#ZW_\u200D_J(value);
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.foo, "foobar");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "foo"),
+ "foo doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "foo"),
+ "foo doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "foo", {
+ value: "foobar",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.bar, "barbaz");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "bar"),
+ "bar doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "bar"),
+ "bar doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "bar", {
+ value: "barbaz",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+Promise.all([
+ C.$(1),
+ C._(1),
+ C.\u{6F}(1),
+ C.\u2118(1),
+ C.ZW_\u200C_NJ(1),
+ C.ZW_\u200D_J(1),
+]).then(results => {
+
+ assert.sameValue(results[0], 1);
+ assert.sameValue(results[1], 1);
+ assert.sameValue(results[2], 1);
+ assert.sameValue(results[3], 1);
+ assert.sameValue(results[4], 1);
+ assert.sameValue(results[5], 1);
+
+}).then($DONE, $DONE);
+
diff --git a/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-static-generator-method-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-static-generator-method-privatename-identifier-alt.js
new file mode 100644
index 0000000000..3e03c04c06
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-static-generator-method-privatename-identifier-alt.js
@@ -0,0 +1,147 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-generator-method-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-multiple-stacked-definitions.template
+/*---
+description: Valid Static GeneratorMethod PrivateName (multiple stacked fields definitions through ASI)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ GeneratorMethod
+
+ GeneratorMethod :
+ * ClassElementName ( UniqueFormalParameters ){ GeneratorBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static * #$(value) {
+ yield * value;
+ }
+ static * #_(value) {
+ yield * value;
+ }
+ static * #o(value) {
+ yield * value;
+ }
+ static * #℘(value) {
+ yield * value;
+ }
+ static * #ZW_‌_NJ(value) {
+ yield * value;
+ }
+ static * #ZW_‍_J(value) {
+ yield * value;
+ }
+ foo = "foobar"
+ bar = "barbaz";
+ static get $() {
+ return this.#$;
+ }
+ static get _() {
+ return this.#_;
+ }
+ static get o() {
+ return this.#o;
+ }
+ static get ℘() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#℘;
+ }
+ static get ZW_‌_NJ() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‌_NJ;
+ }
+ static get ZW_‍_J() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‍_J;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.foo, "foobar");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "foo"),
+ "foo doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "foo"),
+ "foo doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "foo", {
+ value: "foobar",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.bar, "barbaz");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "bar"),
+ "bar doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "bar"),
+ "bar doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "bar", {
+ value: "barbaz",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$([1]).next().value, 1);
+assert.sameValue(C._([1]).next().value, 1);
+assert.sameValue(C.o([1]).next().value, 1);
+assert.sameValue(C.℘([1]).next().value, 1);
+assert.sameValue(C.ZW_‌_NJ([1]).next().value, 1);
+assert.sameValue(C.ZW_‍_J([1]).next().value, 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-static-generator-method-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-static-generator-method-privatename-identifier.js
new file mode 100644
index 0000000000..35b1823259
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-static-generator-method-privatename-identifier.js
@@ -0,0 +1,148 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-generator-method-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-multiple-stacked-definitions.template
+/*---
+description: Valid Static GeneratorMethod PrivateName (multiple stacked fields definitions through ASI)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ GeneratorMethod
+
+ GeneratorMethod :
+ * ClassElementName ( UniqueFormalParameters ){ GeneratorBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static * #$(value) {
+ yield * value;
+ }
+ static * #_(value) {
+ yield * value;
+ }
+ static * #\u{6F}(value) {
+ yield * value;
+ }
+ static * #\u2118(value) {
+ yield * value;
+ }
+ static * #ZW_\u200C_NJ(value) {
+ yield * value;
+ }
+ static * #ZW_\u200D_J(value) {
+ yield * value;
+ }
+ foo = "foobar"
+ bar = "barbaz";
+ static get $() {
+ return this.#$;
+ }
+ static get _() {
+ return this.#_;
+ }
+ static get \u{6F}() {
+ return this.#\u{6F};
+ }
+ static get \u2118() {
+ return this.#\u2118;
+ }
+ static get ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ;
+ }
+ static get ZW_\u200D_J() {
+ return this.#ZW_\u200D_J;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.foo, "foobar");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "foo"),
+ "foo doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "foo"),
+ "foo doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "foo", {
+ value: "foobar",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.bar, "barbaz");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "bar"),
+ "bar doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "bar"),
+ "bar doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "bar", {
+ value: "barbaz",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$([1]).next().value, 1);
+assert.sameValue(C._([1]).next().value, 1);
+assert.sameValue(C.\u{6F}([1]).next().value, 1);
+assert.sameValue(C.\u2118([1]).next().value, 1);
+assert.sameValue(C.ZW_\u200C_NJ([1]).next().value, 1);
+assert.sameValue(C.ZW_\u200D_J([1]).next().value, 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-static-method-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-static-method-privatename-identifier-alt.js
new file mode 100644
index 0000000000..fcf9196c27
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-static-method-privatename-identifier-alt.js
@@ -0,0 +1,145 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-method-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-multiple-stacked-definitions.template
+/*---
+description: Valid Static Method PrivateName (multiple stacked fields definitions through ASI)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ ClassElementName ( UniqueFormalParameters ){ FunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static #$(value) {
+ return value;
+ }
+ static #_(value) {
+ return value;
+ }
+ static #o(value) {
+ return value;
+ }
+ static #℘(value) {
+ return value;
+ }
+ static #ZW_‌_NJ(value) {
+ return value;
+ }
+ static #ZW_‍_J(value) {
+ return value;
+ }
+ foo = "foobar"
+ bar = "barbaz";
+ static $(value) {
+ return this.#$(value);
+ }
+ static _(value) {
+ return this.#_(value);
+ }
+ static o(value) {
+ return this.#o(value);
+ }
+ static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#℘(value);
+ }
+ static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‌_NJ(value);
+ }
+ static ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‍_J(value);
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.foo, "foobar");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "foo"),
+ "foo doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "foo"),
+ "foo doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "foo", {
+ value: "foobar",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.bar, "barbaz");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "bar"),
+ "bar doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "bar"),
+ "bar doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "bar", {
+ value: "barbaz",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(1), 1);
+assert.sameValue(C._(1), 1);
+assert.sameValue(C.o(1), 1);
+assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+assert.sameValue(C.ZW_‌_NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+assert.sameValue(C.ZW_‍_J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-static-method-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-static-method-privatename-identifier.js
new file mode 100644
index 0000000000..6ac8ee35a8
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-static-method-privatename-identifier.js
@@ -0,0 +1,145 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-method-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-multiple-stacked-definitions.template
+/*---
+description: Valid Static Method PrivateName (multiple stacked fields definitions through ASI)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ ClassElementName ( UniqueFormalParameters ){ FunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static #$(value) {
+ return value;
+ }
+ static #_(value) {
+ return value;
+ }
+ static #\u{6F}(value) {
+ return value;
+ }
+ static #\u2118(value) {
+ return value;
+ }
+ static #ZW_\u200C_NJ(value) {
+ return value;
+ }
+ static #ZW_\u200D_J(value) {
+ return value;
+ }
+ foo = "foobar"
+ bar = "barbaz";
+ static $(value) {
+ return this.#$(value);
+ }
+ static _(value) {
+ return this.#_(value);
+ }
+ static \u{6F}(value) {
+ return this.#\u{6F}(value);
+ }
+ static \u2118(value) {
+ return this.#\u2118(value);
+ }
+ static ZW_\u200C_NJ(value) {
+ return this.#ZW_\u200C_NJ(value);
+ }
+ static ZW_\u200D_J(value) {
+ return this.#ZW_\u200D_J(value);
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.foo, "foobar");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "foo"),
+ "foo doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "foo"),
+ "foo doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "foo", {
+ value: "foobar",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.bar, "barbaz");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "bar"),
+ "bar doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "bar"),
+ "bar doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "bar", {
+ value: "barbaz",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(1), 1);
+assert.sameValue(C._(1), 1);
+assert.sameValue(C.\u{6F}(1), 1);
+assert.sameValue(C.\u2118(1), 1);
+assert.sameValue(C.ZW_\u200C_NJ(1), 1);
+assert.sameValue(C.ZW_\u200D_J(1), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-static-privatename-identifier-alt-by-classname.js b/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-static-privatename-identifier-alt-by-classname.js
new file mode 100644
index 0000000000..bead6c078e
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-static-privatename-identifier-alt-by-classname.js
@@ -0,0 +1,133 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-alt-by-classname.case
+// - src/class-elements/productions/cls-decl-multiple-stacked-definitions.template
+/*---
+description: Valid Static PrivateName (multiple stacked fields definitions through ASI)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_‍_J
+ foo = "foobar"
+ bar = "barbaz";
+ static $(value) {
+ C.#$ = value;
+ return C.#$;
+ }
+ static _(value) {
+ C.#_ = value;
+ return C.#_;
+ }
+ static o(value) {
+ C.#\u{6F} = value;
+ return C.#\u{6F};
+ }
+ static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.#℘ = value;
+ return C.#℘;
+ }
+ static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.#ZW_‌_NJ = value;
+ return C.#ZW_‌_NJ;
+ }
+ static ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.#ZW_‍_J = value;
+ return C.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.foo, "foobar");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "foo"),
+ "foo doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "foo"),
+ "foo doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "foo", {
+ value: "foobar",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.bar, "barbaz");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "bar"),
+ "bar doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "bar"),
+ "bar doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "bar", {
+ value: "barbaz",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(1), 1);
+assert.sameValue(C._(1), 1);
+assert.sameValue(C.o(1), 1);
+assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+assert.sameValue(C.ZW_‌_NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+assert.sameValue(C.ZW_‍_J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-static-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-static-privatename-identifier-alt.js
new file mode 100644
index 0000000000..08cc2b9518
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-static-privatename-identifier-alt.js
@@ -0,0 +1,133 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-multiple-stacked-definitions.template
+/*---
+description: Valid Static PrivateName (multiple stacked fields definitions through ASI)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_‍_J
+ foo = "foobar"
+ bar = "barbaz";
+ static $(value) {
+ this.#$ = value;
+ return this.#$;
+ }
+ static _(value) {
+ this.#_ = value;
+ return this.#_;
+ }
+ static o(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F};
+ }
+ static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ this.#℘ = value;
+ return this.#℘;
+ }
+ static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ this.#ZW_‌_NJ = value;
+ return this.#ZW_‌_NJ;
+ }
+ static ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ this.#ZW_‍_J = value;
+ return this.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.foo, "foobar");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "foo"),
+ "foo doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "foo"),
+ "foo doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "foo", {
+ value: "foobar",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.bar, "barbaz");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "bar"),
+ "bar doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "bar"),
+ "bar doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "bar", {
+ value: "barbaz",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(1), 1);
+assert.sameValue(C._(1), 1);
+assert.sameValue(C.o(1), 1);
+assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+assert.sameValue(C.ZW_‌_NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+assert.sameValue(C.ZW_‍_J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-static-privatename-identifier-by-classname.js b/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-static-privatename-identifier-by-classname.js
new file mode 100644
index 0000000000..1a2de43efb
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-static-privatename-identifier-by-classname.js
@@ -0,0 +1,133 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-by-classname.case
+// - src/class-elements/productions/cls-decl-multiple-stacked-definitions.template
+/*---
+description: Valid Static PrivateName (multiple stacked fields definitions through ASI)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J
+ foo = "foobar"
+ bar = "barbaz";
+ static $(value) {
+ C.#$ = value;
+ return C.#$;
+ }
+ static _(value) {
+ C.#_ = value;
+ return C.#_;
+ }
+ static \u{6F}(value) {
+ C.#\u{6F} = value;
+ return C.#\u{6F};
+ }
+ static \u2118(value) {
+ C.#\u2118 = value;
+ return C.#\u2118;
+ }
+ static ZW_\u200C_NJ(value) {
+ C.#ZW_\u200C_NJ = value;
+ return C.#ZW_\u200C_NJ;
+ }
+ static ZW_\u200D_J(value) {
+ C.#ZW_\u200D_J = value;
+ return C.#ZW_\u200D_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.foo, "foobar");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "foo"),
+ "foo doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "foo"),
+ "foo doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "foo", {
+ value: "foobar",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.bar, "barbaz");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "bar"),
+ "bar doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "bar"),
+ "bar doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "bar", {
+ value: "barbaz",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(1), 1);
+assert.sameValue(C._(1), 1);
+assert.sameValue(C.\u{6F}(1), 1);
+assert.sameValue(C.\u2118(1), 1);
+assert.sameValue(C.ZW_\u200C_NJ(1), 1);
+assert.sameValue(C.ZW_\u200D_J(1), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-static-privatename-identifier-initializer-alt-by-classname.js b/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-static-privatename-identifier-initializer-alt-by-classname.js
new file mode 100644
index 0000000000..303c606354
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-static-privatename-identifier-initializer-alt-by-classname.js
@@ -0,0 +1,127 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-initializer-alt-by-classname.case
+// - src/class-elements/productions/cls-decl-multiple-stacked-definitions.template
+/*---
+description: Valid Static PrivateName (multiple stacked fields definitions through ASI)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_‍_J = 1
+ foo = "foobar"
+ bar = "barbaz";
+ static $() {
+ return C.#$;
+ }
+ static _() {
+ return C.#_;
+ }
+ static \u{6F}() {
+ return C.#\u{6F};
+ }
+ static ℘() {
+ return C.#℘;
+ }
+ static ZW_‌_NJ() {
+ return C.#ZW_‌_NJ;
+ }
+ static ZW_‍_J() {
+ return C.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.foo, "foobar");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "foo"),
+ "foo doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "foo"),
+ "foo doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "foo", {
+ value: "foobar",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.bar, "barbaz");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "bar"),
+ "bar doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "bar"),
+ "bar doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "bar", {
+ value: "barbaz",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(), 1);
+assert.sameValue(C._(), 1);
+assert.sameValue(C.\u{6F}(), 1);
+assert.sameValue(C.℘(), 1);
+assert.sameValue(C.ZW_‌_NJ(), 1);
+assert.sameValue(C.ZW_‍_J(), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-static-privatename-identifier-initializer-alt.js b/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-static-privatename-identifier-initializer-alt.js
new file mode 100644
index 0000000000..d2871d3ed9
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-static-privatename-identifier-initializer-alt.js
@@ -0,0 +1,127 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-initializer-alt.case
+// - src/class-elements/productions/cls-decl-multiple-stacked-definitions.template
+/*---
+description: Valid Static PrivateName (multiple stacked fields definitions through ASI)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_‍_J = 1
+ foo = "foobar"
+ bar = "barbaz";
+ static $() {
+ return this.#$;
+ }
+ static _() {
+ return this.#_;
+ }
+ static \u{6F}() {
+ return this.#\u{6F};
+ }
+ static ℘() {
+ return this.#℘;
+ }
+ static ZW_‌_NJ() {
+ return this.#ZW_‌_NJ;
+ }
+ static ZW_‍_J() {
+ return this.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.foo, "foobar");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "foo"),
+ "foo doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "foo"),
+ "foo doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "foo", {
+ value: "foobar",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.bar, "barbaz");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "bar"),
+ "bar doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "bar"),
+ "bar doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "bar", {
+ value: "barbaz",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(), 1);
+assert.sameValue(C._(), 1);
+assert.sameValue(C.\u{6F}(), 1);
+assert.sameValue(C.℘(), 1);
+assert.sameValue(C.ZW_‌_NJ(), 1);
+assert.sameValue(C.ZW_‍_J(), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-static-privatename-identifier-initializer.js b/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-static-privatename-identifier-initializer.js
new file mode 100644
index 0000000000..71d2d785a4
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-static-privatename-identifier-initializer.js
@@ -0,0 +1,127 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-initializer.case
+// - src/class-elements/productions/cls-decl-multiple-stacked-definitions.template
+/*---
+description: Valid Static PrivateName (multiple stacked fields definitions through ASI)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #\u2118 = 1; static #ZW_\u200C_NJ = 1; static #ZW_\u200D_J = 1
+ foo = "foobar"
+ bar = "barbaz";
+ static $() {
+ return this.#$;
+ }
+ static _() {
+ return this.#_;
+ }
+ static \u{6F}() {
+ return this.#\u{6F};
+ }
+ static \u2118() {
+ return this.#\u2118;
+ }
+ static ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ;
+ }
+ static ZW_\u200D_J() {
+ return this.#ZW_\u200D_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.foo, "foobar");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "foo"),
+ "foo doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "foo"),
+ "foo doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "foo", {
+ value: "foobar",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.bar, "barbaz");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "bar"),
+ "bar doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "bar"),
+ "bar doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "bar", {
+ value: "barbaz",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(), 1);
+assert.sameValue(C._(), 1);
+assert.sameValue(C.\u{6F}(), 1);
+assert.sameValue(C.\u2118(), 1);
+assert.sameValue(C.ZW_\u200C_NJ(), 1);
+assert.sameValue(C.ZW_\u200D_J(), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-static-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-static-privatename-identifier.js
new file mode 100644
index 0000000000..981cc5077c
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-rs-static-privatename-identifier.js
@@ -0,0 +1,133 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-multiple-stacked-definitions.template
+/*---
+description: Valid Static PrivateName (multiple stacked fields definitions through ASI)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J
+ foo = "foobar"
+ bar = "barbaz";
+ static $(value) {
+ this.#$ = value;
+ return this.#$;
+ }
+ static _(value) {
+ this.#_ = value;
+ return this.#_;
+ }
+ static \u{6F}(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F};
+ }
+ static \u2118(value) {
+ this.#\u2118 = value;
+ return this.#\u2118;
+ }
+ static ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ = value;
+ return this.#ZW_\u200C_NJ;
+ }
+ static ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J = value;
+ return this.#ZW_\u200D_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.foo, "foobar");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "foo"),
+ "foo doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "foo"),
+ "foo doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "foo", {
+ value: "foobar",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.bar, "barbaz");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "bar"),
+ "bar doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "bar"),
+ "bar doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "bar", {
+ value: "barbaz",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(1), 1);
+assert.sameValue(C._(1), 1);
+assert.sameValue(C.\u{6F}(1), 1);
+assert.sameValue(C.\u2118(1), 1);
+assert.sameValue(C.ZW_\u200C_NJ(1), 1);
+assert.sameValue(C.ZW_\u200D_J(1), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-static-private-fields.js b/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-static-private-fields.js
new file mode 100644
index 0000000000..c6a380b05f
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-static-private-fields.js
@@ -0,0 +1,94 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/static-private-fields.case
+// - src/class-elements/productions/cls-decl-multiple-stacked-definitions.template
+/*---
+description: static private fields (multiple stacked fields definitions through ASI)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ static FieldDefinition ;
+
+ FieldDefinition :
+ ClassElementName Initializer_opt
+
+ ClassElementName :
+ PrivateName
+
+ PrivateName :
+ # IdentifierName
+
+---*/
+
+
+class C {
+ static #x; static #y
+ foo = "foobar"
+ bar = "barbaz";
+ static x() {
+ this.#x = 42;
+ return this.#x;
+ }
+ static y() {
+ this.#y = 43;
+ return this.#y;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.foo, "foobar");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "foo"),
+ "foo doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "foo"),
+ "foo doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "foo", {
+ value: "foobar",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.bar, "barbaz");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "bar"),
+ "bar doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "bar"),
+ "bar doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "bar", {
+ value: "barbaz",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+// Test the private fields do not appear as properties before set to value
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#x"), "test 1");
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 2");
+assert(!Object.prototype.hasOwnProperty.call(c, "#x"), "test 3");
+
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#y"), "test 4");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 5");
+assert(!Object.prototype.hasOwnProperty.call(c, "#y"), "test 6");
+
+// Test if private fields can be sucessfully accessed and set to value
+assert.sameValue(C.x(), 42, "test 7");
+assert.sameValue(C.y(), 43, "test 8");
+
+// Test the private fields do not appear as properties before after set to value
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 9");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 10");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-static-private-methods-with-fields.js b/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-static-private-methods-with-fields.js
new file mode 100644
index 0000000000..f277b44498
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-static-private-methods-with-fields.js
@@ -0,0 +1,111 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/static-private-methods-with-fields.case
+// - src/class-elements/productions/cls-decl-multiple-stacked-definitions.template
+/*---
+description: static private methods with fields (multiple stacked fields definitions through ASI)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class-static-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ static FieldDefinition ;
+
+ FieldDefinition :
+ ClassElementName Initializer_opt
+
+ ClassElementName :
+ PrivateName
+
+ PrivateName :
+ # IdentifierName
+
+---*/
+
+
+class C {
+ static #xVal; static #yVal
+ foo = "foobar"
+ bar = "barbaz";
+ static #x(value) {
+ this.#xVal = value;
+ return this.#xVal;
+ }
+ static #y(value) {
+ this.#yVal = value;
+ return this.#yVal;
+ }
+ static x() {
+ return this.#x(42);
+ }
+ static y() {
+ return this.#y(43);
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.foo, "foobar");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "foo"),
+ "foo doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "foo"),
+ "foo doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "foo", {
+ value: "foobar",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.bar, "barbaz");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "bar"),
+ "bar doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "bar"),
+ "bar doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "bar", {
+ value: "barbaz",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+// Test the private methods do not appear as properties before set to value
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#x"), "test 1");
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 2");
+assert(!Object.prototype.hasOwnProperty.call(c, "#x"), "test 3");
+
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#y"), "test 4");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 5");
+assert(!Object.prototype.hasOwnProperty.call(c, "#y"), "test 6");
+
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#xVal"), "test 7");
+assert(!Object.prototype.hasOwnProperty.call(C, "#xVal"), "test 8");
+assert(!Object.prototype.hasOwnProperty.call(c, "#xVal"), "test 9");
+
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#yVal"), "test 10");
+assert(!Object.prototype.hasOwnProperty.call(C, "#yVal"), "test 11");
+assert(!Object.prototype.hasOwnProperty.call(c, "#yVal"), "test 12");
+
+// Test if private fields can be sucessfully accessed and set to value
+assert.sameValue(C.x(), 42, "test 13");
+assert.sameValue(C.y(), 43, "test 14");
+
+// Test the private fields do not appear as properties before after set to value
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 15");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 16");
+
+assert(!Object.prototype.hasOwnProperty.call(C, "#xVal"), "test 17");
+assert(!Object.prototype.hasOwnProperty.call(C, "#yVal"), "test 18");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-static-private-methods.js b/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-static-private-methods.js
new file mode 100644
index 0000000000..7eb936ac03
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-static-private-methods.js
@@ -0,0 +1,98 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/static-private-methods.case
+// - src/class-elements/productions/cls-decl-multiple-stacked-definitions.template
+/*---
+description: static private methods (multiple stacked fields definitions through ASI)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ static FieldDefinition ;
+
+ FieldDefinition :
+ ClassElementName Initializer_opt
+
+ ClassElementName :
+ PrivateName
+
+ PrivateName :
+ # IdentifierName
+
+---*/
+
+
+class C {
+
+ foo = "foobar"
+ bar = "barbaz";
+ static #x(value) {
+ return value / 2;
+ }
+ static #y(value) {
+ return value * 2;
+ }
+ static x() {
+ return this.#x(84);
+ }
+ static y() {
+ return this.#y(43);
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.foo, "foobar");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "foo"),
+ "foo doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "foo"),
+ "foo doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "foo", {
+ value: "foobar",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.bar, "barbaz");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "bar"),
+ "bar doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "bar"),
+ "bar doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "bar", {
+ value: "barbaz",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+// Test the private methods do not appear as properties before set to value
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#x"), "test 1");
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 2");
+assert(!Object.prototype.hasOwnProperty.call(c, "#x"), "test 3");
+
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#y"), "test 4");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 5");
+assert(!Object.prototype.hasOwnProperty.call(c, "#y"), "test 6");
+
+// Test if private fields can be sucessfully accessed and set to value
+assert.sameValue(C.x(), 42, "test 7");
+assert.sameValue(C.y(), 86, "test 8");
+
+// Test the private fields do not appear as properties before after set to value
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 9");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 10");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-string-literal-names.js b/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-string-literal-names.js
new file mode 100644
index 0000000000..c9d5175d3f
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/multiple-stacked-definitions-string-literal-names.js
@@ -0,0 +1,132 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/string-literal-names.case
+// - src/class-elements/productions/cls-decl-multiple-stacked-definitions.template
+/*---
+description: String literal names (multiple stacked fields definitions through ASI)
+esid: prod-FieldDefinition
+features: [class-fields-public, class]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement:
+ ...
+ FieldDefinition ;
+
+ FieldDefinition:
+ ClassElementName Initializer_opt
+
+ ClassElementName:
+ PropertyName
+
+---*/
+
+
+class C {
+ 'a'; "b"; 'c' = 39;
+ "d" = 42
+ foo = "foobar"
+ bar = "barbaz";
+
+}
+
+var c = new C();
+
+assert.sameValue(c.foo, "foobar");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "foo"),
+ "foo doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "foo"),
+ "foo doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "foo", {
+ value: "foobar",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.bar, "barbaz");
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "bar"),
+ "bar doesn't appear as an own property on the C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "bar"),
+ "bar doesn't appear as an own property on the C prototype"
+);
+
+verifyProperty(c, "bar", {
+ value: "barbaz",
+ enumerable: true,
+ configurable: true,
+ writable: true,
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "a"),
+ "a does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "a"),
+ "a does not appear as an own property on C constructor"
+);
+
+verifyProperty(c, "a", {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "b"),
+ "b does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "b"),
+ "b does not appear as an own property on C constructor"
+);
+
+verifyProperty(c, "b", {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "c"),
+ "c does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "c"),
+ "c does not appear as an own property on C constructor"
+);
+
+verifyProperty(c, "c", {
+ value: 39,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "d"),
+ "d does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "d"),
+ "d does not appear as an own property on C constructor"
+);
+
+verifyProperty(c, "d", {
+ value: 42,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/nested-arrow-fnc-init-err-contains-arguments.js b/js/src/tests/test262/language/statements/class/elements/nested-arrow-fnc-init-err-contains-arguments.js
new file mode 100644
index 0000000000..d777f2b55d
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/nested-arrow-fnc-init-err-contains-arguments.js
@@ -0,0 +1,37 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/init-err-contains-arguments.case
+// - src/class-elements/initializer-error/cls-decl-fields-arrow-fnc-nested.template
+/*---
+description: Syntax error if `arguments` used in class field (arrow function expression)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-public, arrow-function]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ FieldDefinition:
+ PropertyNameInitializeropt
+
+ - It is a Syntax Error if ContainsArguments of Initializer is true.
+
+ Static Semantics: ContainsArguments
+ IdentifierReference : Identifier
+
+ 1. If the StringValue of Identifier is "arguments", return true.
+ ...
+ For all other grammatical productions, recurse on all nonterminals. If any piece returns true, then return true. Otherwise return false.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ x = () => {
+ var t = () => arguments;
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/nested-arrow-fnc-init-err-contains-super.js b/js/src/tests/test262/language/statements/class/elements/nested-arrow-fnc-init-err-contains-super.js
new file mode 100644
index 0000000000..10f67a1320
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/nested-arrow-fnc-init-err-contains-super.js
@@ -0,0 +1,30 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/init-err-contains-super.case
+// - src/class-elements/initializer-error/cls-decl-fields-arrow-fnc-nested.template
+/*---
+description: Syntax error if `super()` used in class field (arrow function expression)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-public, arrow-function]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ FieldDefinition:
+ PropertyNameInitializeropt
+
+ - It is a Syntax Error if Initializer is present and Initializer Contains SuperCall is true.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ x = () => {
+ var t = () => super();
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/nested-comp-name-init-err-contains-arguments.js b/js/src/tests/test262/language/statements/class/elements/nested-comp-name-init-err-contains-arguments.js
new file mode 100644
index 0000000000..97177d04c2
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/nested-comp-name-init-err-contains-arguments.js
@@ -0,0 +1,35 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/init-err-contains-arguments.case
+// - src/class-elements/initializer-error/cls-decl-fields-comp-name-nested.template
+/*---
+description: Syntax error if `arguments` used in class field (computed ClassElementName)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-public, computed-property-names]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ FieldDefinition:
+ PropertyNameInitializeropt
+
+ - It is a Syntax Error if ContainsArguments of Initializer is true.
+
+ Static Semantics: ContainsArguments
+ IdentifierReference : Identifier
+
+ 1. If the StringValue of Identifier is "arguments", return true.
+ ...
+ For all other grammatical productions, recurse on all nonterminals. If any piece returns true, then return true. Otherwise return false.
+
+---*/
+
+$DONOTEVALUATE();
+
+var x = "string";
+class C {
+ [x] = () => arguments;
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/nested-comp-name-init-err-contains-super.js b/js/src/tests/test262/language/statements/class/elements/nested-comp-name-init-err-contains-super.js
new file mode 100644
index 0000000000..e0bd645948
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/nested-comp-name-init-err-contains-super.js
@@ -0,0 +1,28 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/init-err-contains-super.case
+// - src/class-elements/initializer-error/cls-decl-fields-comp-name-nested.template
+/*---
+description: Syntax error if `super()` used in class field (computed ClassElementName)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-public, computed-property-names]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ FieldDefinition:
+ PropertyNameInitializeropt
+
+ - It is a Syntax Error if Initializer is present and Initializer Contains SuperCall is true.
+
+---*/
+
+$DONOTEVALUATE();
+
+var x = "string";
+class C {
+ [x] = () => super();
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/nested-derived-cls-direct-eval-contains-superproperty-1.js b/js/src/tests/test262/language/statements/class/elements/nested-derived-cls-direct-eval-contains-superproperty-1.js
new file mode 100644
index 0000000000..d875a6e5b5
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/nested-derived-cls-direct-eval-contains-superproperty-1.js
@@ -0,0 +1,36 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/eval-contains-superproperty-1.case
+// - src/class-elements/initializer-eval-super-property/cls-decl-fields-eval-nested.template
+/*---
+description: super.x in StatementList of eval (direct eval)
+esid: sec-performeval-rules-in-initializer
+features: [class, class-fields-public]
+flags: [generated]
+info: |
+ Additional Early Error Rules for Eval Inside Initializer
+ These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer.
+ ScriptBody : StatementList
+
+ ...
+ The remaining eval rules apply as outside a constructor, inside a method, and inside a function.
+
+ Additional Early Error Rules for Eval Outside Methods
+ These static semantics are applied by PerformEval when a direct eval call occurs outside of a MethodDefinition.
+ ScriptBody : StatementList
+
+ It is a Syntax Error if StatementList Contains SuperProperty.
+
+---*/
+
+
+var executed = false;
+class A {}
+class C extends A {
+ x = eval('executed = true; super.x;');
+}
+
+new C();
+
+assert.sameValue(executed, true);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/nested-derived-cls-direct-eval-contains-superproperty-2.js b/js/src/tests/test262/language/statements/class/elements/nested-derived-cls-direct-eval-contains-superproperty-2.js
new file mode 100644
index 0000000000..16ae4d6b01
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/nested-derived-cls-direct-eval-contains-superproperty-2.js
@@ -0,0 +1,33 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/eval-contains-superproperty-2.case
+// - src/class-elements/initializer-eval-super-property/cls-decl-fields-eval-nested.template
+/*---
+description: super['x'] in StatementList of eval (direct eval)
+esid: sec-performeval-rules-in-initializer
+features: [class, class-fields-public]
+flags: [generated]
+info: |
+ The remaining eval rules apply as outside a constructor, inside a method, and inside a function.
+
+ Additional Early Error Rules for Eval Outside Methods
+
+ These static semantics are applied by PerformEval when a direct eval call occurs outside of a MethodDefinition.
+
+ ScriptBody : StatementList
+
+ It is a Syntax Error if StatementList Contains SuperProperty.
+
+---*/
+
+
+var executed = false;
+class A {}
+class C extends A {
+ x = eval('executed = true; super["x"];');
+}
+
+new C();
+
+assert.sameValue(executed, true);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/nested-derived-cls-direct-eval-err-contains-supercall-1.js b/js/src/tests/test262/language/statements/class/elements/nested-derived-cls-direct-eval-err-contains-supercall-1.js
new file mode 100644
index 0000000000..569749c78d
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/nested-derived-cls-direct-eval-err-contains-supercall-1.js
@@ -0,0 +1,38 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/eval-err-contains-supercall-1.case
+// - src/class-elements/initializer-eval-super-call/cls-decl-fields-eval-nested.template
+/*---
+description: error if `super()['x']` in StatementList of eval (direct eval)
+esid: sec-performeval-rules-in-initializer
+features: [class, class-fields-public]
+flags: [generated]
+info: |
+ Additional Early Error Rules for Eval Inside Initializer
+ These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer.
+ ScriptBody : StatementList
+
+ ...
+ The remaining eval rules apply as outside a constructor, inside a method, and inside a function.
+
+ Additional Early Error Rules for Eval Outside Constructor Methods
+ These static semantics are applied by PerformEval when a direct eval call occurs outside of the constructor method of a ClassDeclaration or ClassExpression.
+ ScriptBody : StatementList
+
+ It is a Syntax Error if StatementList Contains SuperCall.
+
+---*/
+
+
+var executed = false;
+class A {}
+class C extends A {
+ x = eval('executed = true; super()["x"];');
+}
+
+assert.throws(SyntaxError, function() {
+ new C();
+});
+
+assert.sameValue(executed, false);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/nested-derived-cls-direct-eval-err-contains-supercall-2.js b/js/src/tests/test262/language/statements/class/elements/nested-derived-cls-direct-eval-err-contains-supercall-2.js
new file mode 100644
index 0000000000..3ab9102756
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/nested-derived-cls-direct-eval-err-contains-supercall-2.js
@@ -0,0 +1,31 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/eval-err-contains-supercall-2.case
+// - src/class-elements/initializer-eval-super-call/cls-decl-fields-eval-nested.template
+/*---
+description: error if `super().x` in StatementList of eval (direct eval)
+esid: sec-performeval-rules-in-initializer
+features: [class, class-fields-public]
+flags: [generated]
+info: |
+ Additional Early Error Rules for Eval Outside Constructor Methods
+ These static semantics are applied by PerformEval when a direct eval call occurs outside of the constructor method of a ClassDeclaration or ClassExpression.
+ ScriptBody : StatementList
+
+ It is a Syntax Error if StatementList Contains SuperCall.
+
+---*/
+
+
+var executed = false;
+class A {}
+class C extends A {
+ x = eval('executed = true; super().x;');
+}
+
+assert.throws(SyntaxError, function() {
+ new C();
+});
+
+assert.sameValue(executed, false);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/nested-derived-cls-direct-eval-err-contains-supercall.js b/js/src/tests/test262/language/statements/class/elements/nested-derived-cls-direct-eval-err-contains-supercall.js
new file mode 100644
index 0000000000..d93ba84757
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/nested-derived-cls-direct-eval-err-contains-supercall.js
@@ -0,0 +1,38 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/eval-err-contains-supercall.case
+// - src/class-elements/initializer-eval-super-call/cls-decl-fields-eval-nested.template
+/*---
+description: error if `super()` in StatementList of eval (direct eval)
+esid: sec-performeval-rules-in-initializer
+features: [class, class-fields-public]
+flags: [generated]
+info: |
+ Additional Early Error Rules for Eval Inside Initializer
+ These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer.
+ ScriptBody : StatementList
+
+ ...
+ The remaining eval rules apply as outside a constructor, inside a method, and inside a function.
+
+ Additional Early Error Rules for Eval Outside Constructor Methods
+ These static semantics are applied by PerformEval when a direct eval call occurs outside of the constructor method of a ClassDeclaration or ClassExpression.
+ ScriptBody : StatementList
+
+ It is a Syntax Error if StatementList Contains SuperCall.
+
+---*/
+
+
+var executed = false;
+class A {}
+class C extends A {
+ x = eval('executed = true; super();');
+}
+
+assert.throws(SyntaxError, function() {
+ new C();
+});
+
+assert.sameValue(executed, false);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/nested-derived-cls-indirect-eval-contains-superproperty-1.js b/js/src/tests/test262/language/statements/class/elements/nested-derived-cls-indirect-eval-contains-superproperty-1.js
new file mode 100644
index 0000000000..c1e072e3e8
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/nested-derived-cls-indirect-eval-contains-superproperty-1.js
@@ -0,0 +1,38 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/eval-contains-superproperty-1.case
+// - src/class-elements/initializer-eval-super-property/cls-decl-fields-indirect-eval-nested.template
+/*---
+description: super.x in StatementList of eval (indirect eval)
+esid: sec-performeval-rules-in-initializer
+features: [class, class-fields-public]
+flags: [generated]
+info: |
+ Additional Early Error Rules for Eval Inside Initializer
+ These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer.
+ ScriptBody : StatementList
+
+ ...
+ The remaining eval rules apply as outside a constructor, inside a method, and inside a function.
+
+ Additional Early Error Rules for Eval Outside Methods
+ These static semantics are applied by PerformEval when a direct eval call occurs outside of a MethodDefinition.
+ ScriptBody : StatementList
+
+ It is a Syntax Error if StatementList Contains SuperProperty.
+
+---*/
+
+
+var executed = false;
+class A {}
+class C extends A {
+ x = (0, eval)('executed = true; super.x;');
+}
+
+assert.throws(SyntaxError, function() {
+ new C();
+});
+
+assert.sameValue(executed, false);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/nested-derived-cls-indirect-eval-contains-superproperty-2.js b/js/src/tests/test262/language/statements/class/elements/nested-derived-cls-indirect-eval-contains-superproperty-2.js
new file mode 100644
index 0000000000..abc413ecb9
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/nested-derived-cls-indirect-eval-contains-superproperty-2.js
@@ -0,0 +1,35 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/eval-contains-superproperty-2.case
+// - src/class-elements/initializer-eval-super-property/cls-decl-fields-indirect-eval-nested.template
+/*---
+description: super['x'] in StatementList of eval (indirect eval)
+esid: sec-performeval-rules-in-initializer
+features: [class, class-fields-public]
+flags: [generated]
+info: |
+ The remaining eval rules apply as outside a constructor, inside a method, and inside a function.
+
+ Additional Early Error Rules for Eval Outside Methods
+
+ These static semantics are applied by PerformEval when a direct eval call occurs outside of a MethodDefinition.
+
+ ScriptBody : StatementList
+
+ It is a Syntax Error if StatementList Contains SuperProperty.
+
+---*/
+
+
+var executed = false;
+class A {}
+class C extends A {
+ x = (0, eval)('executed = true; super["x"];');
+}
+
+assert.throws(SyntaxError, function() {
+ new C();
+});
+
+assert.sameValue(executed, false);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/nested-derived-cls-indirect-eval-err-contains-supercall-1.js b/js/src/tests/test262/language/statements/class/elements/nested-derived-cls-indirect-eval-err-contains-supercall-1.js
new file mode 100644
index 0000000000..d20d056c18
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/nested-derived-cls-indirect-eval-err-contains-supercall-1.js
@@ -0,0 +1,38 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/eval-err-contains-supercall-1.case
+// - src/class-elements/initializer-eval-super-call/cls-decl-fields-indirect-eval-nested.template
+/*---
+description: error if `super()['x']` in StatementList of eval (indirect eval)
+esid: sec-performeval-rules-in-initializer
+features: [class, class-fields-public]
+flags: [generated]
+info: |
+ Additional Early Error Rules for Eval Inside Initializer
+ These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer.
+ ScriptBody : StatementList
+
+ ...
+ The remaining eval rules apply as outside a constructor, inside a method, and inside a function.
+
+ Additional Early Error Rules for Eval Outside Constructor Methods
+ These static semantics are applied by PerformEval when a direct eval call occurs outside of the constructor method of a ClassDeclaration or ClassExpression.
+ ScriptBody : StatementList
+
+ It is a Syntax Error if StatementList Contains SuperCall.
+
+---*/
+
+
+var executed = false;
+class A {}
+class C extends A {
+ x = (0, eval)('executed = true; super()["x"];');
+}
+
+assert.throws(SyntaxError, function() {
+ new C();
+});
+
+assert.sameValue(executed, false);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/nested-derived-cls-indirect-eval-err-contains-supercall-2.js b/js/src/tests/test262/language/statements/class/elements/nested-derived-cls-indirect-eval-err-contains-supercall-2.js
new file mode 100644
index 0000000000..0f10cd6926
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/nested-derived-cls-indirect-eval-err-contains-supercall-2.js
@@ -0,0 +1,31 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/eval-err-contains-supercall-2.case
+// - src/class-elements/initializer-eval-super-call/cls-decl-fields-indirect-eval-nested.template
+/*---
+description: error if `super().x` in StatementList of eval (indirect eval)
+esid: sec-performeval-rules-in-initializer
+features: [class, class-fields-public]
+flags: [generated]
+info: |
+ Additional Early Error Rules for Eval Outside Constructor Methods
+ These static semantics are applied by PerformEval when a direct eval call occurs outside of the constructor method of a ClassDeclaration or ClassExpression.
+ ScriptBody : StatementList
+
+ It is a Syntax Error if StatementList Contains SuperCall.
+
+---*/
+
+
+var executed = false;
+class A {}
+class C extends A {
+ x = (0, eval)('executed = true; super().x;');
+}
+
+assert.throws(SyntaxError, function() {
+ new C();
+});
+
+assert.sameValue(executed, false);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/nested-derived-cls-indirect-eval-err-contains-supercall.js b/js/src/tests/test262/language/statements/class/elements/nested-derived-cls-indirect-eval-err-contains-supercall.js
new file mode 100644
index 0000000000..d5a13181f4
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/nested-derived-cls-indirect-eval-err-contains-supercall.js
@@ -0,0 +1,38 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/eval-err-contains-supercall.case
+// - src/class-elements/initializer-eval-super-call/cls-decl-fields-indirect-eval-nested.template
+/*---
+description: error if `super()` in StatementList of eval (indirect eval)
+esid: sec-performeval-rules-in-initializer
+features: [class, class-fields-public]
+flags: [generated]
+info: |
+ Additional Early Error Rules for Eval Inside Initializer
+ These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer.
+ ScriptBody : StatementList
+
+ ...
+ The remaining eval rules apply as outside a constructor, inside a method, and inside a function.
+
+ Additional Early Error Rules for Eval Outside Constructor Methods
+ These static semantics are applied by PerformEval when a direct eval call occurs outside of the constructor method of a ClassDeclaration or ClassExpression.
+ ScriptBody : StatementList
+
+ It is a Syntax Error if StatementList Contains SuperCall.
+
+---*/
+
+
+var executed = false;
+class A {}
+class C extends A {
+ x = (0, eval)('executed = true; super();');
+}
+
+assert.throws(SyntaxError, function() {
+ new C();
+});
+
+assert.sameValue(executed, false);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/nested-direct-eval-err-contains-arguments.js b/js/src/tests/test262/language/statements/class/elements/nested-direct-eval-err-contains-arguments.js
new file mode 100644
index 0000000000..031e5086d7
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/nested-direct-eval-err-contains-arguments.js
@@ -0,0 +1,41 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/eval-err-contains-arguments.case
+// - src/class-elements/initializer-direct-eval-arguments/cls-decl-fields-eval-nested.template
+/*---
+description: error if `arguments` in StatementList of eval (direct eval)
+esid: sec-performeval-rules-in-initializer
+features: [class, class-fields-public]
+flags: [generated]
+info: |
+ Additional Early Error Rules for Eval Inside Initializer
+ These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer.
+ ScriptBody : StatementList
+
+ It is a Syntax Error if ContainsArguments of StatementList is true.
+ ...
+
+ Static Semantics: ContainsArguments
+ IdentifierReference : Identifier
+
+ 1. If the StringValue of Identifier is "arguments", return true.
+ ...
+ For all other grammatical productions, recurse on all nonterminals. If any piece returns true, then return true. Otherwise return false.
+
+---*/
+
+
+var executed = false;
+class C {
+ x = () => {
+ var t = () => { eval('executed = true; arguments;'); };
+ t();
+ }
+}
+
+assert.throws(SyntaxError, function() {
+ new C().x();
+});
+
+assert.sameValue(executed, false);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/nested-direct-eval-err-contains-newtarget.js b/js/src/tests/test262/language/statements/class/elements/nested-direct-eval-err-contains-newtarget.js
new file mode 100644
index 0000000000..eec4e3a676
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/nested-direct-eval-err-contains-newtarget.js
@@ -0,0 +1,36 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/eval-err-contains-newtarget.case
+// - src/class-elements/initializer-eval-newtarget/cls-decl-fields-eval-nested.template
+/*---
+description: error if `new.target` in StatementList of eval (direct eval)
+esid: sec-performeval-rules-in-initializer
+features: [class, new.target, class-fields-public]
+flags: [generated]
+info: |
+ Additional Early Error Rules for Eval Inside Initializer
+ These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer.
+ ScriptBody : StatementList
+
+ ...
+ The remaining eval rules apply as outside a constructor, inside a method, and inside a function.
+
+ Additional Early Error Rules for Eval Outside Functions
+ These static semantics are applied by PerformEval when a direct eval call occurs outside of any function.
+ ScriptBody : StatementList
+
+ It is a Syntax Error if StatementList Contains NewTarget.
+
+---*/
+
+
+var executed = false;
+class C {
+ x = eval('executed = true; new.target;');
+}
+
+var c = new C();
+
+assert.sameValue(executed, true);
+assert.sameValue(c.x, undefined);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/nested-equality-init-err-contains-arguments.js b/js/src/tests/test262/language/statements/class/elements/nested-equality-init-err-contains-arguments.js
new file mode 100644
index 0000000000..097ec48013
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/nested-equality-init-err-contains-arguments.js
@@ -0,0 +1,34 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/init-err-contains-arguments.case
+// - src/class-elements/initializer-error/cls-decl-fields-equality-nested.template
+/*---
+description: Syntax error if `arguments` used in class field (equality expression)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-public]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ FieldDefinition:
+ PropertyNameInitializeropt
+
+ - It is a Syntax Error if ContainsArguments of Initializer is true.
+
+ Static Semantics: ContainsArguments
+ IdentifierReference : Identifier
+
+ 1. If the StringValue of Identifier is "arguments", return true.
+ ...
+ For all other grammatical productions, recurse on all nonterminals. If any piece returns true, then return true. Otherwise return false.
+
+---*/
+
+$DONOTEVALUATE();
+
+class C {
+ x = () => {} == arguments;
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/nested-equality-init-err-contains-super.js b/js/src/tests/test262/language/statements/class/elements/nested-equality-init-err-contains-super.js
new file mode 100644
index 0000000000..161d0fb529
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/nested-equality-init-err-contains-super.js
@@ -0,0 +1,27 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/init-err-contains-super.case
+// - src/class-elements/initializer-error/cls-decl-fields-equality-nested.template
+/*---
+description: Syntax error if `super()` used in class field (equality expression)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-public]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ FieldDefinition:
+ PropertyNameInitializeropt
+
+ - It is a Syntax Error if Initializer is present and Initializer Contains SuperCall is true.
+
+---*/
+
+$DONOTEVALUATE();
+
+class C {
+ x = () => {} == super();
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/nested-indirect-eval-contains-arguments.js b/js/src/tests/test262/language/statements/class/elements/nested-indirect-eval-contains-arguments.js
new file mode 100644
index 0000000000..ac4e817cd0
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/nested-indirect-eval-contains-arguments.js
@@ -0,0 +1,25 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/eval-contains-arguments.case
+// - src/class-elements/initializer-indirect-eval-arguments/cls-decl-fields-indirect-eval-nested.template
+/*---
+description: No error if `arguments` in StatementList of eval (indirect eval)
+esid: sec-performeval-rules-in-initializer
+features: [class, class-fields-public]
+flags: [generated, noStrict]
+info: |
+ For indirect eval, the "Additional Early Error Rules for Eval Inside Initializer"
+ (in #sec-performeval-rules-in-initializer) are NOT applicable.
+
+---*/
+
+
+var arguments = 1;
+class C {
+ x = () => {
+ var t = () => (0, eval)('arguments;');
+ return t();
+ }
+}
+assert.sameValue(new C().x(), arguments);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/nested-indirect-eval-err-contains-newtarget.js b/js/src/tests/test262/language/statements/class/elements/nested-indirect-eval-err-contains-newtarget.js
new file mode 100644
index 0000000000..19eae85f80
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/nested-indirect-eval-err-contains-newtarget.js
@@ -0,0 +1,37 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/eval-err-contains-newtarget.case
+// - src/class-elements/initializer-eval-newtarget/cls-decl-fields-indirect-eval-nested.template
+/*---
+description: error if `new.target` in StatementList of eval (indirect eval)
+esid: sec-performeval-rules-in-initializer
+features: [class, new.target, class-fields-public]
+flags: [generated]
+info: |
+ Additional Early Error Rules for Eval Inside Initializer
+ These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer.
+ ScriptBody : StatementList
+
+ ...
+ The remaining eval rules apply as outside a constructor, inside a method, and inside a function.
+
+ Additional Early Error Rules for Eval Outside Functions
+ These static semantics are applied by PerformEval when a direct eval call occurs outside of any function.
+ ScriptBody : StatementList
+
+ It is a Syntax Error if StatementList Contains NewTarget.
+
+---*/
+
+
+var executed = false;
+class C {
+ x = (0, eval)('executed = true; new.target;');
+}
+
+assert.throws(SyntaxError, function() {
+ new C();
+});
+
+assert.sameValue(executed, false);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/nested-literal-name-init-err-contains-arguments.js b/js/src/tests/test262/language/statements/class/elements/nested-literal-name-init-err-contains-arguments.js
new file mode 100644
index 0000000000..1c7453e69d
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/nested-literal-name-init-err-contains-arguments.js
@@ -0,0 +1,34 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/init-err-contains-arguments.case
+// - src/class-elements/initializer-error/cls-decl-fields-literal-name-nested.template
+/*---
+description: Syntax error if `arguments` used in class field (literal ClassElementName)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-public]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ FieldDefinition:
+ PropertyNameInitializeropt
+
+ - It is a Syntax Error if ContainsArguments of Initializer is true.
+
+ Static Semantics: ContainsArguments
+ IdentifierReference : Identifier
+
+ 1. If the StringValue of Identifier is "arguments", return true.
+ ...
+ For all other grammatical productions, recurse on all nonterminals. If any piece returns true, then return true. Otherwise return false.
+
+---*/
+
+$DONOTEVALUATE();
+
+class C {
+ x = () => arguments;
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/nested-literal-name-init-err-contains-super.js b/js/src/tests/test262/language/statements/class/elements/nested-literal-name-init-err-contains-super.js
new file mode 100644
index 0000000000..bda742293c
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/nested-literal-name-init-err-contains-super.js
@@ -0,0 +1,27 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/init-err-contains-super.case
+// - src/class-elements/initializer-error/cls-decl-fields-literal-name-nested.template
+/*---
+description: Syntax error if `super()` used in class field (literal ClassElementName)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-public]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ FieldDefinition:
+ PropertyNameInitializeropt
+
+ - It is a Syntax Error if Initializer is present and Initializer Contains SuperCall is true.
+
+---*/
+
+$DONOTEVALUATE();
+
+class C {
+ x = () => super();
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/nested-private-arrow-fnc-init-err-contains-arguments.js b/js/src/tests/test262/language/statements/class/elements/nested-private-arrow-fnc-init-err-contains-arguments.js
new file mode 100644
index 0000000000..ad61eb20a4
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/nested-private-arrow-fnc-init-err-contains-arguments.js
@@ -0,0 +1,39 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/init-err-contains-arguments.case
+// - src/class-elements/initializer-error/cls-decl-fields-private-arrow-fnc-nested.template
+/*---
+description: Syntax error if `arguments` used in class field (private field, arrow function expression)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-public, arrow-function, class-fields-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ FieldDefinition:
+ PropertyNameInitializeropt
+
+ - It is a Syntax Error if ContainsArguments of Initializer is true.
+
+ Static Semantics: ContainsArguments
+ IdentifierReference : Identifier
+
+ 1. If the StringValue of Identifier is "arguments", return true.
+ ...
+ For all other grammatical productions, recurse on all nonterminals. If any piece returns true, then return true. Otherwise return false.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x = () => {
+ var t = () => arguments;
+ t();
+ }
+}
+
diff --git a/js/src/tests/test262/language/statements/class/elements/nested-private-arrow-fnc-init-err-contains-super.js b/js/src/tests/test262/language/statements/class/elements/nested-private-arrow-fnc-init-err-contains-super.js
new file mode 100644
index 0000000000..57f5aff25e
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/nested-private-arrow-fnc-init-err-contains-super.js
@@ -0,0 +1,32 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/init-err-contains-super.case
+// - src/class-elements/initializer-error/cls-decl-fields-private-arrow-fnc-nested.template
+/*---
+description: Syntax error if `super()` used in class field (private field, arrow function expression)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-public, arrow-function, class-fields-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ FieldDefinition:
+ PropertyNameInitializeropt
+
+ - It is a Syntax Error if Initializer is present and Initializer Contains SuperCall is true.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x = () => {
+ var t = () => super();
+ t();
+ }
+}
+
diff --git a/js/src/tests/test262/language/statements/class/elements/nested-private-derived-cls-direct-eval-contains-superproperty-1.js b/js/src/tests/test262/language/statements/class/elements/nested-private-derived-cls-direct-eval-contains-superproperty-1.js
new file mode 100644
index 0000000000..d01a521970
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/nested-private-derived-cls-direct-eval-contains-superproperty-1.js
@@ -0,0 +1,36 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/eval-contains-superproperty-1.case
+// - src/class-elements/initializer-eval-super-property/cls-decl-private-fields-eval-nested.template
+/*---
+description: super.x in StatementList of eval (direct eval)
+esid: sec-performeval-rules-in-initializer
+features: [class, class-fields-public, class-fields-private]
+flags: [generated]
+info: |
+ Additional Early Error Rules for Eval Inside Initializer
+ These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer.
+ ScriptBody : StatementList
+
+ ...
+ The remaining eval rules apply as outside a constructor, inside a method, and inside a function.
+
+ Additional Early Error Rules for Eval Outside Methods
+ These static semantics are applied by PerformEval when a direct eval call occurs outside of a MethodDefinition.
+ ScriptBody : StatementList
+
+ It is a Syntax Error if StatementList Contains SuperProperty.
+
+---*/
+
+
+var executed = false;
+class A {}
+class C extends A {
+ #x = eval('executed = true; super.x;');
+}
+
+new C();
+
+assert.sameValue(executed, true);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/nested-private-derived-cls-direct-eval-contains-superproperty-2.js b/js/src/tests/test262/language/statements/class/elements/nested-private-derived-cls-direct-eval-contains-superproperty-2.js
new file mode 100644
index 0000000000..d667ad9743
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/nested-private-derived-cls-direct-eval-contains-superproperty-2.js
@@ -0,0 +1,33 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/eval-contains-superproperty-2.case
+// - src/class-elements/initializer-eval-super-property/cls-decl-private-fields-eval-nested.template
+/*---
+description: super['x'] in StatementList of eval (direct eval)
+esid: sec-performeval-rules-in-initializer
+features: [class, class-fields-public, class-fields-private]
+flags: [generated]
+info: |
+ The remaining eval rules apply as outside a constructor, inside a method, and inside a function.
+
+ Additional Early Error Rules for Eval Outside Methods
+
+ These static semantics are applied by PerformEval when a direct eval call occurs outside of a MethodDefinition.
+
+ ScriptBody : StatementList
+
+ It is a Syntax Error if StatementList Contains SuperProperty.
+
+---*/
+
+
+var executed = false;
+class A {}
+class C extends A {
+ #x = eval('executed = true; super["x"];');
+}
+
+new C();
+
+assert.sameValue(executed, true);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/nested-private-derived-cls-direct-eval-err-contains-supercall-1.js b/js/src/tests/test262/language/statements/class/elements/nested-private-derived-cls-direct-eval-err-contains-supercall-1.js
new file mode 100644
index 0000000000..ed1137492c
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/nested-private-derived-cls-direct-eval-err-contains-supercall-1.js
@@ -0,0 +1,38 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/eval-err-contains-supercall-1.case
+// - src/class-elements/initializer-eval-super-call/cls-decl-private-fields-eval-nested.template
+/*---
+description: error if `super()['x']` in StatementList of eval (direct eval)
+esid: sec-performeval-rules-in-initializer
+features: [class, class-fields-public, class-fields-private]
+flags: [generated]
+info: |
+ Additional Early Error Rules for Eval Inside Initializer
+ These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer.
+ ScriptBody : StatementList
+
+ ...
+ The remaining eval rules apply as outside a constructor, inside a method, and inside a function.
+
+ Additional Early Error Rules for Eval Outside Constructor Methods
+ These static semantics are applied by PerformEval when a direct eval call occurs outside of the constructor method of a ClassDeclaration or ClassExpression.
+ ScriptBody : StatementList
+
+ It is a Syntax Error if StatementList Contains SuperCall.
+
+---*/
+
+
+var executed = false;
+class A {}
+class C extends A {
+ #x = eval('executed = true; super()["x"];');
+}
+
+assert.throws(SyntaxError, function() {
+ new C();
+});
+
+assert.sameValue(executed, false);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/nested-private-derived-cls-direct-eval-err-contains-supercall-2.js b/js/src/tests/test262/language/statements/class/elements/nested-private-derived-cls-direct-eval-err-contains-supercall-2.js
new file mode 100644
index 0000000000..292515caf1
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/nested-private-derived-cls-direct-eval-err-contains-supercall-2.js
@@ -0,0 +1,31 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/eval-err-contains-supercall-2.case
+// - src/class-elements/initializer-eval-super-call/cls-decl-private-fields-eval-nested.template
+/*---
+description: error if `super().x` in StatementList of eval (direct eval)
+esid: sec-performeval-rules-in-initializer
+features: [class, class-fields-public, class-fields-private]
+flags: [generated]
+info: |
+ Additional Early Error Rules for Eval Outside Constructor Methods
+ These static semantics are applied by PerformEval when a direct eval call occurs outside of the constructor method of a ClassDeclaration or ClassExpression.
+ ScriptBody : StatementList
+
+ It is a Syntax Error if StatementList Contains SuperCall.
+
+---*/
+
+
+var executed = false;
+class A {}
+class C extends A {
+ #x = eval('executed = true; super().x;');
+}
+
+assert.throws(SyntaxError, function() {
+ new C();
+});
+
+assert.sameValue(executed, false);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/nested-private-derived-cls-direct-eval-err-contains-supercall.js b/js/src/tests/test262/language/statements/class/elements/nested-private-derived-cls-direct-eval-err-contains-supercall.js
new file mode 100644
index 0000000000..ca01d01130
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/nested-private-derived-cls-direct-eval-err-contains-supercall.js
@@ -0,0 +1,38 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/eval-err-contains-supercall.case
+// - src/class-elements/initializer-eval-super-call/cls-decl-private-fields-eval-nested.template
+/*---
+description: error if `super()` in StatementList of eval (direct eval)
+esid: sec-performeval-rules-in-initializer
+features: [class, class-fields-public, class-fields-private]
+flags: [generated]
+info: |
+ Additional Early Error Rules for Eval Inside Initializer
+ These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer.
+ ScriptBody : StatementList
+
+ ...
+ The remaining eval rules apply as outside a constructor, inside a method, and inside a function.
+
+ Additional Early Error Rules for Eval Outside Constructor Methods
+ These static semantics are applied by PerformEval when a direct eval call occurs outside of the constructor method of a ClassDeclaration or ClassExpression.
+ ScriptBody : StatementList
+
+ It is a Syntax Error if StatementList Contains SuperCall.
+
+---*/
+
+
+var executed = false;
+class A {}
+class C extends A {
+ #x = eval('executed = true; super();');
+}
+
+assert.throws(SyntaxError, function() {
+ new C();
+});
+
+assert.sameValue(executed, false);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/nested-private-derived-cls-indirect-eval-contains-superproperty-1.js b/js/src/tests/test262/language/statements/class/elements/nested-private-derived-cls-indirect-eval-contains-superproperty-1.js
new file mode 100644
index 0000000000..ae20c0061a
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/nested-private-derived-cls-indirect-eval-contains-superproperty-1.js
@@ -0,0 +1,38 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/eval-contains-superproperty-1.case
+// - src/class-elements/initializer-eval-super-property/cls-decl-private-fields-indirect-eval-nested.template
+/*---
+description: super.x in StatementList of eval (indirect eval)
+esid: sec-performeval-rules-in-initializer
+features: [class, class-fields-public, class-fields-private]
+flags: [generated]
+info: |
+ Additional Early Error Rules for Eval Inside Initializer
+ These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer.
+ ScriptBody : StatementList
+
+ ...
+ The remaining eval rules apply as outside a constructor, inside a method, and inside a function.
+
+ Additional Early Error Rules for Eval Outside Methods
+ These static semantics are applied by PerformEval when a direct eval call occurs outside of a MethodDefinition.
+ ScriptBody : StatementList
+
+ It is a Syntax Error if StatementList Contains SuperProperty.
+
+---*/
+
+
+var executed = false;
+class A {}
+class C extends A {
+ #x = (0, eval)('executed = true; super.x;');
+}
+
+assert.throws(SyntaxError, function() {
+ new C();
+});
+
+assert.sameValue(executed, false);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/nested-private-derived-cls-indirect-eval-contains-superproperty-2.js b/js/src/tests/test262/language/statements/class/elements/nested-private-derived-cls-indirect-eval-contains-superproperty-2.js
new file mode 100644
index 0000000000..1c5fda8bd9
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/nested-private-derived-cls-indirect-eval-contains-superproperty-2.js
@@ -0,0 +1,35 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/eval-contains-superproperty-2.case
+// - src/class-elements/initializer-eval-super-property/cls-decl-private-fields-indirect-eval-nested.template
+/*---
+description: super['x'] in StatementList of eval (indirect eval)
+esid: sec-performeval-rules-in-initializer
+features: [class, class-fields-public, class-fields-private]
+flags: [generated]
+info: |
+ The remaining eval rules apply as outside a constructor, inside a method, and inside a function.
+
+ Additional Early Error Rules for Eval Outside Methods
+
+ These static semantics are applied by PerformEval when a direct eval call occurs outside of a MethodDefinition.
+
+ ScriptBody : StatementList
+
+ It is a Syntax Error if StatementList Contains SuperProperty.
+
+---*/
+
+
+var executed = false;
+class A {}
+class C extends A {
+ #x = (0, eval)('executed = true; super["x"];');
+}
+
+assert.throws(SyntaxError, function() {
+ new C();
+});
+
+assert.sameValue(executed, false);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/nested-private-derived-cls-indirect-eval-err-contains-supercall-1.js b/js/src/tests/test262/language/statements/class/elements/nested-private-derived-cls-indirect-eval-err-contains-supercall-1.js
new file mode 100644
index 0000000000..b0f130dc03
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/nested-private-derived-cls-indirect-eval-err-contains-supercall-1.js
@@ -0,0 +1,38 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/eval-err-contains-supercall-1.case
+// - src/class-elements/initializer-eval-super-call/cls-decl-private-fields-indirect-eval-nested.template
+/*---
+description: error if `super()['x']` in StatementList of eval (indirect eval)
+esid: sec-performeval-rules-in-initializer
+features: [class, class-fields-public, class-fields-private]
+flags: [generated]
+info: |
+ Additional Early Error Rules for Eval Inside Initializer
+ These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer.
+ ScriptBody : StatementList
+
+ ...
+ The remaining eval rules apply as outside a constructor, inside a method, and inside a function.
+
+ Additional Early Error Rules for Eval Outside Constructor Methods
+ These static semantics are applied by PerformEval when a direct eval call occurs outside of the constructor method of a ClassDeclaration or ClassExpression.
+ ScriptBody : StatementList
+
+ It is a Syntax Error if StatementList Contains SuperCall.
+
+---*/
+
+
+var executed = false;
+class A {}
+class C extends A {
+ #x = (0, eval)('executed = true; super()["x"];');
+}
+
+assert.throws(SyntaxError, function() {
+ new C();
+});
+
+assert.sameValue(executed, false);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/nested-private-derived-cls-indirect-eval-err-contains-supercall-2.js b/js/src/tests/test262/language/statements/class/elements/nested-private-derived-cls-indirect-eval-err-contains-supercall-2.js
new file mode 100644
index 0000000000..4683284688
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/nested-private-derived-cls-indirect-eval-err-contains-supercall-2.js
@@ -0,0 +1,31 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/eval-err-contains-supercall-2.case
+// - src/class-elements/initializer-eval-super-call/cls-decl-private-fields-indirect-eval-nested.template
+/*---
+description: error if `super().x` in StatementList of eval (indirect eval)
+esid: sec-performeval-rules-in-initializer
+features: [class, class-fields-public, class-fields-private]
+flags: [generated]
+info: |
+ Additional Early Error Rules for Eval Outside Constructor Methods
+ These static semantics are applied by PerformEval when a direct eval call occurs outside of the constructor method of a ClassDeclaration or ClassExpression.
+ ScriptBody : StatementList
+
+ It is a Syntax Error if StatementList Contains SuperCall.
+
+---*/
+
+
+var executed = false;
+class A {}
+class C extends A {
+ #x = (0, eval)('executed = true; super().x;');
+}
+
+assert.throws(SyntaxError, function() {
+ new C();
+});
+
+assert.sameValue(executed, false);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/nested-private-derived-cls-indirect-eval-err-contains-supercall.js b/js/src/tests/test262/language/statements/class/elements/nested-private-derived-cls-indirect-eval-err-contains-supercall.js
new file mode 100644
index 0000000000..246de345ba
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/nested-private-derived-cls-indirect-eval-err-contains-supercall.js
@@ -0,0 +1,38 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/eval-err-contains-supercall.case
+// - src/class-elements/initializer-eval-super-call/cls-decl-private-fields-indirect-eval-nested.template
+/*---
+description: error if `super()` in StatementList of eval (indirect eval)
+esid: sec-performeval-rules-in-initializer
+features: [class, class-fields-public, class-fields-private]
+flags: [generated]
+info: |
+ Additional Early Error Rules for Eval Inside Initializer
+ These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer.
+ ScriptBody : StatementList
+
+ ...
+ The remaining eval rules apply as outside a constructor, inside a method, and inside a function.
+
+ Additional Early Error Rules for Eval Outside Constructor Methods
+ These static semantics are applied by PerformEval when a direct eval call occurs outside of the constructor method of a ClassDeclaration or ClassExpression.
+ ScriptBody : StatementList
+
+ It is a Syntax Error if StatementList Contains SuperCall.
+
+---*/
+
+
+var executed = false;
+class A {}
+class C extends A {
+ #x = (0, eval)('executed = true; super();');
+}
+
+assert.throws(SyntaxError, function() {
+ new C();
+});
+
+assert.sameValue(executed, false);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/nested-private-direct-eval-err-contains-arguments.js b/js/src/tests/test262/language/statements/class/elements/nested-private-direct-eval-err-contains-arguments.js
new file mode 100644
index 0000000000..d4829e845d
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/nested-private-direct-eval-err-contains-arguments.js
@@ -0,0 +1,44 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/eval-err-contains-arguments.case
+// - src/class-elements/initializer-direct-eval-arguments/cls-decl-private-fields-eval-nested.template
+/*---
+description: error if `arguments` in StatementList of eval (direct eval)
+esid: sec-performeval-rules-in-initializer
+features: [class, class-fields-public, class-fields-private]
+flags: [generated]
+info: |
+ Additional Early Error Rules for Eval Inside Initializer
+ These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer.
+ ScriptBody : StatementList
+
+ It is a Syntax Error if ContainsArguments of StatementList is true.
+ ...
+
+ Static Semantics: ContainsArguments
+ IdentifierReference : Identifier
+
+ 1. If the StringValue of Identifier is "arguments", return true.
+ ...
+ For all other grammatical productions, recurse on all nonterminals. If any piece returns true, then return true. Otherwise return false.
+
+---*/
+
+
+var executed = false;
+class C {
+ #x = () => {
+ var t = () => { eval('executed = true; arguments;'); };
+ t();
+ }
+ constructor() {
+ this.#x();
+ }
+}
+
+assert.throws(SyntaxError, function() {
+ new C();
+});
+
+assert.sameValue(executed, false);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/nested-private-direct-eval-err-contains-newtarget.js b/js/src/tests/test262/language/statements/class/elements/nested-private-direct-eval-err-contains-newtarget.js
new file mode 100644
index 0000000000..c6a569e620
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/nested-private-direct-eval-err-contains-newtarget.js
@@ -0,0 +1,36 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/eval-err-contains-newtarget.case
+// - src/class-elements/initializer-eval-newtarget/cls-decl-private-fields-eval-nested.template
+/*---
+description: error if `new.target` in StatementList of eval (direct eval)
+esid: sec-performeval-rules-in-initializer
+features: [class, new.target, class-fields-private]
+flags: [generated]
+info: |
+ Additional Early Error Rules for Eval Inside Initializer
+ These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer.
+ ScriptBody : StatementList
+
+ ...
+ The remaining eval rules apply as outside a constructor, inside a method, and inside a function.
+
+ Additional Early Error Rules for Eval Outside Functions
+ These static semantics are applied by PerformEval when a direct eval call occurs outside of any function.
+ ScriptBody : StatementList
+
+ It is a Syntax Error if StatementList Contains NewTarget.
+
+---*/
+
+
+var executed = false;
+class C {
+ #x = eval('executed = true; new.target;');
+}
+
+var c = new C();
+
+assert.sameValue(executed, true);
+assert.sameValue(c.x, undefined);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/nested-private-indirect-eval-contains-arguments.js b/js/src/tests/test262/language/statements/class/elements/nested-private-indirect-eval-contains-arguments.js
new file mode 100644
index 0000000000..289dc6ac40
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/nested-private-indirect-eval-contains-arguments.js
@@ -0,0 +1,26 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/eval-contains-arguments.case
+// - src/class-elements/initializer-indirect-eval-arguments/cls-decl-private-fields-indirect-eval-nested.template
+/*---
+description: No error if `arguments` in StatementList of eval (indirect eval)
+esid: sec-performeval-rules-in-initializer
+features: [class, class-fields-public, class-fields-private]
+flags: [generated, noStrict]
+info: |
+ For indirect eval, the "Additional Early Error Rules for Eval Inside Initializer"
+ (in #sec-performeval-rules-in-initializer) are NOT applicable.
+
+---*/
+
+
+var arguments = 1;
+class C {
+ #x = (0, eval)('arguments;');
+ x() {
+ return this.#x;
+ }
+}
+
+assert.sameValue(new C().x(), arguments);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/nested-private-indirect-eval-err-contains-newtarget.js b/js/src/tests/test262/language/statements/class/elements/nested-private-indirect-eval-err-contains-newtarget.js
new file mode 100644
index 0000000000..f9f824135c
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/nested-private-indirect-eval-err-contains-newtarget.js
@@ -0,0 +1,37 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/eval-err-contains-newtarget.case
+// - src/class-elements/initializer-eval-newtarget/cls-decl-private-fields-indirect-eval-nested.template
+/*---
+description: error if `new.target` in StatementList of eval (indirect eval)
+esid: sec-performeval-rules-in-initializer
+features: [class, new.target, class-fields-private]
+flags: [generated]
+info: |
+ Additional Early Error Rules for Eval Inside Initializer
+ These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer.
+ ScriptBody : StatementList
+
+ ...
+ The remaining eval rules apply as outside a constructor, inside a method, and inside a function.
+
+ Additional Early Error Rules for Eval Outside Functions
+ These static semantics are applied by PerformEval when a direct eval call occurs outside of any function.
+ ScriptBody : StatementList
+
+ It is a Syntax Error if StatementList Contains NewTarget.
+
+---*/
+
+
+var executed = false;
+class C {
+ #x = (0, eval)('executed = true; new.target;');
+}
+
+assert.throws(SyntaxError, function() {
+ new C();
+});
+
+assert.sameValue(executed, false);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/nested-private-literal-name-init-err-contains-arguments.js b/js/src/tests/test262/language/statements/class/elements/nested-private-literal-name-init-err-contains-arguments.js
new file mode 100644
index 0000000000..394b818a8b
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/nested-private-literal-name-init-err-contains-arguments.js
@@ -0,0 +1,34 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/init-err-contains-arguments.case
+// - src/class-elements/initializer-error/cls-decl-fields-private-name-nested.template
+/*---
+description: Syntax error if `arguments` used in class field (ClassElementName PrivateName)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-public, class-fields-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ FieldDefinition:
+ PropertyNameInitializeropt
+
+ - It is a Syntax Error if ContainsArguments of Initializer is true.
+
+ Static Semantics: ContainsArguments
+ IdentifierReference : Identifier
+
+ 1. If the StringValue of Identifier is "arguments", return true.
+ ...
+ For all other grammatical productions, recurse on all nonterminals. If any piece returns true, then return true. Otherwise return false.
+
+---*/
+
+$DONOTEVALUATE();
+
+class C {
+ #x = () => arguments;
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/nested-private-literal-name-init-err-contains-super.js b/js/src/tests/test262/language/statements/class/elements/nested-private-literal-name-init-err-contains-super.js
new file mode 100644
index 0000000000..3897026538
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/nested-private-literal-name-init-err-contains-super.js
@@ -0,0 +1,27 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/init-err-contains-super.case
+// - src/class-elements/initializer-error/cls-decl-fields-private-name-nested.template
+/*---
+description: Syntax error if `super()` used in class field (ClassElementName PrivateName)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-public, class-fields-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ FieldDefinition:
+ PropertyNameInitializeropt
+
+ - It is a Syntax Error if Initializer is present and Initializer Contains SuperCall is true.
+
+---*/
+
+$DONOTEVALUATE();
+
+class C {
+ #x = () => super();
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/nested-private-ternary-init-err-contains-arguments.js b/js/src/tests/test262/language/statements/class/elements/nested-private-ternary-init-err-contains-arguments.js
new file mode 100644
index 0000000000..1679bacb40
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/nested-private-ternary-init-err-contains-arguments.js
@@ -0,0 +1,34 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/init-err-contains-arguments.case
+// - src/class-elements/initializer-error/cls-decl-fields-private-ternary-nested.template
+/*---
+description: Syntax error if `arguments` used in class field (private field, ternary expression)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-public, class-fields-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ FieldDefinition:
+ PropertyNameInitializeropt
+
+ - It is a Syntax Error if ContainsArguments of Initializer is true.
+
+ Static Semantics: ContainsArguments
+ IdentifierReference : Identifier
+
+ 1. If the StringValue of Identifier is "arguments", return true.
+ ...
+ For all other grammatical productions, recurse on all nonterminals. If any piece returns true, then return true. Otherwise return false.
+
+---*/
+
+$DONOTEVALUATE();
+
+class C {
+ #x = () => false ? {} : arguments;
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/nested-private-ternary-init-err-contains-super.js b/js/src/tests/test262/language/statements/class/elements/nested-private-ternary-init-err-contains-super.js
new file mode 100644
index 0000000000..c94b09834e
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/nested-private-ternary-init-err-contains-super.js
@@ -0,0 +1,27 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/init-err-contains-super.case
+// - src/class-elements/initializer-error/cls-decl-fields-private-ternary-nested.template
+/*---
+description: Syntax error if `super()` used in class field (private field, ternary expression)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-public, class-fields-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ FieldDefinition:
+ PropertyNameInitializeropt
+
+ - It is a Syntax Error if Initializer is present and Initializer Contains SuperCall is true.
+
+---*/
+
+$DONOTEVALUATE();
+
+class C {
+ #x = () => false ? {} : super();
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/nested-private-typeof-init-err-contains-arguments.js b/js/src/tests/test262/language/statements/class/elements/nested-private-typeof-init-err-contains-arguments.js
new file mode 100644
index 0000000000..a065f17a75
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/nested-private-typeof-init-err-contains-arguments.js
@@ -0,0 +1,34 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/init-err-contains-arguments.case
+// - src/class-elements/initializer-error/cls-decl-fields-private-typeof-nested.template
+/*---
+description: Syntax error if `arguments` used in class field (private field, typeof expression)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-public, class-fields-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ FieldDefinition:
+ PropertyNameInitializeropt
+
+ - It is a Syntax Error if ContainsArguments of Initializer is true.
+
+ Static Semantics: ContainsArguments
+ IdentifierReference : Identifier
+
+ 1. If the StringValue of Identifier is "arguments", return true.
+ ...
+ For all other grammatical productions, recurse on all nonterminals. If any piece returns true, then return true. Otherwise return false.
+
+---*/
+
+$DONOTEVALUATE();
+
+class C {
+ #x = () => typeof arguments;
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/nested-private-typeof-init-err-contains-super.js b/js/src/tests/test262/language/statements/class/elements/nested-private-typeof-init-err-contains-super.js
new file mode 100644
index 0000000000..8932fdcd0b
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/nested-private-typeof-init-err-contains-super.js
@@ -0,0 +1,27 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/init-err-contains-super.case
+// - src/class-elements/initializer-error/cls-decl-fields-private-typeof-nested.template
+/*---
+description: Syntax error if `super()` used in class field (private field, typeof expression)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-public, class-fields-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ FieldDefinition:
+ PropertyNameInitializeropt
+
+ - It is a Syntax Error if Initializer is present and Initializer Contains SuperCall is true.
+
+---*/
+
+$DONOTEVALUATE();
+
+class C {
+ #x = () => typeof super();
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/nested-static-comp-name-init-err-contains-arguments.js b/js/src/tests/test262/language/statements/class/elements/nested-static-comp-name-init-err-contains-arguments.js
new file mode 100644
index 0000000000..96be893a02
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/nested-static-comp-name-init-err-contains-arguments.js
@@ -0,0 +1,35 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/init-err-contains-arguments.case
+// - src/class-elements/initializer-error/cls-decl-fields-static-comp-name-nested.template
+/*---
+description: Syntax error if `arguments` used in class field (static computed ClassElementName)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-public, class-static-fields-public, computed-property-names]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ FieldDefinition:
+ PropertyNameInitializeropt
+
+ - It is a Syntax Error if ContainsArguments of Initializer is true.
+
+ Static Semantics: ContainsArguments
+ IdentifierReference : Identifier
+
+ 1. If the StringValue of Identifier is "arguments", return true.
+ ...
+ For all other grammatical productions, recurse on all nonterminals. If any piece returns true, then return true. Otherwise return false.
+
+---*/
+
+$DONOTEVALUATE();
+
+var x = "string";
+class C {
+ static [x] = () => arguments;
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/nested-static-comp-name-init-err-contains-super.js b/js/src/tests/test262/language/statements/class/elements/nested-static-comp-name-init-err-contains-super.js
new file mode 100644
index 0000000000..533d727312
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/nested-static-comp-name-init-err-contains-super.js
@@ -0,0 +1,28 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/init-err-contains-super.case
+// - src/class-elements/initializer-error/cls-decl-fields-static-comp-name-nested.template
+/*---
+description: Syntax error if `super()` used in class field (static computed ClassElementName)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-public, class-static-fields-public, computed-property-names]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ FieldDefinition:
+ PropertyNameInitializeropt
+
+ - It is a Syntax Error if Initializer is present and Initializer Contains SuperCall is true.
+
+---*/
+
+$DONOTEVALUATE();
+
+var x = "string";
+class C {
+ static [x] = () => super();
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/nested-static-literal-init-err-contains-arguments.js b/js/src/tests/test262/language/statements/class/elements/nested-static-literal-init-err-contains-arguments.js
new file mode 100644
index 0000000000..3dcf75e485
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/nested-static-literal-init-err-contains-arguments.js
@@ -0,0 +1,34 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/init-err-contains-arguments.case
+// - src/class-elements/initializer-error/cls-decl-fields-static-literal-name-nested.template
+/*---
+description: Syntax error if `arguments` used in class field (static literal ClassElementName)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-public, class-static-fields-public]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ FieldDefinition:
+ PropertyNameInitializeropt
+
+ - It is a Syntax Error if ContainsArguments of Initializer is true.
+
+ Static Semantics: ContainsArguments
+ IdentifierReference : Identifier
+
+ 1. If the StringValue of Identifier is "arguments", return true.
+ ...
+ For all other grammatical productions, recurse on all nonterminals. If any piece returns true, then return true. Otherwise return false.
+
+---*/
+
+$DONOTEVALUATE();
+
+class C {
+ static x = () => arguments;
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/nested-static-literal-init-err-contains-super.js b/js/src/tests/test262/language/statements/class/elements/nested-static-literal-init-err-contains-super.js
new file mode 100644
index 0000000000..a211594fda
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/nested-static-literal-init-err-contains-super.js
@@ -0,0 +1,27 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/init-err-contains-super.case
+// - src/class-elements/initializer-error/cls-decl-fields-static-literal-name-nested.template
+/*---
+description: Syntax error if `super()` used in class field (static literal ClassElementName)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-public, class-static-fields-public]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ FieldDefinition:
+ PropertyNameInitializeropt
+
+ - It is a Syntax Error if Initializer is present and Initializer Contains SuperCall is true.
+
+---*/
+
+$DONOTEVALUATE();
+
+class C {
+ static x = () => super();
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/nested-static-private-init-err-contains-arguments.js b/js/src/tests/test262/language/statements/class/elements/nested-static-private-init-err-contains-arguments.js
new file mode 100644
index 0000000000..a02931ce9a
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/nested-static-private-init-err-contains-arguments.js
@@ -0,0 +1,34 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/init-err-contains-arguments.case
+// - src/class-elements/initializer-error/cls-decl-fields-static-private-name-nested.template
+/*---
+description: Syntax error if `arguments` used in class field (static PrivateName)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-public, class-static-fields-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ FieldDefinition:
+ PropertyNameInitializeropt
+
+ - It is a Syntax Error if ContainsArguments of Initializer is true.
+
+ Static Semantics: ContainsArguments
+ IdentifierReference : Identifier
+
+ 1. If the StringValue of Identifier is "arguments", return true.
+ ...
+ For all other grammatical productions, recurse on all nonterminals. If any piece returns true, then return true. Otherwise return false.
+
+---*/
+
+$DONOTEVALUATE();
+
+class C {
+ static #x = () => arguments;
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/nested-static-private-init-err-contains-super.js b/js/src/tests/test262/language/statements/class/elements/nested-static-private-init-err-contains-super.js
new file mode 100644
index 0000000000..5247871b54
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/nested-static-private-init-err-contains-super.js
@@ -0,0 +1,27 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/init-err-contains-super.case
+// - src/class-elements/initializer-error/cls-decl-fields-static-private-name-nested.template
+/*---
+description: Syntax error if `super()` used in class field (static PrivateName)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-public, class-static-fields-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ FieldDefinition:
+ PropertyNameInitializeropt
+
+ - It is a Syntax Error if Initializer is present and Initializer Contains SuperCall is true.
+
+---*/
+
+$DONOTEVALUATE();
+
+class C {
+ static #x = () => super();
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/nested-static-string-literal-name-init-err-contains-arguments.js b/js/src/tests/test262/language/statements/class/elements/nested-static-string-literal-name-init-err-contains-arguments.js
new file mode 100644
index 0000000000..ee3bf5639e
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/nested-static-string-literal-name-init-err-contains-arguments.js
@@ -0,0 +1,34 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/init-err-contains-arguments.case
+// - src/class-elements/initializer-error/cls-decl-fields-static-string-literal-name-nested.template
+/*---
+description: Syntax error if `arguments` used in class field (static string literal ClassElementName)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-public, class-static-fields-public]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ FieldDefinition:
+ PropertyNameInitializeropt
+
+ - It is a Syntax Error if ContainsArguments of Initializer is true.
+
+ Static Semantics: ContainsArguments
+ IdentifierReference : Identifier
+
+ 1. If the StringValue of Identifier is "arguments", return true.
+ ...
+ For all other grammatical productions, recurse on all nonterminals. If any piece returns true, then return true. Otherwise return false.
+
+---*/
+
+$DONOTEVALUATE();
+
+class C {
+ static 'x' = () => arguments;
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/nested-static-string-literal-name-init-err-contains-super.js b/js/src/tests/test262/language/statements/class/elements/nested-static-string-literal-name-init-err-contains-super.js
new file mode 100644
index 0000000000..26c744f4f9
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/nested-static-string-literal-name-init-err-contains-super.js
@@ -0,0 +1,27 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/init-err-contains-super.case
+// - src/class-elements/initializer-error/cls-decl-fields-static-string-literal-name-nested.template
+/*---
+description: Syntax error if `super()` used in class field (static string literal ClassElementName)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-public, class-static-fields-public]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ FieldDefinition:
+ PropertyNameInitializeropt
+
+ - It is a Syntax Error if Initializer is present and Initializer Contains SuperCall is true.
+
+---*/
+
+$DONOTEVALUATE();
+
+class C {
+ static 'x' = () => super();
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/nested-string-literal-name-init-err-contains-arguments.js b/js/src/tests/test262/language/statements/class/elements/nested-string-literal-name-init-err-contains-arguments.js
new file mode 100644
index 0000000000..cb03937f68
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/nested-string-literal-name-init-err-contains-arguments.js
@@ -0,0 +1,34 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/init-err-contains-arguments.case
+// - src/class-elements/initializer-error/cls-decl-fields-string-literal-name-nested.template
+/*---
+description: Syntax error if `arguments` used in class field (string literal ClassElementName)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-public]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ FieldDefinition:
+ PropertyNameInitializeropt
+
+ - It is a Syntax Error if ContainsArguments of Initializer is true.
+
+ Static Semantics: ContainsArguments
+ IdentifierReference : Identifier
+
+ 1. If the StringValue of Identifier is "arguments", return true.
+ ...
+ For all other grammatical productions, recurse on all nonterminals. If any piece returns true, then return true. Otherwise return false.
+
+---*/
+
+$DONOTEVALUATE();
+
+class C {
+ 'x' = () => arguments;
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/nested-string-literal-name-init-err-contains-super.js b/js/src/tests/test262/language/statements/class/elements/nested-string-literal-name-init-err-contains-super.js
new file mode 100644
index 0000000000..08f9b9fe11
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/nested-string-literal-name-init-err-contains-super.js
@@ -0,0 +1,27 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/init-err-contains-super.case
+// - src/class-elements/initializer-error/cls-decl-fields-string-literal-name-nested.template
+/*---
+description: Syntax error if `super()` used in class field (string literal ClassElementName)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-public]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ FieldDefinition:
+ PropertyNameInitializeropt
+
+ - It is a Syntax Error if Initializer is present and Initializer Contains SuperCall is true.
+
+---*/
+
+$DONOTEVALUATE();
+
+class C {
+ 'x' = () => super();
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/nested-ternary-init-err-contains-arguments.js b/js/src/tests/test262/language/statements/class/elements/nested-ternary-init-err-contains-arguments.js
new file mode 100644
index 0000000000..4868adf924
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/nested-ternary-init-err-contains-arguments.js
@@ -0,0 +1,34 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/init-err-contains-arguments.case
+// - src/class-elements/initializer-error/cls-decl-fields-ternary-nested.template
+/*---
+description: Syntax error if `arguments` used in class field (ternary expression)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-public]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ FieldDefinition:
+ PropertyNameInitializeropt
+
+ - It is a Syntax Error if ContainsArguments of Initializer is true.
+
+ Static Semantics: ContainsArguments
+ IdentifierReference : Identifier
+
+ 1. If the StringValue of Identifier is "arguments", return true.
+ ...
+ For all other grammatical productions, recurse on all nonterminals. If any piece returns true, then return true. Otherwise return false.
+
+---*/
+
+$DONOTEVALUATE();
+
+class C {
+ x = () => false ? {} : arguments;
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/nested-ternary-init-err-contains-super.js b/js/src/tests/test262/language/statements/class/elements/nested-ternary-init-err-contains-super.js
new file mode 100644
index 0000000000..2b9ec450d8
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/nested-ternary-init-err-contains-super.js
@@ -0,0 +1,27 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/init-err-contains-super.case
+// - src/class-elements/initializer-error/cls-decl-fields-ternary-nested.template
+/*---
+description: Syntax error if `super()` used in class field (ternary expression)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-public]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ FieldDefinition:
+ PropertyNameInitializeropt
+
+ - It is a Syntax Error if Initializer is present and Initializer Contains SuperCall is true.
+
+---*/
+
+$DONOTEVALUATE();
+
+class C {
+ x = () => false ? {} : super();
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/nested-typeof-init-err-contains-arguments.js b/js/src/tests/test262/language/statements/class/elements/nested-typeof-init-err-contains-arguments.js
new file mode 100644
index 0000000000..f3fd252bcc
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/nested-typeof-init-err-contains-arguments.js
@@ -0,0 +1,34 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/init-err-contains-arguments.case
+// - src/class-elements/initializer-error/cls-decl-fields-typeof-nested.template
+/*---
+description: Syntax error if `arguments` used in class field (typeof expression)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-public]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ FieldDefinition:
+ PropertyNameInitializeropt
+
+ - It is a Syntax Error if ContainsArguments of Initializer is true.
+
+ Static Semantics: ContainsArguments
+ IdentifierReference : Identifier
+
+ 1. If the StringValue of Identifier is "arguments", return true.
+ ...
+ For all other grammatical productions, recurse on all nonterminals. If any piece returns true, then return true. Otherwise return false.
+
+---*/
+
+$DONOTEVALUATE();
+
+class C {
+ x = () => typeof arguments;
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/nested-typeof-init-err-contains-super.js b/js/src/tests/test262/language/statements/class/elements/nested-typeof-init-err-contains-super.js
new file mode 100644
index 0000000000..cffa546d4d
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/nested-typeof-init-err-contains-super.js
@@ -0,0 +1,27 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/init-err-contains-super.case
+// - src/class-elements/initializer-error/cls-decl-fields-typeof-nested.template
+/*---
+description: Syntax error if `super()` used in class field (typeof expression)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-public]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ FieldDefinition:
+ PropertyNameInitializeropt
+
+ - It is a Syntax Error if Initializer is present and Initializer Contains SuperCall is true.
+
+---*/
+
+$DONOTEVALUATE();
+
+class C {
+ x = () => typeof super();
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-computed-names.js b/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-computed-names.js
new file mode 100644
index 0000000000..5772bdea7a
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-computed-names.js
@@ -0,0 +1,108 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/computed-names.case
+// - src/class-elements/productions/cls-decl-new-no-sc-line-method.template
+/*---
+description: Computed property names (field definitions followed by a method in a new line without a semicolon)
+esid: prod-FieldDefinition
+features: [class-fields-public, computed-property-names, class]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement:
+ ...
+ FieldDefinition ;
+
+ FieldDefinition:
+ ClassElementName Initializer_opt
+
+ ClassElementName:
+ PropertyName
+
+---*/
+var x = "b";
+
+
+
+class C {
+ [x] = 42; [10] = "meep"; ["not initialized"]
+ m() { return 42; }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "b"),
+ "b doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "b"),
+ "b doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "b", {
+ value: 42,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "x"),
+ "x doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "x"),
+ "x doesn't appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "x"),
+ "x doesn't appear as an own property on C instance"
+);
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "10"),
+ "10 doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "10"),
+ "10 doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "10", {
+ value: "meep",
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "not initialized"),
+ "'not initialized' doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "not initialized"),
+ "'not initialized' doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "not initialized", {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-computed-symbol-names.js b/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-computed-symbol-names.js
new file mode 100644
index 0000000000..c65e3a6c7a
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-computed-symbol-names.js
@@ -0,0 +1,106 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/computed-symbol-names.case
+// - src/class-elements/productions/cls-decl-new-no-sc-line-method.template
+/*---
+description: Computed property symbol names (field definitions followed by a method in a new line without a semicolon)
+esid: prod-FieldDefinition
+features: [class-fields-public, Symbol, computed-property-names, class]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement:
+ ...
+ FieldDefinition ;
+
+ FieldDefinition:
+ ClassElementName Initializer_opt
+
+ ClassElementName:
+ PropertyName
+
+---*/
+var x = Symbol();
+var y = Symbol();
+
+
+
+class C {
+ [x]; [y] = 42
+ m() { return 42; }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, x),
+ "Symbol x doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, x),
+ "Symbol x doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, x, {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, y),
+ "Symbol y doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, y),
+ "Symbol y doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, y, {
+ value: 42,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "x"),
+ "x doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "x"),
+ "x doesn't appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "x"),
+ "x doesn't appear as an own property on C instance"
+);
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "y"),
+ "y doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "y"),
+ "y doesn't appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "y"),
+ "y doesn't appear as an own property on C instance"
+);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-grammar-privatename-identifier-semantics-stringvalue.js b/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-grammar-privatename-identifier-semantics-stringvalue.js
new file mode 100644
index 0000000000..d5358ecc82
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-grammar-privatename-identifier-semantics-stringvalue.js
@@ -0,0 +1,110 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-privatename-identifier-semantics-stringvalue.case
+// - src/class-elements/productions/cls-decl-new-no-sc-line-method.template
+/*---
+description: PrivateName Static Semantics, StringValue (field definitions followed by a method in a new line without a semicolon)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+
+ 1. Return the String value consisting of the sequence of code
+ units corresponding to PrivateName. In determining the sequence
+ any occurrences of \ UnicodeEscapeSequence are first replaced
+ with the code point represented by the UnicodeEscapeSequence
+ and then the code points of the entire PrivateName are converted
+ to code units by UTF16Encoding (10.1.1) each code point.
+
+---*/
+
+
+class C {
+ #\u{6F};
+ #\u2118;
+ #ZW_\u200C_NJ;
+ #ZW_\u200D_J;
+ m() { return 42; }
+ o(value) {
+ this.#o = value;
+ return this.#o;
+ }
+ ℘(value) {
+ this.#℘ = value;
+ return this.#℘;
+ }
+ ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS METHOD
+ this.#ZW_‌_NJ = value;
+ return this.#ZW_‌_NJ;
+ }
+ ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS METHOD
+ this.#ZW_‍_J = value;
+ return this.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.o(1), 1);
+assert.sameValue(c.℘(1), 1);
+assert.sameValue(c.ZW_‌_NJ(1), 1);
+assert.sameValue(c.ZW_‍_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-literal-names-asi.js b/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-literal-names-asi.js
new file mode 100644
index 0000000000..730fec9f6b
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-literal-names-asi.js
@@ -0,0 +1,78 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/literal-names-asi.case
+// - src/class-elements/productions/cls-decl-new-no-sc-line-method.template
+/*---
+description: Literal property names with ASI (field definitions followed by a method in a new line without a semicolon)
+esid: prod-FieldDefinition
+features: [class-fields-public, class]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement:
+ ...
+ FieldDefinition ;
+
+ FieldDefinition:
+ ClassElementName Initializer_opt
+
+ ClassElementName:
+ PropertyName
+
+---*/
+
+
+class C {
+ a
+ b = 42;
+ m() { return 42; }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "a"),
+ "a doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "a"),
+ "a doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "a", {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "b"),
+ "b doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "b"),
+ "b doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "b", {
+ value: 42,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-literal-names.js b/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-literal-names.js
new file mode 100644
index 0000000000..2ba4cf4418
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-literal-names.js
@@ -0,0 +1,97 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/literal-names.case
+// - src/class-elements/productions/cls-decl-new-no-sc-line-method.template
+/*---
+description: Literal property names (field definitions followed by a method in a new line without a semicolon)
+esid: prod-FieldDefinition
+features: [class-fields-public, class]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement:
+ ...
+ FieldDefinition ;
+
+ FieldDefinition:
+ ClassElementName Initializer_opt
+
+ ClassElementName:
+ PropertyName
+
+---*/
+const fn = function() {}
+
+
+
+class C {
+ a; b = 42;
+ c = fn
+ m() { return 42; }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "a"),
+ "a doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "a"),
+ "a doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "a", {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "b"),
+ "b doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "b"),
+ "b doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "b", {
+ value: 42,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "c"),
+ "c doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "c"),
+ "c doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "c", {
+ value: fn,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-private-field-usage.js b/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-private-field-usage.js
new file mode 100644
index 0000000000..f4c1de7f9e
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-private-field-usage.js
@@ -0,0 +1,50 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-field-usage.case
+// - src/class-elements/productions/cls-decl-new-no-sc-line-method.template
+/*---
+description: PrivateName CallExpression usage (private field) (field definitions followed by a method in a new line without a semicolon)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ Updated Productions
+
+ CallExpression[Yield, Await]:
+ CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+ SuperCall[?Yield, ?Await]
+ CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+ CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+ CallExpression[?Yield, ?Await].IdentifierName
+ CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+ CallExpression[?Yield, ?Await].PrivateName
+
+---*/
+
+
+class C {
+ #m = 'test262';
+ m() { return 42; }
+ method() {
+ return this.#m;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.method(), 'test262');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-private-method-getter-usage.js b/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-private-method-getter-usage.js
new file mode 100644
index 0000000000..cc6ada0071
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-private-method-getter-usage.js
@@ -0,0 +1,50 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-method-getter-usage.case
+// - src/class-elements/productions/cls-decl-new-no-sc-line-method.template
+/*---
+description: PrivateName CallExpression usage (Accesor get method) (field definitions followed by a method in a new line without a semicolon)
+esid: prod-FieldDefinition
+features: [class-methods-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ Updated Productions
+
+ CallExpression[Yield, Await]:
+ CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+ SuperCall[?Yield, ?Await]
+ CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+ CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+ CallExpression[?Yield, ?Await].IdentifierName
+ CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+ CallExpression[?Yield, ?Await].PrivateName
+
+---*/
+
+
+class C {
+ get #m() { return 'test262'; }
+ m() { return 42; }
+ method() {
+ return this.#m;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.method(), 'test262');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-private-method-usage.js b/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-private-method-usage.js
new file mode 100644
index 0000000000..ed4e7aa0ba
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-private-method-usage.js
@@ -0,0 +1,50 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-method-usage.case
+// - src/class-elements/productions/cls-decl-new-no-sc-line-method.template
+/*---
+description: PrivateName CallExpression usage (private method) (field definitions followed by a method in a new line without a semicolon)
+esid: prod-FieldDefinition
+features: [class-methods-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ Updated Productions
+
+ CallExpression[Yield, Await]:
+ CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+ SuperCall[?Yield, ?Await]
+ CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+ CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+ CallExpression[?Yield, ?Await].IdentifierName
+ CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+ CallExpression[?Yield, ?Await].PrivateName
+
+---*/
+
+
+class C {
+ #m() { return 'test262'; }
+ m() { return 42; }
+ method() {
+ return this.#m();
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.method(), 'test262');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-private-names.js b/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-private-names.js
new file mode 100644
index 0000000000..7e7e12716a
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-private-names.js
@@ -0,0 +1,72 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-names.case
+// - src/class-elements/productions/cls-decl-new-no-sc-line-method.template
+/*---
+description: private names (field definitions followed by a method in a new line without a semicolon)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ FieldDefinition ;
+
+ FieldDefinition :
+ ClassElementName Initializer_opt
+
+ ClassElementName :
+ PrivateName
+
+ PrivateName :
+ # IdentifierName
+
+---*/
+
+
+class C {
+ #x; #y
+ m() { return 42; }
+ x() {
+ this.#x = 42;
+ return this.#x;
+ }
+ y() {
+ this.#y = 43;
+ return this.#y;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+// Test the private fields do not appear as properties before set to value
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#x"), "test 1");
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 2");
+assert(!Object.prototype.hasOwnProperty.call(c, "#x"), "test 3");
+
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#y"), "test 4");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 5");
+assert(!Object.prototype.hasOwnProperty.call(c, "#y"), "test 6");
+
+// Test if private fields can be sucessfully accessed and set to value
+assert.sameValue(c.x(), 42, "test 7");
+assert.sameValue(c.y(), 43, "test 8");
+
+// Test the private fields do not appear as properties before after set to value
+assert(!Object.prototype.hasOwnProperty.call(c, "#x"), "test 9");
+assert(!Object.prototype.hasOwnProperty.call(c, "#y"), "test 10");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-field-identifier-initializer.js b/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-field-identifier-initializer.js
new file mode 100644
index 0000000000..0aa8cf5549
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-field-identifier-initializer.js
@@ -0,0 +1,88 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-field-identifier-initializer.case
+// - src/class-elements/productions/cls-decl-new-no-sc-line-method.template
+/*---
+description: Valid FieldDefinition (field definitions followed by a method in a new line without a semicolon)
+esid: prod-FieldDefinition
+features: [class-fields-public, class]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+
+ PropertyName :
+ LiteralPropertyName
+ ComputedPropertyName
+
+ LiteralPropertyName :
+ IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ $ = 1; _ = 1; \u{6F} = 1; \u2118 = 1; ZW_\u200C_NJ = 1; ZW_\u200D_J = 1
+ m() { return 42; }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$, 1);
+assert.sameValue(c._, 1);
+assert.sameValue(c.\u{6F}, 1);
+assert.sameValue(c.\u2118, 1);
+assert.sameValue(c.ZW_\u200C_NJ, 1);
+assert.sameValue(c.ZW_\u200D_J, 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-field-identifier.js b/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-field-identifier.js
new file mode 100644
index 0000000000..f82c1d13b3
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-field-identifier.js
@@ -0,0 +1,95 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-field-identifier.case
+// - src/class-elements/productions/cls-decl-new-no-sc-line-method.template
+/*---
+description: Valid FieldDefinition (field definitions followed by a method in a new line without a semicolon)
+esid: prod-FieldDefinition
+features: [class-fields-public, class]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+
+ PropertyName :
+ LiteralPropertyName
+ ComputedPropertyName
+
+ LiteralPropertyName :
+ IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ $; _; \u{6F}; \u2118; ZW_\u200C_NJ; ZW_\u200D_J
+ m() { return 42; }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+c.$ = 1;
+c._ = 1;
+c.\u{6F} = 1;
+c.\u2118 = 1;
+c.ZW_\u200C_NJ = 1;
+c.ZW_\u200D_J = 1;
+
+assert.sameValue(c.$, 1);
+assert.sameValue(c._, 1);
+assert.sameValue(c.\u{6F}, 1);
+assert.sameValue(c.\u2118, 1);
+assert.sameValue(c.ZW_\u200C_NJ, 1);
+assert.sameValue(c.ZW_\u200D_J, 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-private-getter-alt.js b/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-private-getter-alt.js
new file mode 100644
index 0000000000..25431263b4
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-private-getter-alt.js
@@ -0,0 +1,129 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-getter-alt.case
+// - src/class-elements/productions/cls-decl-new-no-sc-line-method.template
+/*---
+description: Valid PrivateName as private getter (field definitions followed by a method in a new line without a semicolon)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ...
+ get ClassElementName ( ){ FunctionBody }
+ ...
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ #$_; #__; #\u{6F}_; #℘_; #ZW_‌_NJ_; #ZW_‍_J_;
+ get #$() {
+ return this.#$_;
+ }
+ get #_() {
+ return this.#__;
+ }
+ get #\u{6F}() {
+ return this.#\u{6F}_;
+ }
+ get #℘() {
+ return this.#℘_;
+ }
+ get #ZW_‌_NJ() {
+ return this.#ZW_‌_NJ_;
+ }
+ get #ZW_‍_J() {
+ return this.#ZW_‍_J_;
+ }
+
+ m() { return 42; }
+ $(value) {
+ this.#$_ = value;
+ return this.#$;
+ }
+ _(value) {
+ this.#__ = value;
+ return this.#_;
+ }
+ \u{6F}(value) {
+ this.#\u{6F}_ = value;
+ return this.#\u{6F};
+ }
+ ℘(value) {
+ this.#℘_ = value;
+ return this.#℘;
+ }
+ ZW_‌_NJ(value) {
+ this.#ZW_‌_NJ_ = value;
+ return this.#ZW_‌_NJ;
+ }
+ ZW_‍_J(value) {
+ this.#ZW_‍_J_ = value;
+ return this.#ZW_‍_J;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.℘(1), 1);
+assert.sameValue(c.ZW_‌_NJ(1), 1);
+assert.sameValue(c.ZW_‍_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-private-getter.js b/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-private-getter.js
new file mode 100644
index 0000000000..642a2eb491
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-private-getter.js
@@ -0,0 +1,129 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-getter.case
+// - src/class-elements/productions/cls-decl-new-no-sc-line-method.template
+/*---
+description: Valid PrivateName as private getter (field definitions followed by a method in a new line without a semicolon)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ...
+ get ClassElementName ( ){ FunctionBody }
+ ...
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ #$_; #__; #\u{6F}_; #\u2118_; #ZW_\u200C_NJ_; #ZW_\u200D_J_;
+ get #$() {
+ return this.#$_;
+ }
+ get #_() {
+ return this.#__;
+ }
+ get #\u{6F}() {
+ return this.#\u{6F}_;
+ }
+ get #\u2118() {
+ return this.#\u2118_;
+ }
+ get #ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ_;
+ }
+ get #ZW_\u200D_J() {
+ return this.#ZW_\u200D_J_;
+ }
+
+ m() { return 42; }
+ $(value) {
+ this.#$_ = value;
+ return this.#$;
+ }
+ _(value) {
+ this.#__ = value;
+ return this.#_;
+ }
+ \u{6F}(value) {
+ this.#\u{6F}_ = value;
+ return this.#\u{6F};
+ }
+ \u2118(value) {
+ this.#\u2118_ = value;
+ return this.#\u2118;
+ }
+ ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ_ = value;
+ return this.#ZW_\u200C_NJ;
+ }
+ ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J_ = value;
+ return this.#ZW_\u200D_J;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.\u2118(1), 1);
+assert.sameValue(c.ZW_\u200C_NJ(1), 1);
+assert.sameValue(c.ZW_\u200D_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-private-method-alt.js b/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-private-method-alt.js
new file mode 100644
index 0000000000..6bb366ad75
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-private-method-alt.js
@@ -0,0 +1,128 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-method-alt.case
+// - src/class-elements/productions/cls-decl-new-no-sc-line-method.template
+/*---
+description: Valid PrivateName as private method (field definitions followed by a method in a new line without a semicolon)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ClassElementName ( UniqueFormalParameters ) { FunctionBody }
+ ...
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ #$_; #__; #\u{6F}_; #℘_; #ZW_‌_NJ_; #ZW_‍_J_;
+ #$() {
+ return this.#$_;
+ }
+ #_() {
+ return this.#__;
+ }
+ #\u{6F}() {
+ return this.#\u{6F}_;
+ }
+ #℘() {
+ return this.#℘_;
+ }
+ #ZW_‌_NJ() {
+ return this.#ZW_‌_NJ_;
+ }
+ #ZW_‍_J() {
+ return this.#ZW_‍_J_;
+ }
+
+ m() { return 42; }
+ $(value) {
+ this.#$_ = value;
+ return this.#$();
+ }
+ _(value) {
+ this.#__ = value;
+ return this.#_();
+ }
+ \u{6F}(value) {
+ this.#\u{6F}_ = value;
+ return this.#\u{6F}();
+ }
+ ℘(value) {
+ this.#℘_ = value;
+ return this.#℘();
+ }
+ ZW_‌_NJ(value) {
+ this.#ZW_‌_NJ_ = value;
+ return this.#ZW_‌_NJ();
+ }
+ ZW_‍_J(value) {
+ this.#ZW_‍_J_ = value;
+ return this.#ZW_‍_J();
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.℘(1), 1);
+assert.sameValue(c.ZW_‌_NJ(1), 1);
+assert.sameValue(c.ZW_‍_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-private-method.js b/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-private-method.js
new file mode 100644
index 0000000000..72947f435c
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-private-method.js
@@ -0,0 +1,128 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-method.case
+// - src/class-elements/productions/cls-decl-new-no-sc-line-method.template
+/*---
+description: Valid PrivateName as private method (field definitions followed by a method in a new line without a semicolon)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ClassElementName ( UniqueFormalParameters ) { FunctionBody }
+ ...
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ #$_; #__; #\u{6F}_; #\u2118_; #ZW_\u200C_NJ_; #ZW_\u200D_J_;
+ #$() {
+ return this.#$_;
+ }
+ #_() {
+ return this.#__;
+ }
+ #\u{6F}() {
+ return this.#\u{6F}_;
+ }
+ #\u2118() {
+ return this.#\u2118_;
+ }
+ #ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ_;
+ }
+ #ZW_\u200D_J() {
+ return this.#ZW_\u200D_J_;
+ }
+
+ m() { return 42; }
+ $(value) {
+ this.#$_ = value;
+ return this.#$();
+ }
+ _(value) {
+ this.#__ = value;
+ return this.#_();
+ }
+ \u{6F}(value) {
+ this.#\u{6F}_ = value;
+ return this.#\u{6F}();
+ }
+ \u2118(value) {
+ this.#\u2118_ = value;
+ return this.#\u2118();
+ }
+ ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ_ = value;
+ return this.#ZW_\u200C_NJ();
+ }
+ ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J_ = value;
+ return this.#ZW_\u200D_J();
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.\u2118(1), 1);
+assert.sameValue(c.ZW_\u200C_NJ(1), 1);
+assert.sameValue(c.ZW_\u200D_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-private-setter-alt.js b/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-private-setter-alt.js
new file mode 100644
index 0000000000..04a7af2f92
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-private-setter-alt.js
@@ -0,0 +1,128 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-setter-alt.case
+// - src/class-elements/productions/cls-decl-new-no-sc-line-method.template
+/*---
+description: Valid PrivateName as private setter (field definitions followed by a method in a new line without a semicolon)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ...
+ set ClassElementName ( PropertySetParameterList ) { FunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ #$_; #__; #\u{6F}_; #℘_; #ZW_‌_NJ_; #ZW_‍_J_;
+ set #$(value) {
+ this.#$_ = value;
+ }
+ set #_(value) {
+ this.#__ = value;
+ }
+ set #\u{6F}(value) {
+ this.#\u{6F}_ = value;
+ }
+ set #℘(value) {
+ this.#℘_ = value;
+ }
+ set #ZW_‌_NJ(value) {
+ this.#ZW_‌_NJ_ = value;
+ }
+ set #ZW_‍_J(value) {
+ this.#ZW_‍_J_ = value;
+ }
+
+ m() { return 42; }
+ $(value) {
+ this.#$ = value;
+ return this.#$_;
+ }
+ _(value) {
+ this.#_ = value;
+ return this.#__;
+ }
+ \u{6F}(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F}_;
+ }
+ ℘(value) {
+ this.#℘ = value;
+ return this.#℘_;
+ }
+ ZW_‌_NJ(value) {
+ this.#ZW_‌_NJ = value;
+ return this.#ZW_‌_NJ_;
+ }
+ ZW_‍_J(value) {
+ this.#ZW_‍_J = value;
+ return this.#ZW_‍_J_;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.℘(1), 1);
+assert.sameValue(c.ZW_‌_NJ(1), 1);
+assert.sameValue(c.ZW_‍_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-private-setter.js b/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-private-setter.js
new file mode 100644
index 0000000000..478b154ae1
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-private-setter.js
@@ -0,0 +1,128 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-setter.case
+// - src/class-elements/productions/cls-decl-new-no-sc-line-method.template
+/*---
+description: Valid PrivateName as private setter (field definitions followed by a method in a new line without a semicolon)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ...
+ set ClassElementName ( PropertySetParameterList ) { FunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ #$_; #__; #\u{6F}_; #\u2118_; #ZW_\u200C_NJ_; #ZW_\u200D_J_;
+ set #$(value) {
+ this.#$_ = value;
+ }
+ set #_(value) {
+ this.#__ = value;
+ }
+ set #\u{6F}(value) {
+ this.#\u{6F}_ = value;
+ }
+ set #\u2118(value) {
+ this.#\u2118_ = value;
+ }
+ set #ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ_ = value;
+ }
+ set #ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J_ = value;
+ }
+
+ m() { return 42; }
+ $(value) {
+ this.#$ = value;
+ return this.#$_;
+ }
+ _(value) {
+ this.#_ = value;
+ return this.#__;
+ }
+ \u{6F}(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F}_;
+ }
+ \u2118(value) {
+ this.#\u2118 = value;
+ return this.#\u2118_;
+ }
+ ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ = value;
+ return this.#ZW_\u200C_NJ_;
+ }
+ ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J = value;
+ return this.#ZW_\u200D_J_;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.\u2118(1), 1);
+assert.sameValue(c.ZW_\u200C_NJ(1), 1);
+assert.sameValue(c.ZW_\u200D_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-privatename-identifier-alt.js
new file mode 100644
index 0000000000..71a5f0d71e
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-privatename-identifier-alt.js
@@ -0,0 +1,110 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-new-no-sc-line-method.template
+/*---
+description: Valid PrivateName (field definitions followed by a method in a new line without a semicolon)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ #$; #_; #\u{6F}; #℘; #ZW_‌_NJ; #ZW_‍_J
+ m() { return 42; }
+ $(value) {
+ this.#$ = value;
+ return this.#$;
+ }
+ _(value) {
+ this.#_ = value;
+ return this.#_;
+ }
+ \u{6F}(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F};
+ }
+ ℘(value) {
+ this.#℘ = value;
+ return this.#℘;
+ }
+ ZW_‌_NJ(value) {
+ this.#ZW_‌_NJ = value;
+ return this.#ZW_‌_NJ;
+ }
+ ZW_‍_J(value) {
+ this.#ZW_‍_J = value;
+ return this.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.℘(1), 1);
+assert.sameValue(c.ZW_‌_NJ(1), 1);
+assert.sameValue(c.ZW_‍_J(1), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-privatename-identifier-initializer-alt.js b/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-privatename-identifier-initializer-alt.js
new file mode 100644
index 0000000000..6401ea1ada
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-privatename-identifier-initializer-alt.js
@@ -0,0 +1,104 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-privatename-identifier-initializer-alt.case
+// - src/class-elements/productions/cls-decl-new-no-sc-line-method.template
+/*---
+description: Valid PrivateName (field definitions followed by a method in a new line without a semicolon)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ #$ = 1; #_ = 1; #\u{6F} = 1; #℘ = 1; #ZW_‌_NJ = 1; #ZW_‍_J = 1
+ m() { return 42; }
+ $() {
+ return this.#$;
+ }
+ _() {
+ return this.#_;
+ }
+ \u{6F}() {
+ return this.#\u{6F};
+ }
+ ℘() {
+ return this.#℘;
+ }
+ ZW_‌_NJ() {
+ return this.#ZW_‌_NJ;
+ }
+ ZW_‍_J() {
+ return this.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(), 1);
+assert.sameValue(c._(), 1);
+assert.sameValue(c.\u{6F}(), 1);
+assert.sameValue(c.℘(), 1);
+assert.sameValue(c.ZW_‌_NJ(), 1);
+assert.sameValue(c.ZW_‍_J(), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-privatename-identifier-initializer.js b/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-privatename-identifier-initializer.js
new file mode 100644
index 0000000000..cddab94cb3
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-privatename-identifier-initializer.js
@@ -0,0 +1,104 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-privatename-identifier-initializer.case
+// - src/class-elements/productions/cls-decl-new-no-sc-line-method.template
+/*---
+description: Valid PrivateName (field definitions followed by a method in a new line without a semicolon)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ #$ = 1; #_ = 1; #\u{6F} = 1; #\u2118 = 1; #ZW_\u200C_NJ = 1; #ZW_\u200D_J = 1
+ m() { return 42; }
+ $() {
+ return this.#$;
+ }
+ _() {
+ return this.#_;
+ }
+ \u{6F}() {
+ return this.#\u{6F};
+ }
+ \u2118() {
+ return this.#\u2118;
+ }
+ ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ;
+ }
+ ZW_\u200D_J() {
+ return this.#ZW_\u200D_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(), 1);
+assert.sameValue(c._(), 1);
+assert.sameValue(c.\u{6F}(), 1);
+assert.sameValue(c.\u2118(), 1);
+assert.sameValue(c.ZW_\u200C_NJ(), 1);
+assert.sameValue(c.ZW_\u200D_J(), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-privatename-identifier.js
new file mode 100644
index 0000000000..9cd8abddef
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-privatename-identifier.js
@@ -0,0 +1,110 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-new-no-sc-line-method.template
+/*---
+description: Valid PrivateName (field definitions followed by a method in a new line without a semicolon)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ #$; #_; #\u{6F}; #\u2118; #ZW_\u200C_NJ; #ZW_\u200D_J
+ m() { return 42; }
+ $(value) {
+ this.#$ = value;
+ return this.#$;
+ }
+ _(value) {
+ this.#_ = value;
+ return this.#_;
+ }
+ \u{6F}(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F};
+ }
+ \u2118(value) {
+ this.#\u2118 = value;
+ return this.#\u2118;
+ }
+ ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ = value;
+ return this.#ZW_\u200C_NJ;
+ }
+ ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J = value;
+ return this.#ZW_\u200D_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.\u2118(1), 1);
+assert.sameValue(c.ZW_\u200C_NJ(1), 1);
+assert.sameValue(c.ZW_\u200D_J(1), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-static-async-generator-method-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-static-async-generator-method-privatename-identifier-alt.js
new file mode 100644
index 0000000000..1115796bfd
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-static-async-generator-method-privatename-identifier-alt.js
@@ -0,0 +1,135 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-async-generator-method-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-new-no-sc-line-method.template
+/*---
+description: Valid Static AsyncGeneratorMethod PrivateName (field definitions followed by a method in a new line without a semicolon)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static async * #$(value) {
+ yield * await value;
+ }
+ static async * #_(value) {
+ yield * await value;
+ }
+ static async * #o(value) {
+ yield * await value;
+ }
+ static async * #℘(value) {
+ yield * await value;
+ }
+ static async * #ZW_‌_NJ(value) {
+ yield * await value;
+ }
+ static async * #ZW_‍_J(value) {
+ yield * await value;
+ }
+ m() { return 42; }
+ static get $() {
+ return this.#$;
+ }
+ static get _() {
+ return this.#_;
+ }
+ static get o() {
+ return this.#o;
+ }
+ static get ℘() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#℘;
+ }
+ static get ZW_‌_NJ() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‌_NJ;
+ }
+ static get ZW_‍_J() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‍_J;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+Promise.all([
+ C.$([1]).next(),
+ C._([1]).next(),
+ C.o([1]).next(),
+ C.℘([1]).next(), // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.ZW_‌_NJ([1]).next(), // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.ZW_‍_J([1]).next(), // DO NOT CHANGE THE NAME OF THIS FIELD
+]).then(results => {
+
+ assert.sameValue(results[0].value, 1);
+ assert.sameValue(results[1].value, 1);
+ assert.sameValue(results[2].value, 1);
+ assert.sameValue(results[3].value, 1);
+ assert.sameValue(results[4].value, 1);
+ assert.sameValue(results[5].value, 1);
+
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-static-async-generator-method-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-static-async-generator-method-privatename-identifier.js
new file mode 100644
index 0000000000..01c5527c19
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-static-async-generator-method-privatename-identifier.js
@@ -0,0 +1,136 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-async-generator-method-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-new-no-sc-line-method.template
+/*---
+description: Valid Static AsyncGeneratorMethod PrivateName (field definitions followed by a method in a new line without a semicolon)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static async * #$(value) {
+ yield * await value;
+ }
+ static async * #_(value) {
+ yield * await value;
+ }
+ static async * #\u{6F}(value) {
+ yield * await value;
+ }
+ static async * #\u2118(value) {
+ yield * await value;
+ }
+ static async * #ZW_\u200C_NJ(value) {
+ yield * await value;
+ }
+ static async * #ZW_\u200D_J(value) {
+ yield * await value;
+ }
+ m() { return 42; }
+ static get $() {
+ return this.#$;
+ }
+ static get _() {
+ return this.#_;
+ }
+ static get \u{6F}() {
+ return this.#\u{6F};
+ }
+ static get \u2118() {
+ return this.#\u2118;
+ }
+ static get ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ;
+ }
+ static get ZW_\u200D_J() {
+ return this.#ZW_\u200D_J;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+Promise.all([
+ C.$([1]).next(),
+ C._([1]).next(),
+ C.\u{6F}([1]).next(),
+ C.\u2118([1]).next(),
+ C.ZW_\u200C_NJ([1]).next(),
+ C.ZW_\u200D_J([1]).next(),
+]).then(results => {
+
+ assert.sameValue(results[0].value, 1);
+ assert.sameValue(results[1].value, 1);
+ assert.sameValue(results[2].value, 1);
+ assert.sameValue(results[3].value, 1);
+ assert.sameValue(results[4].value, 1);
+ assert.sameValue(results[5].value, 1);
+
+}).then($DONE, $DONE);
+
diff --git a/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-static-async-method-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-static-async-method-privatename-identifier-alt.js
new file mode 100644
index 0000000000..6fb19f0e10
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-static-async-method-privatename-identifier-alt.js
@@ -0,0 +1,135 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-async-method-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-new-no-sc-line-method.template
+/*---
+description: Valid Static AsyncMethod PrivateName (field definitions followed by a method in a new line without a semicolon)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ AsyncMethod
+
+ AsyncMethod :
+ async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static async #$(value) {
+ return await value;
+ }
+ static async #_(value) {
+ return await value;
+ }
+ static async #o(value) {
+ return await value;
+ }
+ static async #℘(value) {
+ return await value;
+ }
+ static async #ZW_‌_NJ(value) {
+ return await value;
+ }
+ static async #ZW_‍_J(value) {
+ return await value;
+ }
+ m() { return 42; }
+ static async $(value) {
+ return await this.#$(value);
+ }
+ static async _(value) {
+ return await this.#_(value);
+ }
+ static async o(value) {
+ return await this.#o(value);
+ }
+ static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return await this.#℘(value);
+ }
+ static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return await this.#ZW_‌_NJ(value);
+ }
+ static async ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return await this.#ZW_‍_J(value);
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+Promise.all([
+ C.$(1),
+ C._(1),
+ C.o(1),
+ C.℘(1), // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.ZW_‌_NJ(1), // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.ZW_‍_J(1), // DO NOT CHANGE THE NAME OF THIS FIELD
+]).then(results => {
+
+ assert.sameValue(results[0], 1);
+ assert.sameValue(results[1], 1);
+ assert.sameValue(results[2], 1);
+ assert.sameValue(results[3], 1);
+ assert.sameValue(results[4], 1);
+ assert.sameValue(results[5], 1);
+
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-static-async-method-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-static-async-method-privatename-identifier.js
new file mode 100644
index 0000000000..2fedbcc4e9
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-static-async-method-privatename-identifier.js
@@ -0,0 +1,136 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-async-method-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-new-no-sc-line-method.template
+/*---
+description: Valid Static AsyncMethod PrivateName (field definitions followed by a method in a new line without a semicolon)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ AsyncMethod
+
+ AsyncMethod :
+ async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static async #$(value) {
+ return await value;
+ }
+ static async #_(value) {
+ return await value;
+ }
+ static async #\u{6F}(value) {
+ return await value;
+ }
+ static async #\u2118(value) {
+ return await value;
+ }
+ static async #ZW_\u200C_NJ(value) {
+ return await value;
+ }
+ static async #ZW_\u200D_J(value) {
+ return await value;
+ }
+ m() { return 42; }
+ static async $(value) {
+ return await this.#$(value);
+ }
+ static async _(value) {
+ return await this.#_(value);
+ }
+ static async \u{6F}(value) {
+ return await this.#\u{6F}(value);
+ }
+ static async \u2118(value) {
+ return await this.#\u2118(value);
+ }
+ static async ZW_\u200C_NJ(value) {
+ return await this.#ZW_\u200C_NJ(value);
+ }
+ static async ZW_\u200D_J(value) {
+ return await this.#ZW_\u200D_J(value);
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+Promise.all([
+ C.$(1),
+ C._(1),
+ C.\u{6F}(1),
+ C.\u2118(1),
+ C.ZW_\u200C_NJ(1),
+ C.ZW_\u200D_J(1),
+]).then(results => {
+
+ assert.sameValue(results[0], 1);
+ assert.sameValue(results[1], 1);
+ assert.sameValue(results[2], 1);
+ assert.sameValue(results[3], 1);
+ assert.sameValue(results[4], 1);
+ assert.sameValue(results[5], 1);
+
+}).then($DONE, $DONE);
+
diff --git a/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-static-generator-method-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-static-generator-method-privatename-identifier-alt.js
new file mode 100644
index 0000000000..3db89f438d
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-static-generator-method-privatename-identifier-alt.js
@@ -0,0 +1,125 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-generator-method-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-new-no-sc-line-method.template
+/*---
+description: Valid Static GeneratorMethod PrivateName (field definitions followed by a method in a new line without a semicolon)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ GeneratorMethod
+
+ GeneratorMethod :
+ * ClassElementName ( UniqueFormalParameters ){ GeneratorBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static * #$(value) {
+ yield * value;
+ }
+ static * #_(value) {
+ yield * value;
+ }
+ static * #o(value) {
+ yield * value;
+ }
+ static * #℘(value) {
+ yield * value;
+ }
+ static * #ZW_‌_NJ(value) {
+ yield * value;
+ }
+ static * #ZW_‍_J(value) {
+ yield * value;
+ }
+ m() { return 42; }
+ static get $() {
+ return this.#$;
+ }
+ static get _() {
+ return this.#_;
+ }
+ static get o() {
+ return this.#o;
+ }
+ static get ℘() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#℘;
+ }
+ static get ZW_‌_NJ() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‌_NJ;
+ }
+ static get ZW_‍_J() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‍_J;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$([1]).next().value, 1);
+assert.sameValue(C._([1]).next().value, 1);
+assert.sameValue(C.o([1]).next().value, 1);
+assert.sameValue(C.℘([1]).next().value, 1);
+assert.sameValue(C.ZW_‌_NJ([1]).next().value, 1);
+assert.sameValue(C.ZW_‍_J([1]).next().value, 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-static-generator-method-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-static-generator-method-privatename-identifier.js
new file mode 100644
index 0000000000..b65b950b05
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-static-generator-method-privatename-identifier.js
@@ -0,0 +1,126 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-generator-method-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-new-no-sc-line-method.template
+/*---
+description: Valid Static GeneratorMethod PrivateName (field definitions followed by a method in a new line without a semicolon)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ GeneratorMethod
+
+ GeneratorMethod :
+ * ClassElementName ( UniqueFormalParameters ){ GeneratorBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static * #$(value) {
+ yield * value;
+ }
+ static * #_(value) {
+ yield * value;
+ }
+ static * #\u{6F}(value) {
+ yield * value;
+ }
+ static * #\u2118(value) {
+ yield * value;
+ }
+ static * #ZW_\u200C_NJ(value) {
+ yield * value;
+ }
+ static * #ZW_\u200D_J(value) {
+ yield * value;
+ }
+ m() { return 42; }
+ static get $() {
+ return this.#$;
+ }
+ static get _() {
+ return this.#_;
+ }
+ static get \u{6F}() {
+ return this.#\u{6F};
+ }
+ static get \u2118() {
+ return this.#\u2118;
+ }
+ static get ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ;
+ }
+ static get ZW_\u200D_J() {
+ return this.#ZW_\u200D_J;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$([1]).next().value, 1);
+assert.sameValue(C._([1]).next().value, 1);
+assert.sameValue(C.\u{6F}([1]).next().value, 1);
+assert.sameValue(C.\u2118([1]).next().value, 1);
+assert.sameValue(C.ZW_\u200C_NJ([1]).next().value, 1);
+assert.sameValue(C.ZW_\u200D_J([1]).next().value, 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-static-method-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-static-method-privatename-identifier-alt.js
new file mode 100644
index 0000000000..f60b0ac875
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-static-method-privatename-identifier-alt.js
@@ -0,0 +1,123 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-method-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-new-no-sc-line-method.template
+/*---
+description: Valid Static Method PrivateName (field definitions followed by a method in a new line without a semicolon)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ ClassElementName ( UniqueFormalParameters ){ FunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static #$(value) {
+ return value;
+ }
+ static #_(value) {
+ return value;
+ }
+ static #o(value) {
+ return value;
+ }
+ static #℘(value) {
+ return value;
+ }
+ static #ZW_‌_NJ(value) {
+ return value;
+ }
+ static #ZW_‍_J(value) {
+ return value;
+ }
+ m() { return 42; }
+ static $(value) {
+ return this.#$(value);
+ }
+ static _(value) {
+ return this.#_(value);
+ }
+ static o(value) {
+ return this.#o(value);
+ }
+ static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#℘(value);
+ }
+ static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‌_NJ(value);
+ }
+ static ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‍_J(value);
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(1), 1);
+assert.sameValue(C._(1), 1);
+assert.sameValue(C.o(1), 1);
+assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+assert.sameValue(C.ZW_‌_NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+assert.sameValue(C.ZW_‍_J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-static-method-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-static-method-privatename-identifier.js
new file mode 100644
index 0000000000..f5bf797fff
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-static-method-privatename-identifier.js
@@ -0,0 +1,123 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-method-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-new-no-sc-line-method.template
+/*---
+description: Valid Static Method PrivateName (field definitions followed by a method in a new line without a semicolon)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ ClassElementName ( UniqueFormalParameters ){ FunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static #$(value) {
+ return value;
+ }
+ static #_(value) {
+ return value;
+ }
+ static #\u{6F}(value) {
+ return value;
+ }
+ static #\u2118(value) {
+ return value;
+ }
+ static #ZW_\u200C_NJ(value) {
+ return value;
+ }
+ static #ZW_\u200D_J(value) {
+ return value;
+ }
+ m() { return 42; }
+ static $(value) {
+ return this.#$(value);
+ }
+ static _(value) {
+ return this.#_(value);
+ }
+ static \u{6F}(value) {
+ return this.#\u{6F}(value);
+ }
+ static \u2118(value) {
+ return this.#\u2118(value);
+ }
+ static ZW_\u200C_NJ(value) {
+ return this.#ZW_\u200C_NJ(value);
+ }
+ static ZW_\u200D_J(value) {
+ return this.#ZW_\u200D_J(value);
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(1), 1);
+assert.sameValue(C._(1), 1);
+assert.sameValue(C.\u{6F}(1), 1);
+assert.sameValue(C.\u2118(1), 1);
+assert.sameValue(C.ZW_\u200C_NJ(1), 1);
+assert.sameValue(C.ZW_\u200D_J(1), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-static-privatename-identifier-alt-by-classname.js b/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-static-privatename-identifier-alt-by-classname.js
new file mode 100644
index 0000000000..4b82b013c9
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-static-privatename-identifier-alt-by-classname.js
@@ -0,0 +1,111 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-alt-by-classname.case
+// - src/class-elements/productions/cls-decl-new-no-sc-line-method.template
+/*---
+description: Valid Static PrivateName (field definitions followed by a method in a new line without a semicolon)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_‍_J
+ m() { return 42; }
+ static $(value) {
+ C.#$ = value;
+ return C.#$;
+ }
+ static _(value) {
+ C.#_ = value;
+ return C.#_;
+ }
+ static o(value) {
+ C.#\u{6F} = value;
+ return C.#\u{6F};
+ }
+ static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.#℘ = value;
+ return C.#℘;
+ }
+ static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.#ZW_‌_NJ = value;
+ return C.#ZW_‌_NJ;
+ }
+ static ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.#ZW_‍_J = value;
+ return C.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(1), 1);
+assert.sameValue(C._(1), 1);
+assert.sameValue(C.o(1), 1);
+assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+assert.sameValue(C.ZW_‌_NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+assert.sameValue(C.ZW_‍_J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-static-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-static-privatename-identifier-alt.js
new file mode 100644
index 0000000000..47b387cfb6
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-static-privatename-identifier-alt.js
@@ -0,0 +1,111 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-new-no-sc-line-method.template
+/*---
+description: Valid Static PrivateName (field definitions followed by a method in a new line without a semicolon)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_‍_J
+ m() { return 42; }
+ static $(value) {
+ this.#$ = value;
+ return this.#$;
+ }
+ static _(value) {
+ this.#_ = value;
+ return this.#_;
+ }
+ static o(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F};
+ }
+ static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ this.#℘ = value;
+ return this.#℘;
+ }
+ static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ this.#ZW_‌_NJ = value;
+ return this.#ZW_‌_NJ;
+ }
+ static ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ this.#ZW_‍_J = value;
+ return this.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(1), 1);
+assert.sameValue(C._(1), 1);
+assert.sameValue(C.o(1), 1);
+assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+assert.sameValue(C.ZW_‌_NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+assert.sameValue(C.ZW_‍_J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-static-privatename-identifier-by-classname.js b/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-static-privatename-identifier-by-classname.js
new file mode 100644
index 0000000000..0e2b75505c
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-static-privatename-identifier-by-classname.js
@@ -0,0 +1,111 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-by-classname.case
+// - src/class-elements/productions/cls-decl-new-no-sc-line-method.template
+/*---
+description: Valid Static PrivateName (field definitions followed by a method in a new line without a semicolon)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J
+ m() { return 42; }
+ static $(value) {
+ C.#$ = value;
+ return C.#$;
+ }
+ static _(value) {
+ C.#_ = value;
+ return C.#_;
+ }
+ static \u{6F}(value) {
+ C.#\u{6F} = value;
+ return C.#\u{6F};
+ }
+ static \u2118(value) {
+ C.#\u2118 = value;
+ return C.#\u2118;
+ }
+ static ZW_\u200C_NJ(value) {
+ C.#ZW_\u200C_NJ = value;
+ return C.#ZW_\u200C_NJ;
+ }
+ static ZW_\u200D_J(value) {
+ C.#ZW_\u200D_J = value;
+ return C.#ZW_\u200D_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(1), 1);
+assert.sameValue(C._(1), 1);
+assert.sameValue(C.\u{6F}(1), 1);
+assert.sameValue(C.\u2118(1), 1);
+assert.sameValue(C.ZW_\u200C_NJ(1), 1);
+assert.sameValue(C.ZW_\u200D_J(1), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-static-privatename-identifier-initializer-alt-by-classname.js b/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-static-privatename-identifier-initializer-alt-by-classname.js
new file mode 100644
index 0000000000..932cab6817
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-static-privatename-identifier-initializer-alt-by-classname.js
@@ -0,0 +1,105 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-initializer-alt-by-classname.case
+// - src/class-elements/productions/cls-decl-new-no-sc-line-method.template
+/*---
+description: Valid Static PrivateName (field definitions followed by a method in a new line without a semicolon)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_‍_J = 1
+ m() { return 42; }
+ static $() {
+ return C.#$;
+ }
+ static _() {
+ return C.#_;
+ }
+ static \u{6F}() {
+ return C.#\u{6F};
+ }
+ static ℘() {
+ return C.#℘;
+ }
+ static ZW_‌_NJ() {
+ return C.#ZW_‌_NJ;
+ }
+ static ZW_‍_J() {
+ return C.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(), 1);
+assert.sameValue(C._(), 1);
+assert.sameValue(C.\u{6F}(), 1);
+assert.sameValue(C.℘(), 1);
+assert.sameValue(C.ZW_‌_NJ(), 1);
+assert.sameValue(C.ZW_‍_J(), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-static-privatename-identifier-initializer-alt.js b/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-static-privatename-identifier-initializer-alt.js
new file mode 100644
index 0000000000..0fd537d010
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-static-privatename-identifier-initializer-alt.js
@@ -0,0 +1,105 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-initializer-alt.case
+// - src/class-elements/productions/cls-decl-new-no-sc-line-method.template
+/*---
+description: Valid Static PrivateName (field definitions followed by a method in a new line without a semicolon)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_‍_J = 1
+ m() { return 42; }
+ static $() {
+ return this.#$;
+ }
+ static _() {
+ return this.#_;
+ }
+ static \u{6F}() {
+ return this.#\u{6F};
+ }
+ static ℘() {
+ return this.#℘;
+ }
+ static ZW_‌_NJ() {
+ return this.#ZW_‌_NJ;
+ }
+ static ZW_‍_J() {
+ return this.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(), 1);
+assert.sameValue(C._(), 1);
+assert.sameValue(C.\u{6F}(), 1);
+assert.sameValue(C.℘(), 1);
+assert.sameValue(C.ZW_‌_NJ(), 1);
+assert.sameValue(C.ZW_‍_J(), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-static-privatename-identifier-initializer.js b/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-static-privatename-identifier-initializer.js
new file mode 100644
index 0000000000..6c7ca87eac
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-static-privatename-identifier-initializer.js
@@ -0,0 +1,105 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-initializer.case
+// - src/class-elements/productions/cls-decl-new-no-sc-line-method.template
+/*---
+description: Valid Static PrivateName (field definitions followed by a method in a new line without a semicolon)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #\u2118 = 1; static #ZW_\u200C_NJ = 1; static #ZW_\u200D_J = 1
+ m() { return 42; }
+ static $() {
+ return this.#$;
+ }
+ static _() {
+ return this.#_;
+ }
+ static \u{6F}() {
+ return this.#\u{6F};
+ }
+ static \u2118() {
+ return this.#\u2118;
+ }
+ static ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ;
+ }
+ static ZW_\u200D_J() {
+ return this.#ZW_\u200D_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(), 1);
+assert.sameValue(C._(), 1);
+assert.sameValue(C.\u{6F}(), 1);
+assert.sameValue(C.\u2118(), 1);
+assert.sameValue(C.ZW_\u200C_NJ(), 1);
+assert.sameValue(C.ZW_\u200D_J(), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-static-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-static-privatename-identifier.js
new file mode 100644
index 0000000000..a275dbeeee
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-rs-static-privatename-identifier.js
@@ -0,0 +1,111 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-new-no-sc-line-method.template
+/*---
+description: Valid Static PrivateName (field definitions followed by a method in a new line without a semicolon)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J
+ m() { return 42; }
+ static $(value) {
+ this.#$ = value;
+ return this.#$;
+ }
+ static _(value) {
+ this.#_ = value;
+ return this.#_;
+ }
+ static \u{6F}(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F};
+ }
+ static \u2118(value) {
+ this.#\u2118 = value;
+ return this.#\u2118;
+ }
+ static ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ = value;
+ return this.#ZW_\u200C_NJ;
+ }
+ static ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J = value;
+ return this.#ZW_\u200D_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(1), 1);
+assert.sameValue(C._(1), 1);
+assert.sameValue(C.\u{6F}(1), 1);
+assert.sameValue(C.\u2118(1), 1);
+assert.sameValue(C.ZW_\u200C_NJ(1), 1);
+assert.sameValue(C.ZW_\u200D_J(1), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-static-private-fields.js b/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-static-private-fields.js
new file mode 100644
index 0000000000..6c01d01493
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-static-private-fields.js
@@ -0,0 +1,72 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/static-private-fields.case
+// - src/class-elements/productions/cls-decl-new-no-sc-line-method.template
+/*---
+description: static private fields (field definitions followed by a method in a new line without a semicolon)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ static FieldDefinition ;
+
+ FieldDefinition :
+ ClassElementName Initializer_opt
+
+ ClassElementName :
+ PrivateName
+
+ PrivateName :
+ # IdentifierName
+
+---*/
+
+
+class C {
+ static #x; static #y
+ m() { return 42; }
+ static x() {
+ this.#x = 42;
+ return this.#x;
+ }
+ static y() {
+ this.#y = 43;
+ return this.#y;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+// Test the private fields do not appear as properties before set to value
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#x"), "test 1");
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 2");
+assert(!Object.prototype.hasOwnProperty.call(c, "#x"), "test 3");
+
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#y"), "test 4");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 5");
+assert(!Object.prototype.hasOwnProperty.call(c, "#y"), "test 6");
+
+// Test if private fields can be sucessfully accessed and set to value
+assert.sameValue(C.x(), 42, "test 7");
+assert.sameValue(C.y(), 43, "test 8");
+
+// Test the private fields do not appear as properties before after set to value
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 9");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 10");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-static-private-methods-with-fields.js b/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-static-private-methods-with-fields.js
new file mode 100644
index 0000000000..ea43ef6308
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-static-private-methods-with-fields.js
@@ -0,0 +1,89 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/static-private-methods-with-fields.case
+// - src/class-elements/productions/cls-decl-new-no-sc-line-method.template
+/*---
+description: static private methods with fields (field definitions followed by a method in a new line without a semicolon)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class-static-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ static FieldDefinition ;
+
+ FieldDefinition :
+ ClassElementName Initializer_opt
+
+ ClassElementName :
+ PrivateName
+
+ PrivateName :
+ # IdentifierName
+
+---*/
+
+
+class C {
+ static #xVal; static #yVal
+ m() { return 42; }
+ static #x(value) {
+ this.#xVal = value;
+ return this.#xVal;
+ }
+ static #y(value) {
+ this.#yVal = value;
+ return this.#yVal;
+ }
+ static x() {
+ return this.#x(42);
+ }
+ static y() {
+ return this.#y(43);
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+// Test the private methods do not appear as properties before set to value
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#x"), "test 1");
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 2");
+assert(!Object.prototype.hasOwnProperty.call(c, "#x"), "test 3");
+
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#y"), "test 4");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 5");
+assert(!Object.prototype.hasOwnProperty.call(c, "#y"), "test 6");
+
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#xVal"), "test 7");
+assert(!Object.prototype.hasOwnProperty.call(C, "#xVal"), "test 8");
+assert(!Object.prototype.hasOwnProperty.call(c, "#xVal"), "test 9");
+
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#yVal"), "test 10");
+assert(!Object.prototype.hasOwnProperty.call(C, "#yVal"), "test 11");
+assert(!Object.prototype.hasOwnProperty.call(c, "#yVal"), "test 12");
+
+// Test if private fields can be sucessfully accessed and set to value
+assert.sameValue(C.x(), 42, "test 13");
+assert.sameValue(C.y(), 43, "test 14");
+
+// Test the private fields do not appear as properties before after set to value
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 15");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 16");
+
+assert(!Object.prototype.hasOwnProperty.call(C, "#xVal"), "test 17");
+assert(!Object.prototype.hasOwnProperty.call(C, "#yVal"), "test 18");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-static-private-methods.js b/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-static-private-methods.js
new file mode 100644
index 0000000000..a1368e60ad
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-static-private-methods.js
@@ -0,0 +1,76 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/static-private-methods.case
+// - src/class-elements/productions/cls-decl-new-no-sc-line-method.template
+/*---
+description: static private methods (field definitions followed by a method in a new line without a semicolon)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ static FieldDefinition ;
+
+ FieldDefinition :
+ ClassElementName Initializer_opt
+
+ ClassElementName :
+ PrivateName
+
+ PrivateName :
+ # IdentifierName
+
+---*/
+
+
+class C {
+
+ m() { return 42; }
+ static #x(value) {
+ return value / 2;
+ }
+ static #y(value) {
+ return value * 2;
+ }
+ static x() {
+ return this.#x(84);
+ }
+ static y() {
+ return this.#y(43);
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+// Test the private methods do not appear as properties before set to value
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#x"), "test 1");
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 2");
+assert(!Object.prototype.hasOwnProperty.call(c, "#x"), "test 3");
+
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#y"), "test 4");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 5");
+assert(!Object.prototype.hasOwnProperty.call(c, "#y"), "test 6");
+
+// Test if private fields can be sucessfully accessed and set to value
+assert.sameValue(C.x(), 42, "test 7");
+assert.sameValue(C.y(), 86, "test 8");
+
+// Test the private fields do not appear as properties before after set to value
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 9");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 10");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-string-literal-names.js b/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-string-literal-names.js
new file mode 100644
index 0000000000..1d90148868
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-no-sc-line-method-string-literal-names.js
@@ -0,0 +1,110 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/string-literal-names.case
+// - src/class-elements/productions/cls-decl-new-no-sc-line-method.template
+/*---
+description: String literal names (field definitions followed by a method in a new line without a semicolon)
+esid: prod-FieldDefinition
+features: [class-fields-public, class]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement:
+ ...
+ FieldDefinition ;
+
+ FieldDefinition:
+ ClassElementName Initializer_opt
+
+ ClassElementName:
+ PropertyName
+
+---*/
+
+
+class C {
+ 'a'; "b"; 'c' = 39;
+ "d" = 42
+ m() { return 42; }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "a"),
+ "a does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "a"),
+ "a does not appear as an own property on C constructor"
+);
+
+verifyProperty(c, "a", {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "b"),
+ "b does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "b"),
+ "b does not appear as an own property on C constructor"
+);
+
+verifyProperty(c, "b", {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "c"),
+ "c does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "c"),
+ "c does not appear as an own property on C constructor"
+);
+
+verifyProperty(c, "c", {
+ value: 39,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "d"),
+ "d does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "d"),
+ "d does not appear as an own property on C constructor"
+);
+
+verifyProperty(c, "d", {
+ value: 42,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-computed-names.js b/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-computed-names.js
new file mode 100644
index 0000000000..0d162e255e
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-computed-names.js
@@ -0,0 +1,108 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/computed-names.case
+// - src/class-elements/productions/cls-decl-new-sc-line-generator.template
+/*---
+description: Computed property names (field definitions followed by a method in a new line with a semicolon)
+esid: prod-FieldDefinition
+features: [class-fields-public, computed-property-names, class, generators]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement:
+ ...
+ FieldDefinition ;
+
+ FieldDefinition:
+ ClassElementName Initializer_opt
+
+ ClassElementName:
+ PropertyName
+
+---*/
+var x = "b";
+
+
+
+class C {
+ [x] = 42; [10] = "meep"; ["not initialized"];
+ *m() { return 42; }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "b"),
+ "b doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "b"),
+ "b doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "b", {
+ value: 42,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "x"),
+ "x doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "x"),
+ "x doesn't appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "x"),
+ "x doesn't appear as an own property on C instance"
+);
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "10"),
+ "10 doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "10"),
+ "10 doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "10", {
+ value: "meep",
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "not initialized"),
+ "'not initialized' doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "not initialized"),
+ "'not initialized' doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "not initialized", {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-computed-symbol-names.js b/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-computed-symbol-names.js
new file mode 100644
index 0000000000..7dc9395d6e
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-computed-symbol-names.js
@@ -0,0 +1,106 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/computed-symbol-names.case
+// - src/class-elements/productions/cls-decl-new-sc-line-generator.template
+/*---
+description: Computed property symbol names (field definitions followed by a method in a new line with a semicolon)
+esid: prod-FieldDefinition
+features: [class-fields-public, Symbol, computed-property-names, class, generators]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement:
+ ...
+ FieldDefinition ;
+
+ FieldDefinition:
+ ClassElementName Initializer_opt
+
+ ClassElementName:
+ PropertyName
+
+---*/
+var x = Symbol();
+var y = Symbol();
+
+
+
+class C {
+ [x]; [y] = 42;
+ *m() { return 42; }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, x),
+ "Symbol x doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, x),
+ "Symbol x doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, x, {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, y),
+ "Symbol y doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, y),
+ "Symbol y doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, y, {
+ value: 42,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "x"),
+ "x doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "x"),
+ "x doesn't appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "x"),
+ "x doesn't appear as an own property on C instance"
+);
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "y"),
+ "y doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "y"),
+ "y doesn't appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "y"),
+ "y doesn't appear as an own property on C instance"
+);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-grammar-privatename-identifier-semantics-stringvalue.js b/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-grammar-privatename-identifier-semantics-stringvalue.js
new file mode 100644
index 0000000000..026640d37a
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-grammar-privatename-identifier-semantics-stringvalue.js
@@ -0,0 +1,110 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-privatename-identifier-semantics-stringvalue.case
+// - src/class-elements/productions/cls-decl-new-sc-line-generator.template
+/*---
+description: PrivateName Static Semantics, StringValue (field definitions followed by a method in a new line with a semicolon)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public, generators]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+
+ 1. Return the String value consisting of the sequence of code
+ units corresponding to PrivateName. In determining the sequence
+ any occurrences of \ UnicodeEscapeSequence are first replaced
+ with the code point represented by the UnicodeEscapeSequence
+ and then the code points of the entire PrivateName are converted
+ to code units by UTF16Encoding (10.1.1) each code point.
+
+---*/
+
+
+class C {
+ #\u{6F};
+ #\u2118;
+ #ZW_\u200C_NJ;
+ #ZW_\u200D_J;;
+ *m() { return 42; }
+ o(value) {
+ this.#o = value;
+ return this.#o;
+ }
+ ℘(value) {
+ this.#℘ = value;
+ return this.#℘;
+ }
+ ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS METHOD
+ this.#ZW_‌_NJ = value;
+ return this.#ZW_‌_NJ;
+ }
+ ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS METHOD
+ this.#ZW_‍_J = value;
+ return this.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.o(1), 1);
+assert.sameValue(c.℘(1), 1);
+assert.sameValue(c.ZW_‌_NJ(1), 1);
+assert.sameValue(c.ZW_‍_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-literal-names-asi.js b/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-literal-names-asi.js
new file mode 100644
index 0000000000..a5d140da93
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-literal-names-asi.js
@@ -0,0 +1,78 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/literal-names-asi.case
+// - src/class-elements/productions/cls-decl-new-sc-line-generator.template
+/*---
+description: Literal property names with ASI (field definitions followed by a method in a new line with a semicolon)
+esid: prod-FieldDefinition
+features: [class-fields-public, class, generators]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement:
+ ...
+ FieldDefinition ;
+
+ FieldDefinition:
+ ClassElementName Initializer_opt
+
+ ClassElementName:
+ PropertyName
+
+---*/
+
+
+class C {
+ a
+ b = 42;;
+ *m() { return 42; }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "a"),
+ "a doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "a"),
+ "a doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "a", {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "b"),
+ "b doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "b"),
+ "b doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "b", {
+ value: 42,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-literal-names.js b/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-literal-names.js
new file mode 100644
index 0000000000..2725d067a6
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-literal-names.js
@@ -0,0 +1,97 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/literal-names.case
+// - src/class-elements/productions/cls-decl-new-sc-line-generator.template
+/*---
+description: Literal property names (field definitions followed by a method in a new line with a semicolon)
+esid: prod-FieldDefinition
+features: [class-fields-public, class, generators]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement:
+ ...
+ FieldDefinition ;
+
+ FieldDefinition:
+ ClassElementName Initializer_opt
+
+ ClassElementName:
+ PropertyName
+
+---*/
+const fn = function() {}
+
+
+
+class C {
+ a; b = 42;
+ c = fn;
+ *m() { return 42; }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "a"),
+ "a doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "a"),
+ "a doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "a", {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "b"),
+ "b doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "b"),
+ "b doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "b", {
+ value: 42,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "c"),
+ "c doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "c"),
+ "c doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "c", {
+ value: fn,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-private-field-usage.js b/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-private-field-usage.js
new file mode 100644
index 0000000000..81e3a294de
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-private-field-usage.js
@@ -0,0 +1,50 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-field-usage.case
+// - src/class-elements/productions/cls-decl-new-sc-line-generator.template
+/*---
+description: PrivateName CallExpression usage (private field) (field definitions followed by a method in a new line with a semicolon)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public, generators]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ Updated Productions
+
+ CallExpression[Yield, Await]:
+ CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+ SuperCall[?Yield, ?Await]
+ CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+ CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+ CallExpression[?Yield, ?Await].IdentifierName
+ CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+ CallExpression[?Yield, ?Await].PrivateName
+
+---*/
+
+
+class C {
+ #m = 'test262';;
+ *m() { return 42; }
+ method() {
+ return this.#m;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.method(), 'test262');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-private-method-getter-usage.js b/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-private-method-getter-usage.js
new file mode 100644
index 0000000000..7cfb03aad9
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-private-method-getter-usage.js
@@ -0,0 +1,50 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-method-getter-usage.case
+// - src/class-elements/productions/cls-decl-new-sc-line-generator.template
+/*---
+description: PrivateName CallExpression usage (Accesor get method) (field definitions followed by a method in a new line with a semicolon)
+esid: prod-FieldDefinition
+features: [class-methods-private, class, class-fields-public, generators]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ Updated Productions
+
+ CallExpression[Yield, Await]:
+ CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+ SuperCall[?Yield, ?Await]
+ CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+ CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+ CallExpression[?Yield, ?Await].IdentifierName
+ CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+ CallExpression[?Yield, ?Await].PrivateName
+
+---*/
+
+
+class C {
+ get #m() { return 'test262'; };
+ *m() { return 42; }
+ method() {
+ return this.#m;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.method(), 'test262');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-private-method-usage.js b/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-private-method-usage.js
new file mode 100644
index 0000000000..ed69bf33f0
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-private-method-usage.js
@@ -0,0 +1,50 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-method-usage.case
+// - src/class-elements/productions/cls-decl-new-sc-line-generator.template
+/*---
+description: PrivateName CallExpression usage (private method) (field definitions followed by a method in a new line with a semicolon)
+esid: prod-FieldDefinition
+features: [class-methods-private, class, class-fields-public, generators]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ Updated Productions
+
+ CallExpression[Yield, Await]:
+ CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+ SuperCall[?Yield, ?Await]
+ CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+ CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+ CallExpression[?Yield, ?Await].IdentifierName
+ CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+ CallExpression[?Yield, ?Await].PrivateName
+
+---*/
+
+
+class C {
+ #m() { return 'test262'; };
+ *m() { return 42; }
+ method() {
+ return this.#m();
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.method(), 'test262');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-private-names.js b/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-private-names.js
new file mode 100644
index 0000000000..939372768d
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-private-names.js
@@ -0,0 +1,72 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-names.case
+// - src/class-elements/productions/cls-decl-new-sc-line-generator.template
+/*---
+description: private names (field definitions followed by a method in a new line with a semicolon)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public, generators]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ FieldDefinition ;
+
+ FieldDefinition :
+ ClassElementName Initializer_opt
+
+ ClassElementName :
+ PrivateName
+
+ PrivateName :
+ # IdentifierName
+
+---*/
+
+
+class C {
+ #x; #y;
+ *m() { return 42; }
+ x() {
+ this.#x = 42;
+ return this.#x;
+ }
+ y() {
+ this.#y = 43;
+ return this.#y;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+// Test the private fields do not appear as properties before set to value
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#x"), "test 1");
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 2");
+assert(!Object.prototype.hasOwnProperty.call(c, "#x"), "test 3");
+
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#y"), "test 4");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 5");
+assert(!Object.prototype.hasOwnProperty.call(c, "#y"), "test 6");
+
+// Test if private fields can be sucessfully accessed and set to value
+assert.sameValue(c.x(), 42, "test 7");
+assert.sameValue(c.y(), 43, "test 8");
+
+// Test the private fields do not appear as properties before after set to value
+assert(!Object.prototype.hasOwnProperty.call(c, "#x"), "test 9");
+assert(!Object.prototype.hasOwnProperty.call(c, "#y"), "test 10");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-field-identifier-initializer.js b/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-field-identifier-initializer.js
new file mode 100644
index 0000000000..2dc3866901
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-field-identifier-initializer.js
@@ -0,0 +1,88 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-field-identifier-initializer.case
+// - src/class-elements/productions/cls-decl-new-sc-line-generator.template
+/*---
+description: Valid FieldDefinition (field definitions followed by a method in a new line with a semicolon)
+esid: prod-FieldDefinition
+features: [class-fields-public, class, generators]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+
+ PropertyName :
+ LiteralPropertyName
+ ComputedPropertyName
+
+ LiteralPropertyName :
+ IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ $ = 1; _ = 1; \u{6F} = 1; \u2118 = 1; ZW_\u200C_NJ = 1; ZW_\u200D_J = 1;
+ *m() { return 42; }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$, 1);
+assert.sameValue(c._, 1);
+assert.sameValue(c.\u{6F}, 1);
+assert.sameValue(c.\u2118, 1);
+assert.sameValue(c.ZW_\u200C_NJ, 1);
+assert.sameValue(c.ZW_\u200D_J, 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-field-identifier.js b/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-field-identifier.js
new file mode 100644
index 0000000000..71d68269be
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-field-identifier.js
@@ -0,0 +1,95 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-field-identifier.case
+// - src/class-elements/productions/cls-decl-new-sc-line-generator.template
+/*---
+description: Valid FieldDefinition (field definitions followed by a method in a new line with a semicolon)
+esid: prod-FieldDefinition
+features: [class-fields-public, class, generators]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+
+ PropertyName :
+ LiteralPropertyName
+ ComputedPropertyName
+
+ LiteralPropertyName :
+ IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ $; _; \u{6F}; \u2118; ZW_\u200C_NJ; ZW_\u200D_J;
+ *m() { return 42; }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+c.$ = 1;
+c._ = 1;
+c.\u{6F} = 1;
+c.\u2118 = 1;
+c.ZW_\u200C_NJ = 1;
+c.ZW_\u200D_J = 1;
+
+assert.sameValue(c.$, 1);
+assert.sameValue(c._, 1);
+assert.sameValue(c.\u{6F}, 1);
+assert.sameValue(c.\u2118, 1);
+assert.sameValue(c.ZW_\u200C_NJ, 1);
+assert.sameValue(c.ZW_\u200D_J, 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-private-getter-alt.js b/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-private-getter-alt.js
new file mode 100644
index 0000000000..c189c19726
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-private-getter-alt.js
@@ -0,0 +1,129 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-getter-alt.case
+// - src/class-elements/productions/cls-decl-new-sc-line-generator.template
+/*---
+description: Valid PrivateName as private getter (field definitions followed by a method in a new line with a semicolon)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public, generators]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ...
+ get ClassElementName ( ){ FunctionBody }
+ ...
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ #$_; #__; #\u{6F}_; #℘_; #ZW_‌_NJ_; #ZW_‍_J_;
+ get #$() {
+ return this.#$_;
+ }
+ get #_() {
+ return this.#__;
+ }
+ get #\u{6F}() {
+ return this.#\u{6F}_;
+ }
+ get #℘() {
+ return this.#℘_;
+ }
+ get #ZW_‌_NJ() {
+ return this.#ZW_‌_NJ_;
+ }
+ get #ZW_‍_J() {
+ return this.#ZW_‍_J_;
+ }
+;
+ *m() { return 42; }
+ $(value) {
+ this.#$_ = value;
+ return this.#$;
+ }
+ _(value) {
+ this.#__ = value;
+ return this.#_;
+ }
+ \u{6F}(value) {
+ this.#\u{6F}_ = value;
+ return this.#\u{6F};
+ }
+ ℘(value) {
+ this.#℘_ = value;
+ return this.#℘;
+ }
+ ZW_‌_NJ(value) {
+ this.#ZW_‌_NJ_ = value;
+ return this.#ZW_‌_NJ;
+ }
+ ZW_‍_J(value) {
+ this.#ZW_‍_J_ = value;
+ return this.#ZW_‍_J;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.℘(1), 1);
+assert.sameValue(c.ZW_‌_NJ(1), 1);
+assert.sameValue(c.ZW_‍_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-private-getter.js b/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-private-getter.js
new file mode 100644
index 0000000000..8d6f5c08ed
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-private-getter.js
@@ -0,0 +1,129 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-getter.case
+// - src/class-elements/productions/cls-decl-new-sc-line-generator.template
+/*---
+description: Valid PrivateName as private getter (field definitions followed by a method in a new line with a semicolon)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public, generators]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ...
+ get ClassElementName ( ){ FunctionBody }
+ ...
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ #$_; #__; #\u{6F}_; #\u2118_; #ZW_\u200C_NJ_; #ZW_\u200D_J_;
+ get #$() {
+ return this.#$_;
+ }
+ get #_() {
+ return this.#__;
+ }
+ get #\u{6F}() {
+ return this.#\u{6F}_;
+ }
+ get #\u2118() {
+ return this.#\u2118_;
+ }
+ get #ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ_;
+ }
+ get #ZW_\u200D_J() {
+ return this.#ZW_\u200D_J_;
+ }
+;
+ *m() { return 42; }
+ $(value) {
+ this.#$_ = value;
+ return this.#$;
+ }
+ _(value) {
+ this.#__ = value;
+ return this.#_;
+ }
+ \u{6F}(value) {
+ this.#\u{6F}_ = value;
+ return this.#\u{6F};
+ }
+ \u2118(value) {
+ this.#\u2118_ = value;
+ return this.#\u2118;
+ }
+ ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ_ = value;
+ return this.#ZW_\u200C_NJ;
+ }
+ ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J_ = value;
+ return this.#ZW_\u200D_J;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.\u2118(1), 1);
+assert.sameValue(c.ZW_\u200C_NJ(1), 1);
+assert.sameValue(c.ZW_\u200D_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-private-method-alt.js b/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-private-method-alt.js
new file mode 100644
index 0000000000..ba250447a2
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-private-method-alt.js
@@ -0,0 +1,128 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-method-alt.case
+// - src/class-elements/productions/cls-decl-new-sc-line-generator.template
+/*---
+description: Valid PrivateName as private method (field definitions followed by a method in a new line with a semicolon)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public, generators]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ClassElementName ( UniqueFormalParameters ) { FunctionBody }
+ ...
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ #$_; #__; #\u{6F}_; #℘_; #ZW_‌_NJ_; #ZW_‍_J_;
+ #$() {
+ return this.#$_;
+ }
+ #_() {
+ return this.#__;
+ }
+ #\u{6F}() {
+ return this.#\u{6F}_;
+ }
+ #℘() {
+ return this.#℘_;
+ }
+ #ZW_‌_NJ() {
+ return this.#ZW_‌_NJ_;
+ }
+ #ZW_‍_J() {
+ return this.#ZW_‍_J_;
+ }
+;
+ *m() { return 42; }
+ $(value) {
+ this.#$_ = value;
+ return this.#$();
+ }
+ _(value) {
+ this.#__ = value;
+ return this.#_();
+ }
+ \u{6F}(value) {
+ this.#\u{6F}_ = value;
+ return this.#\u{6F}();
+ }
+ ℘(value) {
+ this.#℘_ = value;
+ return this.#℘();
+ }
+ ZW_‌_NJ(value) {
+ this.#ZW_‌_NJ_ = value;
+ return this.#ZW_‌_NJ();
+ }
+ ZW_‍_J(value) {
+ this.#ZW_‍_J_ = value;
+ return this.#ZW_‍_J();
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.℘(1), 1);
+assert.sameValue(c.ZW_‌_NJ(1), 1);
+assert.sameValue(c.ZW_‍_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-private-method.js b/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-private-method.js
new file mode 100644
index 0000000000..b900f33e56
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-private-method.js
@@ -0,0 +1,128 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-method.case
+// - src/class-elements/productions/cls-decl-new-sc-line-generator.template
+/*---
+description: Valid PrivateName as private method (field definitions followed by a method in a new line with a semicolon)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public, generators]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ClassElementName ( UniqueFormalParameters ) { FunctionBody }
+ ...
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ #$_; #__; #\u{6F}_; #\u2118_; #ZW_\u200C_NJ_; #ZW_\u200D_J_;
+ #$() {
+ return this.#$_;
+ }
+ #_() {
+ return this.#__;
+ }
+ #\u{6F}() {
+ return this.#\u{6F}_;
+ }
+ #\u2118() {
+ return this.#\u2118_;
+ }
+ #ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ_;
+ }
+ #ZW_\u200D_J() {
+ return this.#ZW_\u200D_J_;
+ }
+;
+ *m() { return 42; }
+ $(value) {
+ this.#$_ = value;
+ return this.#$();
+ }
+ _(value) {
+ this.#__ = value;
+ return this.#_();
+ }
+ \u{6F}(value) {
+ this.#\u{6F}_ = value;
+ return this.#\u{6F}();
+ }
+ \u2118(value) {
+ this.#\u2118_ = value;
+ return this.#\u2118();
+ }
+ ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ_ = value;
+ return this.#ZW_\u200C_NJ();
+ }
+ ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J_ = value;
+ return this.#ZW_\u200D_J();
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.\u2118(1), 1);
+assert.sameValue(c.ZW_\u200C_NJ(1), 1);
+assert.sameValue(c.ZW_\u200D_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-private-setter-alt.js b/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-private-setter-alt.js
new file mode 100644
index 0000000000..225e4b4edb
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-private-setter-alt.js
@@ -0,0 +1,128 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-setter-alt.case
+// - src/class-elements/productions/cls-decl-new-sc-line-generator.template
+/*---
+description: Valid PrivateName as private setter (field definitions followed by a method in a new line with a semicolon)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public, generators]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ...
+ set ClassElementName ( PropertySetParameterList ) { FunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ #$_; #__; #\u{6F}_; #℘_; #ZW_‌_NJ_; #ZW_‍_J_;
+ set #$(value) {
+ this.#$_ = value;
+ }
+ set #_(value) {
+ this.#__ = value;
+ }
+ set #\u{6F}(value) {
+ this.#\u{6F}_ = value;
+ }
+ set #℘(value) {
+ this.#℘_ = value;
+ }
+ set #ZW_‌_NJ(value) {
+ this.#ZW_‌_NJ_ = value;
+ }
+ set #ZW_‍_J(value) {
+ this.#ZW_‍_J_ = value;
+ }
+;
+ *m() { return 42; }
+ $(value) {
+ this.#$ = value;
+ return this.#$_;
+ }
+ _(value) {
+ this.#_ = value;
+ return this.#__;
+ }
+ \u{6F}(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F}_;
+ }
+ ℘(value) {
+ this.#℘ = value;
+ return this.#℘_;
+ }
+ ZW_‌_NJ(value) {
+ this.#ZW_‌_NJ = value;
+ return this.#ZW_‌_NJ_;
+ }
+ ZW_‍_J(value) {
+ this.#ZW_‍_J = value;
+ return this.#ZW_‍_J_;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.℘(1), 1);
+assert.sameValue(c.ZW_‌_NJ(1), 1);
+assert.sameValue(c.ZW_‍_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-private-setter.js b/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-private-setter.js
new file mode 100644
index 0000000000..c41b4487a5
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-private-setter.js
@@ -0,0 +1,128 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-setter.case
+// - src/class-elements/productions/cls-decl-new-sc-line-generator.template
+/*---
+description: Valid PrivateName as private setter (field definitions followed by a method in a new line with a semicolon)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public, generators]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ...
+ set ClassElementName ( PropertySetParameterList ) { FunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ #$_; #__; #\u{6F}_; #\u2118_; #ZW_\u200C_NJ_; #ZW_\u200D_J_;
+ set #$(value) {
+ this.#$_ = value;
+ }
+ set #_(value) {
+ this.#__ = value;
+ }
+ set #\u{6F}(value) {
+ this.#\u{6F}_ = value;
+ }
+ set #\u2118(value) {
+ this.#\u2118_ = value;
+ }
+ set #ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ_ = value;
+ }
+ set #ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J_ = value;
+ }
+;
+ *m() { return 42; }
+ $(value) {
+ this.#$ = value;
+ return this.#$_;
+ }
+ _(value) {
+ this.#_ = value;
+ return this.#__;
+ }
+ \u{6F}(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F}_;
+ }
+ \u2118(value) {
+ this.#\u2118 = value;
+ return this.#\u2118_;
+ }
+ ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ = value;
+ return this.#ZW_\u200C_NJ_;
+ }
+ ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J = value;
+ return this.#ZW_\u200D_J_;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.\u2118(1), 1);
+assert.sameValue(c.ZW_\u200C_NJ(1), 1);
+assert.sameValue(c.ZW_\u200D_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-privatename-identifier-alt.js
new file mode 100644
index 0000000000..35498f2223
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-privatename-identifier-alt.js
@@ -0,0 +1,110 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-new-sc-line-generator.template
+/*---
+description: Valid PrivateName (field definitions followed by a method in a new line with a semicolon)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public, generators]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ #$; #_; #\u{6F}; #℘; #ZW_‌_NJ; #ZW_‍_J;
+ *m() { return 42; }
+ $(value) {
+ this.#$ = value;
+ return this.#$;
+ }
+ _(value) {
+ this.#_ = value;
+ return this.#_;
+ }
+ \u{6F}(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F};
+ }
+ ℘(value) {
+ this.#℘ = value;
+ return this.#℘;
+ }
+ ZW_‌_NJ(value) {
+ this.#ZW_‌_NJ = value;
+ return this.#ZW_‌_NJ;
+ }
+ ZW_‍_J(value) {
+ this.#ZW_‍_J = value;
+ return this.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.℘(1), 1);
+assert.sameValue(c.ZW_‌_NJ(1), 1);
+assert.sameValue(c.ZW_‍_J(1), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-privatename-identifier-initializer-alt.js b/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-privatename-identifier-initializer-alt.js
new file mode 100644
index 0000000000..fba538c7d6
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-privatename-identifier-initializer-alt.js
@@ -0,0 +1,104 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-privatename-identifier-initializer-alt.case
+// - src/class-elements/productions/cls-decl-new-sc-line-generator.template
+/*---
+description: Valid PrivateName (field definitions followed by a method in a new line with a semicolon)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public, generators]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ #$ = 1; #_ = 1; #\u{6F} = 1; #℘ = 1; #ZW_‌_NJ = 1; #ZW_‍_J = 1;
+ *m() { return 42; }
+ $() {
+ return this.#$;
+ }
+ _() {
+ return this.#_;
+ }
+ \u{6F}() {
+ return this.#\u{6F};
+ }
+ ℘() {
+ return this.#℘;
+ }
+ ZW_‌_NJ() {
+ return this.#ZW_‌_NJ;
+ }
+ ZW_‍_J() {
+ return this.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(), 1);
+assert.sameValue(c._(), 1);
+assert.sameValue(c.\u{6F}(), 1);
+assert.sameValue(c.℘(), 1);
+assert.sameValue(c.ZW_‌_NJ(), 1);
+assert.sameValue(c.ZW_‍_J(), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-privatename-identifier-initializer.js b/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-privatename-identifier-initializer.js
new file mode 100644
index 0000000000..b145ef1dd4
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-privatename-identifier-initializer.js
@@ -0,0 +1,104 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-privatename-identifier-initializer.case
+// - src/class-elements/productions/cls-decl-new-sc-line-generator.template
+/*---
+description: Valid PrivateName (field definitions followed by a method in a new line with a semicolon)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public, generators]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ #$ = 1; #_ = 1; #\u{6F} = 1; #\u2118 = 1; #ZW_\u200C_NJ = 1; #ZW_\u200D_J = 1;
+ *m() { return 42; }
+ $() {
+ return this.#$;
+ }
+ _() {
+ return this.#_;
+ }
+ \u{6F}() {
+ return this.#\u{6F};
+ }
+ \u2118() {
+ return this.#\u2118;
+ }
+ ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ;
+ }
+ ZW_\u200D_J() {
+ return this.#ZW_\u200D_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(), 1);
+assert.sameValue(c._(), 1);
+assert.sameValue(c.\u{6F}(), 1);
+assert.sameValue(c.\u2118(), 1);
+assert.sameValue(c.ZW_\u200C_NJ(), 1);
+assert.sameValue(c.ZW_\u200D_J(), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-privatename-identifier.js
new file mode 100644
index 0000000000..855a649b26
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-privatename-identifier.js
@@ -0,0 +1,110 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-new-sc-line-generator.template
+/*---
+description: Valid PrivateName (field definitions followed by a method in a new line with a semicolon)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public, generators]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ #$; #_; #\u{6F}; #\u2118; #ZW_\u200C_NJ; #ZW_\u200D_J;
+ *m() { return 42; }
+ $(value) {
+ this.#$ = value;
+ return this.#$;
+ }
+ _(value) {
+ this.#_ = value;
+ return this.#_;
+ }
+ \u{6F}(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F};
+ }
+ \u2118(value) {
+ this.#\u2118 = value;
+ return this.#\u2118;
+ }
+ ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ = value;
+ return this.#ZW_\u200C_NJ;
+ }
+ ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J = value;
+ return this.#ZW_\u200D_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.\u2118(1), 1);
+assert.sameValue(c.ZW_\u200C_NJ(1), 1);
+assert.sameValue(c.ZW_\u200D_J(1), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js
new file mode 100644
index 0000000000..67cfec91a6
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js
@@ -0,0 +1,135 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-async-generator-method-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-new-sc-line-generator.template
+/*---
+description: Valid Static AsyncGeneratorMethod PrivateName (field definitions followed by a method in a new line with a semicolon)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public, generators]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static async * #$(value) {
+ yield * await value;
+ }
+ static async * #_(value) {
+ yield * await value;
+ }
+ static async * #o(value) {
+ yield * await value;
+ }
+ static async * #℘(value) {
+ yield * await value;
+ }
+ static async * #ZW_‌_NJ(value) {
+ yield * await value;
+ }
+ static async * #ZW_‍_J(value) {
+ yield * await value;
+ };
+ *m() { return 42; }
+ static get $() {
+ return this.#$;
+ }
+ static get _() {
+ return this.#_;
+ }
+ static get o() {
+ return this.#o;
+ }
+ static get ℘() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#℘;
+ }
+ static get ZW_‌_NJ() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‌_NJ;
+ }
+ static get ZW_‍_J() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‍_J;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+Promise.all([
+ C.$([1]).next(),
+ C._([1]).next(),
+ C.o([1]).next(),
+ C.℘([1]).next(), // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.ZW_‌_NJ([1]).next(), // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.ZW_‍_J([1]).next(), // DO NOT CHANGE THE NAME OF THIS FIELD
+]).then(results => {
+
+ assert.sameValue(results[0].value, 1);
+ assert.sameValue(results[1].value, 1);
+ assert.sameValue(results[2].value, 1);
+ assert.sameValue(results[3].value, 1);
+ assert.sameValue(results[4].value, 1);
+ assert.sameValue(results[5].value, 1);
+
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-static-async-generator-method-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-static-async-generator-method-privatename-identifier.js
new file mode 100644
index 0000000000..d11b746cb8
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-static-async-generator-method-privatename-identifier.js
@@ -0,0 +1,136 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-async-generator-method-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-new-sc-line-generator.template
+/*---
+description: Valid Static AsyncGeneratorMethod PrivateName (field definitions followed by a method in a new line with a semicolon)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public, generators]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static async * #$(value) {
+ yield * await value;
+ }
+ static async * #_(value) {
+ yield * await value;
+ }
+ static async * #\u{6F}(value) {
+ yield * await value;
+ }
+ static async * #\u2118(value) {
+ yield * await value;
+ }
+ static async * #ZW_\u200C_NJ(value) {
+ yield * await value;
+ }
+ static async * #ZW_\u200D_J(value) {
+ yield * await value;
+ };
+ *m() { return 42; }
+ static get $() {
+ return this.#$;
+ }
+ static get _() {
+ return this.#_;
+ }
+ static get \u{6F}() {
+ return this.#\u{6F};
+ }
+ static get \u2118() {
+ return this.#\u2118;
+ }
+ static get ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ;
+ }
+ static get ZW_\u200D_J() {
+ return this.#ZW_\u200D_J;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+Promise.all([
+ C.$([1]).next(),
+ C._([1]).next(),
+ C.\u{6F}([1]).next(),
+ C.\u2118([1]).next(),
+ C.ZW_\u200C_NJ([1]).next(),
+ C.ZW_\u200D_J([1]).next(),
+]).then(results => {
+
+ assert.sameValue(results[0].value, 1);
+ assert.sameValue(results[1].value, 1);
+ assert.sameValue(results[2].value, 1);
+ assert.sameValue(results[3].value, 1);
+ assert.sameValue(results[4].value, 1);
+ assert.sameValue(results[5].value, 1);
+
+}).then($DONE, $DONE);
+
diff --git a/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-static-async-method-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-static-async-method-privatename-identifier-alt.js
new file mode 100644
index 0000000000..2829df2ddf
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-static-async-method-privatename-identifier-alt.js
@@ -0,0 +1,135 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-async-method-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-new-sc-line-generator.template
+/*---
+description: Valid Static AsyncMethod PrivateName (field definitions followed by a method in a new line with a semicolon)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public, generators]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ AsyncMethod
+
+ AsyncMethod :
+ async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static async #$(value) {
+ return await value;
+ }
+ static async #_(value) {
+ return await value;
+ }
+ static async #o(value) {
+ return await value;
+ }
+ static async #℘(value) {
+ return await value;
+ }
+ static async #ZW_‌_NJ(value) {
+ return await value;
+ }
+ static async #ZW_‍_J(value) {
+ return await value;
+ };
+ *m() { return 42; }
+ static async $(value) {
+ return await this.#$(value);
+ }
+ static async _(value) {
+ return await this.#_(value);
+ }
+ static async o(value) {
+ return await this.#o(value);
+ }
+ static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return await this.#℘(value);
+ }
+ static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return await this.#ZW_‌_NJ(value);
+ }
+ static async ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return await this.#ZW_‍_J(value);
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+Promise.all([
+ C.$(1),
+ C._(1),
+ C.o(1),
+ C.℘(1), // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.ZW_‌_NJ(1), // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.ZW_‍_J(1), // DO NOT CHANGE THE NAME OF THIS FIELD
+]).then(results => {
+
+ assert.sameValue(results[0], 1);
+ assert.sameValue(results[1], 1);
+ assert.sameValue(results[2], 1);
+ assert.sameValue(results[3], 1);
+ assert.sameValue(results[4], 1);
+ assert.sameValue(results[5], 1);
+
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-static-async-method-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-static-async-method-privatename-identifier.js
new file mode 100644
index 0000000000..3a0eee48bb
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-static-async-method-privatename-identifier.js
@@ -0,0 +1,136 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-async-method-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-new-sc-line-generator.template
+/*---
+description: Valid Static AsyncMethod PrivateName (field definitions followed by a method in a new line with a semicolon)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public, generators]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ AsyncMethod
+
+ AsyncMethod :
+ async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static async #$(value) {
+ return await value;
+ }
+ static async #_(value) {
+ return await value;
+ }
+ static async #\u{6F}(value) {
+ return await value;
+ }
+ static async #\u2118(value) {
+ return await value;
+ }
+ static async #ZW_\u200C_NJ(value) {
+ return await value;
+ }
+ static async #ZW_\u200D_J(value) {
+ return await value;
+ };
+ *m() { return 42; }
+ static async $(value) {
+ return await this.#$(value);
+ }
+ static async _(value) {
+ return await this.#_(value);
+ }
+ static async \u{6F}(value) {
+ return await this.#\u{6F}(value);
+ }
+ static async \u2118(value) {
+ return await this.#\u2118(value);
+ }
+ static async ZW_\u200C_NJ(value) {
+ return await this.#ZW_\u200C_NJ(value);
+ }
+ static async ZW_\u200D_J(value) {
+ return await this.#ZW_\u200D_J(value);
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+Promise.all([
+ C.$(1),
+ C._(1),
+ C.\u{6F}(1),
+ C.\u2118(1),
+ C.ZW_\u200C_NJ(1),
+ C.ZW_\u200D_J(1),
+]).then(results => {
+
+ assert.sameValue(results[0], 1);
+ assert.sameValue(results[1], 1);
+ assert.sameValue(results[2], 1);
+ assert.sameValue(results[3], 1);
+ assert.sameValue(results[4], 1);
+ assert.sameValue(results[5], 1);
+
+}).then($DONE, $DONE);
+
diff --git a/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-static-generator-method-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-static-generator-method-privatename-identifier-alt.js
new file mode 100644
index 0000000000..6432137d51
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-static-generator-method-privatename-identifier-alt.js
@@ -0,0 +1,125 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-generator-method-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-new-sc-line-generator.template
+/*---
+description: Valid Static GeneratorMethod PrivateName (field definitions followed by a method in a new line with a semicolon)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public, generators]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ GeneratorMethod
+
+ GeneratorMethod :
+ * ClassElementName ( UniqueFormalParameters ){ GeneratorBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static * #$(value) {
+ yield * value;
+ }
+ static * #_(value) {
+ yield * value;
+ }
+ static * #o(value) {
+ yield * value;
+ }
+ static * #℘(value) {
+ yield * value;
+ }
+ static * #ZW_‌_NJ(value) {
+ yield * value;
+ }
+ static * #ZW_‍_J(value) {
+ yield * value;
+ };
+ *m() { return 42; }
+ static get $() {
+ return this.#$;
+ }
+ static get _() {
+ return this.#_;
+ }
+ static get o() {
+ return this.#o;
+ }
+ static get ℘() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#℘;
+ }
+ static get ZW_‌_NJ() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‌_NJ;
+ }
+ static get ZW_‍_J() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‍_J;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$([1]).next().value, 1);
+assert.sameValue(C._([1]).next().value, 1);
+assert.sameValue(C.o([1]).next().value, 1);
+assert.sameValue(C.℘([1]).next().value, 1);
+assert.sameValue(C.ZW_‌_NJ([1]).next().value, 1);
+assert.sameValue(C.ZW_‍_J([1]).next().value, 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-static-generator-method-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-static-generator-method-privatename-identifier.js
new file mode 100644
index 0000000000..6c3c2e45bb
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-static-generator-method-privatename-identifier.js
@@ -0,0 +1,126 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-generator-method-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-new-sc-line-generator.template
+/*---
+description: Valid Static GeneratorMethod PrivateName (field definitions followed by a method in a new line with a semicolon)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public, generators]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ GeneratorMethod
+
+ GeneratorMethod :
+ * ClassElementName ( UniqueFormalParameters ){ GeneratorBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static * #$(value) {
+ yield * value;
+ }
+ static * #_(value) {
+ yield * value;
+ }
+ static * #\u{6F}(value) {
+ yield * value;
+ }
+ static * #\u2118(value) {
+ yield * value;
+ }
+ static * #ZW_\u200C_NJ(value) {
+ yield * value;
+ }
+ static * #ZW_\u200D_J(value) {
+ yield * value;
+ };
+ *m() { return 42; }
+ static get $() {
+ return this.#$;
+ }
+ static get _() {
+ return this.#_;
+ }
+ static get \u{6F}() {
+ return this.#\u{6F};
+ }
+ static get \u2118() {
+ return this.#\u2118;
+ }
+ static get ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ;
+ }
+ static get ZW_\u200D_J() {
+ return this.#ZW_\u200D_J;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$([1]).next().value, 1);
+assert.sameValue(C._([1]).next().value, 1);
+assert.sameValue(C.\u{6F}([1]).next().value, 1);
+assert.sameValue(C.\u2118([1]).next().value, 1);
+assert.sameValue(C.ZW_\u200C_NJ([1]).next().value, 1);
+assert.sameValue(C.ZW_\u200D_J([1]).next().value, 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-static-method-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-static-method-privatename-identifier-alt.js
new file mode 100644
index 0000000000..2397b6c820
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-static-method-privatename-identifier-alt.js
@@ -0,0 +1,123 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-method-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-new-sc-line-generator.template
+/*---
+description: Valid Static Method PrivateName (field definitions followed by a method in a new line with a semicolon)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public, generators]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ ClassElementName ( UniqueFormalParameters ){ FunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static #$(value) {
+ return value;
+ }
+ static #_(value) {
+ return value;
+ }
+ static #o(value) {
+ return value;
+ }
+ static #℘(value) {
+ return value;
+ }
+ static #ZW_‌_NJ(value) {
+ return value;
+ }
+ static #ZW_‍_J(value) {
+ return value;
+ };
+ *m() { return 42; }
+ static $(value) {
+ return this.#$(value);
+ }
+ static _(value) {
+ return this.#_(value);
+ }
+ static o(value) {
+ return this.#o(value);
+ }
+ static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#℘(value);
+ }
+ static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‌_NJ(value);
+ }
+ static ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‍_J(value);
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(1), 1);
+assert.sameValue(C._(1), 1);
+assert.sameValue(C.o(1), 1);
+assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+assert.sameValue(C.ZW_‌_NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+assert.sameValue(C.ZW_‍_J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-static-method-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-static-method-privatename-identifier.js
new file mode 100644
index 0000000000..acb708bb49
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-static-method-privatename-identifier.js
@@ -0,0 +1,123 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-method-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-new-sc-line-generator.template
+/*---
+description: Valid Static Method PrivateName (field definitions followed by a method in a new line with a semicolon)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public, generators]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ ClassElementName ( UniqueFormalParameters ){ FunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static #$(value) {
+ return value;
+ }
+ static #_(value) {
+ return value;
+ }
+ static #\u{6F}(value) {
+ return value;
+ }
+ static #\u2118(value) {
+ return value;
+ }
+ static #ZW_\u200C_NJ(value) {
+ return value;
+ }
+ static #ZW_\u200D_J(value) {
+ return value;
+ };
+ *m() { return 42; }
+ static $(value) {
+ return this.#$(value);
+ }
+ static _(value) {
+ return this.#_(value);
+ }
+ static \u{6F}(value) {
+ return this.#\u{6F}(value);
+ }
+ static \u2118(value) {
+ return this.#\u2118(value);
+ }
+ static ZW_\u200C_NJ(value) {
+ return this.#ZW_\u200C_NJ(value);
+ }
+ static ZW_\u200D_J(value) {
+ return this.#ZW_\u200D_J(value);
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(1), 1);
+assert.sameValue(C._(1), 1);
+assert.sameValue(C.\u{6F}(1), 1);
+assert.sameValue(C.\u2118(1), 1);
+assert.sameValue(C.ZW_\u200C_NJ(1), 1);
+assert.sameValue(C.ZW_\u200D_J(1), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-static-privatename-identifier-alt-by-classname.js b/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-static-privatename-identifier-alt-by-classname.js
new file mode 100644
index 0000000000..a558cd6148
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-static-privatename-identifier-alt-by-classname.js
@@ -0,0 +1,111 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-alt-by-classname.case
+// - src/class-elements/productions/cls-decl-new-sc-line-generator.template
+/*---
+description: Valid Static PrivateName (field definitions followed by a method in a new line with a semicolon)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public, generators]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_‍_J;
+ *m() { return 42; }
+ static $(value) {
+ C.#$ = value;
+ return C.#$;
+ }
+ static _(value) {
+ C.#_ = value;
+ return C.#_;
+ }
+ static o(value) {
+ C.#\u{6F} = value;
+ return C.#\u{6F};
+ }
+ static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.#℘ = value;
+ return C.#℘;
+ }
+ static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.#ZW_‌_NJ = value;
+ return C.#ZW_‌_NJ;
+ }
+ static ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.#ZW_‍_J = value;
+ return C.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(1), 1);
+assert.sameValue(C._(1), 1);
+assert.sameValue(C.o(1), 1);
+assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+assert.sameValue(C.ZW_‌_NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+assert.sameValue(C.ZW_‍_J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-static-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-static-privatename-identifier-alt.js
new file mode 100644
index 0000000000..03efb13b72
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-static-privatename-identifier-alt.js
@@ -0,0 +1,111 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-new-sc-line-generator.template
+/*---
+description: Valid Static PrivateName (field definitions followed by a method in a new line with a semicolon)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public, generators]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_‍_J;
+ *m() { return 42; }
+ static $(value) {
+ this.#$ = value;
+ return this.#$;
+ }
+ static _(value) {
+ this.#_ = value;
+ return this.#_;
+ }
+ static o(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F};
+ }
+ static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ this.#℘ = value;
+ return this.#℘;
+ }
+ static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ this.#ZW_‌_NJ = value;
+ return this.#ZW_‌_NJ;
+ }
+ static ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ this.#ZW_‍_J = value;
+ return this.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(1), 1);
+assert.sameValue(C._(1), 1);
+assert.sameValue(C.o(1), 1);
+assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+assert.sameValue(C.ZW_‌_NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+assert.sameValue(C.ZW_‍_J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-static-privatename-identifier-by-classname.js b/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-static-privatename-identifier-by-classname.js
new file mode 100644
index 0000000000..3ba13a2e10
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-static-privatename-identifier-by-classname.js
@@ -0,0 +1,111 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-by-classname.case
+// - src/class-elements/productions/cls-decl-new-sc-line-generator.template
+/*---
+description: Valid Static PrivateName (field definitions followed by a method in a new line with a semicolon)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public, generators]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J;
+ *m() { return 42; }
+ static $(value) {
+ C.#$ = value;
+ return C.#$;
+ }
+ static _(value) {
+ C.#_ = value;
+ return C.#_;
+ }
+ static \u{6F}(value) {
+ C.#\u{6F} = value;
+ return C.#\u{6F};
+ }
+ static \u2118(value) {
+ C.#\u2118 = value;
+ return C.#\u2118;
+ }
+ static ZW_\u200C_NJ(value) {
+ C.#ZW_\u200C_NJ = value;
+ return C.#ZW_\u200C_NJ;
+ }
+ static ZW_\u200D_J(value) {
+ C.#ZW_\u200D_J = value;
+ return C.#ZW_\u200D_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(1), 1);
+assert.sameValue(C._(1), 1);
+assert.sameValue(C.\u{6F}(1), 1);
+assert.sameValue(C.\u2118(1), 1);
+assert.sameValue(C.ZW_\u200C_NJ(1), 1);
+assert.sameValue(C.ZW_\u200D_J(1), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js b/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js
new file mode 100644
index 0000000000..d6d305fc67
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js
@@ -0,0 +1,105 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-initializer-alt-by-classname.case
+// - src/class-elements/productions/cls-decl-new-sc-line-generator.template
+/*---
+description: Valid Static PrivateName (field definitions followed by a method in a new line with a semicolon)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public, generators]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_‍_J = 1;
+ *m() { return 42; }
+ static $() {
+ return C.#$;
+ }
+ static _() {
+ return C.#_;
+ }
+ static \u{6F}() {
+ return C.#\u{6F};
+ }
+ static ℘() {
+ return C.#℘;
+ }
+ static ZW_‌_NJ() {
+ return C.#ZW_‌_NJ;
+ }
+ static ZW_‍_J() {
+ return C.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(), 1);
+assert.sameValue(C._(), 1);
+assert.sameValue(C.\u{6F}(), 1);
+assert.sameValue(C.℘(), 1);
+assert.sameValue(C.ZW_‌_NJ(), 1);
+assert.sameValue(C.ZW_‍_J(), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-static-privatename-identifier-initializer-alt.js b/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-static-privatename-identifier-initializer-alt.js
new file mode 100644
index 0000000000..dba6c15312
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-static-privatename-identifier-initializer-alt.js
@@ -0,0 +1,105 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-initializer-alt.case
+// - src/class-elements/productions/cls-decl-new-sc-line-generator.template
+/*---
+description: Valid Static PrivateName (field definitions followed by a method in a new line with a semicolon)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public, generators]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_‍_J = 1;
+ *m() { return 42; }
+ static $() {
+ return this.#$;
+ }
+ static _() {
+ return this.#_;
+ }
+ static \u{6F}() {
+ return this.#\u{6F};
+ }
+ static ℘() {
+ return this.#℘;
+ }
+ static ZW_‌_NJ() {
+ return this.#ZW_‌_NJ;
+ }
+ static ZW_‍_J() {
+ return this.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(), 1);
+assert.sameValue(C._(), 1);
+assert.sameValue(C.\u{6F}(), 1);
+assert.sameValue(C.℘(), 1);
+assert.sameValue(C.ZW_‌_NJ(), 1);
+assert.sameValue(C.ZW_‍_J(), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-static-privatename-identifier-initializer.js b/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-static-privatename-identifier-initializer.js
new file mode 100644
index 0000000000..73f5afb3a4
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-static-privatename-identifier-initializer.js
@@ -0,0 +1,105 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-initializer.case
+// - src/class-elements/productions/cls-decl-new-sc-line-generator.template
+/*---
+description: Valid Static PrivateName (field definitions followed by a method in a new line with a semicolon)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public, generators]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #\u2118 = 1; static #ZW_\u200C_NJ = 1; static #ZW_\u200D_J = 1;
+ *m() { return 42; }
+ static $() {
+ return this.#$;
+ }
+ static _() {
+ return this.#_;
+ }
+ static \u{6F}() {
+ return this.#\u{6F};
+ }
+ static \u2118() {
+ return this.#\u2118;
+ }
+ static ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ;
+ }
+ static ZW_\u200D_J() {
+ return this.#ZW_\u200D_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(), 1);
+assert.sameValue(C._(), 1);
+assert.sameValue(C.\u{6F}(), 1);
+assert.sameValue(C.\u2118(), 1);
+assert.sameValue(C.ZW_\u200C_NJ(), 1);
+assert.sameValue(C.ZW_\u200D_J(), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-static-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-static-privatename-identifier.js
new file mode 100644
index 0000000000..0c59b4f671
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-rs-static-privatename-identifier.js
@@ -0,0 +1,111 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-new-sc-line-generator.template
+/*---
+description: Valid Static PrivateName (field definitions followed by a method in a new line with a semicolon)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public, generators]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J;
+ *m() { return 42; }
+ static $(value) {
+ this.#$ = value;
+ return this.#$;
+ }
+ static _(value) {
+ this.#_ = value;
+ return this.#_;
+ }
+ static \u{6F}(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F};
+ }
+ static \u2118(value) {
+ this.#\u2118 = value;
+ return this.#\u2118;
+ }
+ static ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ = value;
+ return this.#ZW_\u200C_NJ;
+ }
+ static ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J = value;
+ return this.#ZW_\u200D_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(1), 1);
+assert.sameValue(C._(1), 1);
+assert.sameValue(C.\u{6F}(1), 1);
+assert.sameValue(C.\u2118(1), 1);
+assert.sameValue(C.ZW_\u200C_NJ(1), 1);
+assert.sameValue(C.ZW_\u200D_J(1), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-static-private-fields.js b/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-static-private-fields.js
new file mode 100644
index 0000000000..4a158fc799
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-static-private-fields.js
@@ -0,0 +1,72 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/static-private-fields.case
+// - src/class-elements/productions/cls-decl-new-sc-line-generator.template
+/*---
+description: static private fields (field definitions followed by a method in a new line with a semicolon)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public, generators]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ static FieldDefinition ;
+
+ FieldDefinition :
+ ClassElementName Initializer_opt
+
+ ClassElementName :
+ PrivateName
+
+ PrivateName :
+ # IdentifierName
+
+---*/
+
+
+class C {
+ static #x; static #y;
+ *m() { return 42; }
+ static x() {
+ this.#x = 42;
+ return this.#x;
+ }
+ static y() {
+ this.#y = 43;
+ return this.#y;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+// Test the private fields do not appear as properties before set to value
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#x"), "test 1");
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 2");
+assert(!Object.prototype.hasOwnProperty.call(c, "#x"), "test 3");
+
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#y"), "test 4");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 5");
+assert(!Object.prototype.hasOwnProperty.call(c, "#y"), "test 6");
+
+// Test if private fields can be sucessfully accessed and set to value
+assert.sameValue(C.x(), 42, "test 7");
+assert.sameValue(C.y(), 43, "test 8");
+
+// Test the private fields do not appear as properties before after set to value
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 9");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 10");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-static-private-methods-with-fields.js b/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-static-private-methods-with-fields.js
new file mode 100644
index 0000000000..9e35870051
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-static-private-methods-with-fields.js
@@ -0,0 +1,89 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/static-private-methods-with-fields.case
+// - src/class-elements/productions/cls-decl-new-sc-line-generator.template
+/*---
+description: static private methods with fields (field definitions followed by a method in a new line with a semicolon)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class-static-fields-private, class, class-fields-public, generators]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ static FieldDefinition ;
+
+ FieldDefinition :
+ ClassElementName Initializer_opt
+
+ ClassElementName :
+ PrivateName
+
+ PrivateName :
+ # IdentifierName
+
+---*/
+
+
+class C {
+ static #xVal; static #yVal;
+ *m() { return 42; }
+ static #x(value) {
+ this.#xVal = value;
+ return this.#xVal;
+ }
+ static #y(value) {
+ this.#yVal = value;
+ return this.#yVal;
+ }
+ static x() {
+ return this.#x(42);
+ }
+ static y() {
+ return this.#y(43);
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+// Test the private methods do not appear as properties before set to value
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#x"), "test 1");
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 2");
+assert(!Object.prototype.hasOwnProperty.call(c, "#x"), "test 3");
+
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#y"), "test 4");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 5");
+assert(!Object.prototype.hasOwnProperty.call(c, "#y"), "test 6");
+
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#xVal"), "test 7");
+assert(!Object.prototype.hasOwnProperty.call(C, "#xVal"), "test 8");
+assert(!Object.prototype.hasOwnProperty.call(c, "#xVal"), "test 9");
+
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#yVal"), "test 10");
+assert(!Object.prototype.hasOwnProperty.call(C, "#yVal"), "test 11");
+assert(!Object.prototype.hasOwnProperty.call(c, "#yVal"), "test 12");
+
+// Test if private fields can be sucessfully accessed and set to value
+assert.sameValue(C.x(), 42, "test 13");
+assert.sameValue(C.y(), 43, "test 14");
+
+// Test the private fields do not appear as properties before after set to value
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 15");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 16");
+
+assert(!Object.prototype.hasOwnProperty.call(C, "#xVal"), "test 17");
+assert(!Object.prototype.hasOwnProperty.call(C, "#yVal"), "test 18");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-static-private-methods.js b/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-static-private-methods.js
new file mode 100644
index 0000000000..f184130b48
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-static-private-methods.js
@@ -0,0 +1,76 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/static-private-methods.case
+// - src/class-elements/productions/cls-decl-new-sc-line-generator.template
+/*---
+description: static private methods (field definitions followed by a method in a new line with a semicolon)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public, generators]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ static FieldDefinition ;
+
+ FieldDefinition :
+ ClassElementName Initializer_opt
+
+ ClassElementName :
+ PrivateName
+
+ PrivateName :
+ # IdentifierName
+
+---*/
+
+
+class C {
+ ;
+ *m() { return 42; }
+ static #x(value) {
+ return value / 2;
+ }
+ static #y(value) {
+ return value * 2;
+ }
+ static x() {
+ return this.#x(84);
+ }
+ static y() {
+ return this.#y(43);
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+// Test the private methods do not appear as properties before set to value
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#x"), "test 1");
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 2");
+assert(!Object.prototype.hasOwnProperty.call(c, "#x"), "test 3");
+
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#y"), "test 4");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 5");
+assert(!Object.prototype.hasOwnProperty.call(c, "#y"), "test 6");
+
+// Test if private fields can be sucessfully accessed and set to value
+assert.sameValue(C.x(), 42, "test 7");
+assert.sameValue(C.y(), 86, "test 8");
+
+// Test the private fields do not appear as properties before after set to value
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 9");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 10");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-string-literal-names.js b/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-string-literal-names.js
new file mode 100644
index 0000000000..9eae83137e
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-sc-line-gen-string-literal-names.js
@@ -0,0 +1,110 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/string-literal-names.case
+// - src/class-elements/productions/cls-decl-new-sc-line-generator.template
+/*---
+description: String literal names (field definitions followed by a method in a new line with a semicolon)
+esid: prod-FieldDefinition
+features: [class-fields-public, class, generators]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement:
+ ...
+ FieldDefinition ;
+
+ FieldDefinition:
+ ClassElementName Initializer_opt
+
+ ClassElementName:
+ PropertyName
+
+---*/
+
+
+class C {
+ 'a'; "b"; 'c' = 39;
+ "d" = 42;
+ *m() { return 42; }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "a"),
+ "a does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "a"),
+ "a does not appear as an own property on C constructor"
+);
+
+verifyProperty(c, "a", {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "b"),
+ "b does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "b"),
+ "b does not appear as an own property on C constructor"
+);
+
+verifyProperty(c, "b", {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "c"),
+ "c does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "c"),
+ "c does not appear as an own property on C constructor"
+);
+
+verifyProperty(c, "c", {
+ value: 39,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "d"),
+ "d does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "d"),
+ "d does not appear as an own property on C constructor"
+);
+
+verifyProperty(c, "d", {
+ value: 42,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-computed-names.js b/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-computed-names.js
new file mode 100644
index 0000000000..1fc29ec2ed
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-computed-names.js
@@ -0,0 +1,108 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/computed-names.case
+// - src/class-elements/productions/cls-decl-new-sc-line-method.template
+/*---
+description: Computed property names (field definitions followed by a method in a new line with a semicolon)
+esid: prod-FieldDefinition
+features: [class-fields-public, computed-property-names, class]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement:
+ ...
+ FieldDefinition ;
+
+ FieldDefinition:
+ ClassElementName Initializer_opt
+
+ ClassElementName:
+ PropertyName
+
+---*/
+var x = "b";
+
+
+
+class C {
+ [x] = 42; [10] = "meep"; ["not initialized"];
+ m() { return 42; }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "b"),
+ "b doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "b"),
+ "b doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "b", {
+ value: 42,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "x"),
+ "x doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "x"),
+ "x doesn't appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "x"),
+ "x doesn't appear as an own property on C instance"
+);
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "10"),
+ "10 doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "10"),
+ "10 doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "10", {
+ value: "meep",
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "not initialized"),
+ "'not initialized' doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "not initialized"),
+ "'not initialized' doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "not initialized", {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-computed-symbol-names.js b/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-computed-symbol-names.js
new file mode 100644
index 0000000000..a056e38fb3
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-computed-symbol-names.js
@@ -0,0 +1,106 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/computed-symbol-names.case
+// - src/class-elements/productions/cls-decl-new-sc-line-method.template
+/*---
+description: Computed property symbol names (field definitions followed by a method in a new line with a semicolon)
+esid: prod-FieldDefinition
+features: [class-fields-public, Symbol, computed-property-names, class]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement:
+ ...
+ FieldDefinition ;
+
+ FieldDefinition:
+ ClassElementName Initializer_opt
+
+ ClassElementName:
+ PropertyName
+
+---*/
+var x = Symbol();
+var y = Symbol();
+
+
+
+class C {
+ [x]; [y] = 42;
+ m() { return 42; }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, x),
+ "Symbol x doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, x),
+ "Symbol x doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, x, {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, y),
+ "Symbol y doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, y),
+ "Symbol y doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, y, {
+ value: 42,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "x"),
+ "x doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "x"),
+ "x doesn't appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "x"),
+ "x doesn't appear as an own property on C instance"
+);
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "y"),
+ "y doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "y"),
+ "y doesn't appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "y"),
+ "y doesn't appear as an own property on C instance"
+);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-grammar-privatename-identifier-semantics-stringvalue.js b/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-grammar-privatename-identifier-semantics-stringvalue.js
new file mode 100644
index 0000000000..da1063e3e4
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-grammar-privatename-identifier-semantics-stringvalue.js
@@ -0,0 +1,110 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-privatename-identifier-semantics-stringvalue.case
+// - src/class-elements/productions/cls-decl-new-sc-line-method.template
+/*---
+description: PrivateName Static Semantics, StringValue (field definitions followed by a method in a new line with a semicolon)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+
+ 1. Return the String value consisting of the sequence of code
+ units corresponding to PrivateName. In determining the sequence
+ any occurrences of \ UnicodeEscapeSequence are first replaced
+ with the code point represented by the UnicodeEscapeSequence
+ and then the code points of the entire PrivateName are converted
+ to code units by UTF16Encoding (10.1.1) each code point.
+
+---*/
+
+
+class C {
+ #\u{6F};
+ #\u2118;
+ #ZW_\u200C_NJ;
+ #ZW_\u200D_J;;
+ m() { return 42; }
+ o(value) {
+ this.#o = value;
+ return this.#o;
+ }
+ ℘(value) {
+ this.#℘ = value;
+ return this.#℘;
+ }
+ ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS METHOD
+ this.#ZW_‌_NJ = value;
+ return this.#ZW_‌_NJ;
+ }
+ ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS METHOD
+ this.#ZW_‍_J = value;
+ return this.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.o(1), 1);
+assert.sameValue(c.℘(1), 1);
+assert.sameValue(c.ZW_‌_NJ(1), 1);
+assert.sameValue(c.ZW_‍_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-literal-names-asi.js b/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-literal-names-asi.js
new file mode 100644
index 0000000000..1d58676f76
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-literal-names-asi.js
@@ -0,0 +1,78 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/literal-names-asi.case
+// - src/class-elements/productions/cls-decl-new-sc-line-method.template
+/*---
+description: Literal property names with ASI (field definitions followed by a method in a new line with a semicolon)
+esid: prod-FieldDefinition
+features: [class-fields-public, class]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement:
+ ...
+ FieldDefinition ;
+
+ FieldDefinition:
+ ClassElementName Initializer_opt
+
+ ClassElementName:
+ PropertyName
+
+---*/
+
+
+class C {
+ a
+ b = 42;;
+ m() { return 42; }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "a"),
+ "a doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "a"),
+ "a doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "a", {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "b"),
+ "b doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "b"),
+ "b doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "b", {
+ value: 42,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-literal-names.js b/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-literal-names.js
new file mode 100644
index 0000000000..182103077c
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-literal-names.js
@@ -0,0 +1,97 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/literal-names.case
+// - src/class-elements/productions/cls-decl-new-sc-line-method.template
+/*---
+description: Literal property names (field definitions followed by a method in a new line with a semicolon)
+esid: prod-FieldDefinition
+features: [class-fields-public, class]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement:
+ ...
+ FieldDefinition ;
+
+ FieldDefinition:
+ ClassElementName Initializer_opt
+
+ ClassElementName:
+ PropertyName
+
+---*/
+const fn = function() {}
+
+
+
+class C {
+ a; b = 42;
+ c = fn;
+ m() { return 42; }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "a"),
+ "a doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "a"),
+ "a doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "a", {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "b"),
+ "b doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "b"),
+ "b doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "b", {
+ value: 42,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "c"),
+ "c doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "c"),
+ "c doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "c", {
+ value: fn,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-private-field-usage.js b/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-private-field-usage.js
new file mode 100644
index 0000000000..9bc9044082
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-private-field-usage.js
@@ -0,0 +1,50 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-field-usage.case
+// - src/class-elements/productions/cls-decl-new-sc-line-method.template
+/*---
+description: PrivateName CallExpression usage (private field) (field definitions followed by a method in a new line with a semicolon)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ Updated Productions
+
+ CallExpression[Yield, Await]:
+ CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+ SuperCall[?Yield, ?Await]
+ CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+ CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+ CallExpression[?Yield, ?Await].IdentifierName
+ CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+ CallExpression[?Yield, ?Await].PrivateName
+
+---*/
+
+
+class C {
+ #m = 'test262';;
+ m() { return 42; }
+ method() {
+ return this.#m;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.method(), 'test262');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-private-method-getter-usage.js b/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-private-method-getter-usage.js
new file mode 100644
index 0000000000..e879cf66c5
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-private-method-getter-usage.js
@@ -0,0 +1,50 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-method-getter-usage.case
+// - src/class-elements/productions/cls-decl-new-sc-line-method.template
+/*---
+description: PrivateName CallExpression usage (Accesor get method) (field definitions followed by a method in a new line with a semicolon)
+esid: prod-FieldDefinition
+features: [class-methods-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ Updated Productions
+
+ CallExpression[Yield, Await]:
+ CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+ SuperCall[?Yield, ?Await]
+ CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+ CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+ CallExpression[?Yield, ?Await].IdentifierName
+ CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+ CallExpression[?Yield, ?Await].PrivateName
+
+---*/
+
+
+class C {
+ get #m() { return 'test262'; };
+ m() { return 42; }
+ method() {
+ return this.#m;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.method(), 'test262');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-private-method-usage.js b/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-private-method-usage.js
new file mode 100644
index 0000000000..a3c1f7b671
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-private-method-usage.js
@@ -0,0 +1,50 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-method-usage.case
+// - src/class-elements/productions/cls-decl-new-sc-line-method.template
+/*---
+description: PrivateName CallExpression usage (private method) (field definitions followed by a method in a new line with a semicolon)
+esid: prod-FieldDefinition
+features: [class-methods-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ Updated Productions
+
+ CallExpression[Yield, Await]:
+ CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+ SuperCall[?Yield, ?Await]
+ CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+ CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+ CallExpression[?Yield, ?Await].IdentifierName
+ CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+ CallExpression[?Yield, ?Await].PrivateName
+
+---*/
+
+
+class C {
+ #m() { return 'test262'; };
+ m() { return 42; }
+ method() {
+ return this.#m();
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.method(), 'test262');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-private-names.js b/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-private-names.js
new file mode 100644
index 0000000000..4874428248
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-private-names.js
@@ -0,0 +1,72 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-names.case
+// - src/class-elements/productions/cls-decl-new-sc-line-method.template
+/*---
+description: private names (field definitions followed by a method in a new line with a semicolon)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ FieldDefinition ;
+
+ FieldDefinition :
+ ClassElementName Initializer_opt
+
+ ClassElementName :
+ PrivateName
+
+ PrivateName :
+ # IdentifierName
+
+---*/
+
+
+class C {
+ #x; #y;
+ m() { return 42; }
+ x() {
+ this.#x = 42;
+ return this.#x;
+ }
+ y() {
+ this.#y = 43;
+ return this.#y;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+// Test the private fields do not appear as properties before set to value
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#x"), "test 1");
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 2");
+assert(!Object.prototype.hasOwnProperty.call(c, "#x"), "test 3");
+
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#y"), "test 4");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 5");
+assert(!Object.prototype.hasOwnProperty.call(c, "#y"), "test 6");
+
+// Test if private fields can be sucessfully accessed and set to value
+assert.sameValue(c.x(), 42, "test 7");
+assert.sameValue(c.y(), 43, "test 8");
+
+// Test the private fields do not appear as properties before after set to value
+assert(!Object.prototype.hasOwnProperty.call(c, "#x"), "test 9");
+assert(!Object.prototype.hasOwnProperty.call(c, "#y"), "test 10");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-field-identifier-initializer.js b/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-field-identifier-initializer.js
new file mode 100644
index 0000000000..c4d712146c
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-field-identifier-initializer.js
@@ -0,0 +1,88 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-field-identifier-initializer.case
+// - src/class-elements/productions/cls-decl-new-sc-line-method.template
+/*---
+description: Valid FieldDefinition (field definitions followed by a method in a new line with a semicolon)
+esid: prod-FieldDefinition
+features: [class-fields-public, class]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+
+ PropertyName :
+ LiteralPropertyName
+ ComputedPropertyName
+
+ LiteralPropertyName :
+ IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ $ = 1; _ = 1; \u{6F} = 1; \u2118 = 1; ZW_\u200C_NJ = 1; ZW_\u200D_J = 1;
+ m() { return 42; }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$, 1);
+assert.sameValue(c._, 1);
+assert.sameValue(c.\u{6F}, 1);
+assert.sameValue(c.\u2118, 1);
+assert.sameValue(c.ZW_\u200C_NJ, 1);
+assert.sameValue(c.ZW_\u200D_J, 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-field-identifier.js b/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-field-identifier.js
new file mode 100644
index 0000000000..2372787738
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-field-identifier.js
@@ -0,0 +1,95 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-field-identifier.case
+// - src/class-elements/productions/cls-decl-new-sc-line-method.template
+/*---
+description: Valid FieldDefinition (field definitions followed by a method in a new line with a semicolon)
+esid: prod-FieldDefinition
+features: [class-fields-public, class]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+
+ PropertyName :
+ LiteralPropertyName
+ ComputedPropertyName
+
+ LiteralPropertyName :
+ IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ $; _; \u{6F}; \u2118; ZW_\u200C_NJ; ZW_\u200D_J;
+ m() { return 42; }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+c.$ = 1;
+c._ = 1;
+c.\u{6F} = 1;
+c.\u2118 = 1;
+c.ZW_\u200C_NJ = 1;
+c.ZW_\u200D_J = 1;
+
+assert.sameValue(c.$, 1);
+assert.sameValue(c._, 1);
+assert.sameValue(c.\u{6F}, 1);
+assert.sameValue(c.\u2118, 1);
+assert.sameValue(c.ZW_\u200C_NJ, 1);
+assert.sameValue(c.ZW_\u200D_J, 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-private-getter-alt.js b/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-private-getter-alt.js
new file mode 100644
index 0000000000..bb4149d6ba
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-private-getter-alt.js
@@ -0,0 +1,129 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-getter-alt.case
+// - src/class-elements/productions/cls-decl-new-sc-line-method.template
+/*---
+description: Valid PrivateName as private getter (field definitions followed by a method in a new line with a semicolon)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ...
+ get ClassElementName ( ){ FunctionBody }
+ ...
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ #$_; #__; #\u{6F}_; #℘_; #ZW_‌_NJ_; #ZW_‍_J_;
+ get #$() {
+ return this.#$_;
+ }
+ get #_() {
+ return this.#__;
+ }
+ get #\u{6F}() {
+ return this.#\u{6F}_;
+ }
+ get #℘() {
+ return this.#℘_;
+ }
+ get #ZW_‌_NJ() {
+ return this.#ZW_‌_NJ_;
+ }
+ get #ZW_‍_J() {
+ return this.#ZW_‍_J_;
+ }
+;
+ m() { return 42; }
+ $(value) {
+ this.#$_ = value;
+ return this.#$;
+ }
+ _(value) {
+ this.#__ = value;
+ return this.#_;
+ }
+ \u{6F}(value) {
+ this.#\u{6F}_ = value;
+ return this.#\u{6F};
+ }
+ ℘(value) {
+ this.#℘_ = value;
+ return this.#℘;
+ }
+ ZW_‌_NJ(value) {
+ this.#ZW_‌_NJ_ = value;
+ return this.#ZW_‌_NJ;
+ }
+ ZW_‍_J(value) {
+ this.#ZW_‍_J_ = value;
+ return this.#ZW_‍_J;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.℘(1), 1);
+assert.sameValue(c.ZW_‌_NJ(1), 1);
+assert.sameValue(c.ZW_‍_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-private-getter.js b/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-private-getter.js
new file mode 100644
index 0000000000..9f5b4ece4e
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-private-getter.js
@@ -0,0 +1,129 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-getter.case
+// - src/class-elements/productions/cls-decl-new-sc-line-method.template
+/*---
+description: Valid PrivateName as private getter (field definitions followed by a method in a new line with a semicolon)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ...
+ get ClassElementName ( ){ FunctionBody }
+ ...
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ #$_; #__; #\u{6F}_; #\u2118_; #ZW_\u200C_NJ_; #ZW_\u200D_J_;
+ get #$() {
+ return this.#$_;
+ }
+ get #_() {
+ return this.#__;
+ }
+ get #\u{6F}() {
+ return this.#\u{6F}_;
+ }
+ get #\u2118() {
+ return this.#\u2118_;
+ }
+ get #ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ_;
+ }
+ get #ZW_\u200D_J() {
+ return this.#ZW_\u200D_J_;
+ }
+;
+ m() { return 42; }
+ $(value) {
+ this.#$_ = value;
+ return this.#$;
+ }
+ _(value) {
+ this.#__ = value;
+ return this.#_;
+ }
+ \u{6F}(value) {
+ this.#\u{6F}_ = value;
+ return this.#\u{6F};
+ }
+ \u2118(value) {
+ this.#\u2118_ = value;
+ return this.#\u2118;
+ }
+ ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ_ = value;
+ return this.#ZW_\u200C_NJ;
+ }
+ ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J_ = value;
+ return this.#ZW_\u200D_J;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.\u2118(1), 1);
+assert.sameValue(c.ZW_\u200C_NJ(1), 1);
+assert.sameValue(c.ZW_\u200D_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-private-method-alt.js b/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-private-method-alt.js
new file mode 100644
index 0000000000..239d65744e
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-private-method-alt.js
@@ -0,0 +1,128 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-method-alt.case
+// - src/class-elements/productions/cls-decl-new-sc-line-method.template
+/*---
+description: Valid PrivateName as private method (field definitions followed by a method in a new line with a semicolon)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ClassElementName ( UniqueFormalParameters ) { FunctionBody }
+ ...
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ #$_; #__; #\u{6F}_; #℘_; #ZW_‌_NJ_; #ZW_‍_J_;
+ #$() {
+ return this.#$_;
+ }
+ #_() {
+ return this.#__;
+ }
+ #\u{6F}() {
+ return this.#\u{6F}_;
+ }
+ #℘() {
+ return this.#℘_;
+ }
+ #ZW_‌_NJ() {
+ return this.#ZW_‌_NJ_;
+ }
+ #ZW_‍_J() {
+ return this.#ZW_‍_J_;
+ }
+;
+ m() { return 42; }
+ $(value) {
+ this.#$_ = value;
+ return this.#$();
+ }
+ _(value) {
+ this.#__ = value;
+ return this.#_();
+ }
+ \u{6F}(value) {
+ this.#\u{6F}_ = value;
+ return this.#\u{6F}();
+ }
+ ℘(value) {
+ this.#℘_ = value;
+ return this.#℘();
+ }
+ ZW_‌_NJ(value) {
+ this.#ZW_‌_NJ_ = value;
+ return this.#ZW_‌_NJ();
+ }
+ ZW_‍_J(value) {
+ this.#ZW_‍_J_ = value;
+ return this.#ZW_‍_J();
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.℘(1), 1);
+assert.sameValue(c.ZW_‌_NJ(1), 1);
+assert.sameValue(c.ZW_‍_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-private-method.js b/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-private-method.js
new file mode 100644
index 0000000000..0056ecde83
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-private-method.js
@@ -0,0 +1,128 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-method.case
+// - src/class-elements/productions/cls-decl-new-sc-line-method.template
+/*---
+description: Valid PrivateName as private method (field definitions followed by a method in a new line with a semicolon)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ClassElementName ( UniqueFormalParameters ) { FunctionBody }
+ ...
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ #$_; #__; #\u{6F}_; #\u2118_; #ZW_\u200C_NJ_; #ZW_\u200D_J_;
+ #$() {
+ return this.#$_;
+ }
+ #_() {
+ return this.#__;
+ }
+ #\u{6F}() {
+ return this.#\u{6F}_;
+ }
+ #\u2118() {
+ return this.#\u2118_;
+ }
+ #ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ_;
+ }
+ #ZW_\u200D_J() {
+ return this.#ZW_\u200D_J_;
+ }
+;
+ m() { return 42; }
+ $(value) {
+ this.#$_ = value;
+ return this.#$();
+ }
+ _(value) {
+ this.#__ = value;
+ return this.#_();
+ }
+ \u{6F}(value) {
+ this.#\u{6F}_ = value;
+ return this.#\u{6F}();
+ }
+ \u2118(value) {
+ this.#\u2118_ = value;
+ return this.#\u2118();
+ }
+ ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ_ = value;
+ return this.#ZW_\u200C_NJ();
+ }
+ ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J_ = value;
+ return this.#ZW_\u200D_J();
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.\u2118(1), 1);
+assert.sameValue(c.ZW_\u200C_NJ(1), 1);
+assert.sameValue(c.ZW_\u200D_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-private-setter-alt.js b/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-private-setter-alt.js
new file mode 100644
index 0000000000..c95ce333ff
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-private-setter-alt.js
@@ -0,0 +1,128 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-setter-alt.case
+// - src/class-elements/productions/cls-decl-new-sc-line-method.template
+/*---
+description: Valid PrivateName as private setter (field definitions followed by a method in a new line with a semicolon)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ...
+ set ClassElementName ( PropertySetParameterList ) { FunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ #$_; #__; #\u{6F}_; #℘_; #ZW_‌_NJ_; #ZW_‍_J_;
+ set #$(value) {
+ this.#$_ = value;
+ }
+ set #_(value) {
+ this.#__ = value;
+ }
+ set #\u{6F}(value) {
+ this.#\u{6F}_ = value;
+ }
+ set #℘(value) {
+ this.#℘_ = value;
+ }
+ set #ZW_‌_NJ(value) {
+ this.#ZW_‌_NJ_ = value;
+ }
+ set #ZW_‍_J(value) {
+ this.#ZW_‍_J_ = value;
+ }
+;
+ m() { return 42; }
+ $(value) {
+ this.#$ = value;
+ return this.#$_;
+ }
+ _(value) {
+ this.#_ = value;
+ return this.#__;
+ }
+ \u{6F}(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F}_;
+ }
+ ℘(value) {
+ this.#℘ = value;
+ return this.#℘_;
+ }
+ ZW_‌_NJ(value) {
+ this.#ZW_‌_NJ = value;
+ return this.#ZW_‌_NJ_;
+ }
+ ZW_‍_J(value) {
+ this.#ZW_‍_J = value;
+ return this.#ZW_‍_J_;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.℘(1), 1);
+assert.sameValue(c.ZW_‌_NJ(1), 1);
+assert.sameValue(c.ZW_‍_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-private-setter.js b/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-private-setter.js
new file mode 100644
index 0000000000..33b324895b
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-private-setter.js
@@ -0,0 +1,128 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-setter.case
+// - src/class-elements/productions/cls-decl-new-sc-line-method.template
+/*---
+description: Valid PrivateName as private setter (field definitions followed by a method in a new line with a semicolon)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ...
+ set ClassElementName ( PropertySetParameterList ) { FunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ #$_; #__; #\u{6F}_; #\u2118_; #ZW_\u200C_NJ_; #ZW_\u200D_J_;
+ set #$(value) {
+ this.#$_ = value;
+ }
+ set #_(value) {
+ this.#__ = value;
+ }
+ set #\u{6F}(value) {
+ this.#\u{6F}_ = value;
+ }
+ set #\u2118(value) {
+ this.#\u2118_ = value;
+ }
+ set #ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ_ = value;
+ }
+ set #ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J_ = value;
+ }
+;
+ m() { return 42; }
+ $(value) {
+ this.#$ = value;
+ return this.#$_;
+ }
+ _(value) {
+ this.#_ = value;
+ return this.#__;
+ }
+ \u{6F}(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F}_;
+ }
+ \u2118(value) {
+ this.#\u2118 = value;
+ return this.#\u2118_;
+ }
+ ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ = value;
+ return this.#ZW_\u200C_NJ_;
+ }
+ ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J = value;
+ return this.#ZW_\u200D_J_;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.\u2118(1), 1);
+assert.sameValue(c.ZW_\u200C_NJ(1), 1);
+assert.sameValue(c.ZW_\u200D_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-privatename-identifier-alt.js
new file mode 100644
index 0000000000..6826cb6dea
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-privatename-identifier-alt.js
@@ -0,0 +1,110 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-new-sc-line-method.template
+/*---
+description: Valid PrivateName (field definitions followed by a method in a new line with a semicolon)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ #$; #_; #\u{6F}; #℘; #ZW_‌_NJ; #ZW_‍_J;
+ m() { return 42; }
+ $(value) {
+ this.#$ = value;
+ return this.#$;
+ }
+ _(value) {
+ this.#_ = value;
+ return this.#_;
+ }
+ \u{6F}(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F};
+ }
+ ℘(value) {
+ this.#℘ = value;
+ return this.#℘;
+ }
+ ZW_‌_NJ(value) {
+ this.#ZW_‌_NJ = value;
+ return this.#ZW_‌_NJ;
+ }
+ ZW_‍_J(value) {
+ this.#ZW_‍_J = value;
+ return this.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.℘(1), 1);
+assert.sameValue(c.ZW_‌_NJ(1), 1);
+assert.sameValue(c.ZW_‍_J(1), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-privatename-identifier-initializer-alt.js b/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-privatename-identifier-initializer-alt.js
new file mode 100644
index 0000000000..a01e4f7b14
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-privatename-identifier-initializer-alt.js
@@ -0,0 +1,104 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-privatename-identifier-initializer-alt.case
+// - src/class-elements/productions/cls-decl-new-sc-line-method.template
+/*---
+description: Valid PrivateName (field definitions followed by a method in a new line with a semicolon)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ #$ = 1; #_ = 1; #\u{6F} = 1; #℘ = 1; #ZW_‌_NJ = 1; #ZW_‍_J = 1;
+ m() { return 42; }
+ $() {
+ return this.#$;
+ }
+ _() {
+ return this.#_;
+ }
+ \u{6F}() {
+ return this.#\u{6F};
+ }
+ ℘() {
+ return this.#℘;
+ }
+ ZW_‌_NJ() {
+ return this.#ZW_‌_NJ;
+ }
+ ZW_‍_J() {
+ return this.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(), 1);
+assert.sameValue(c._(), 1);
+assert.sameValue(c.\u{6F}(), 1);
+assert.sameValue(c.℘(), 1);
+assert.sameValue(c.ZW_‌_NJ(), 1);
+assert.sameValue(c.ZW_‍_J(), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-privatename-identifier-initializer.js b/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-privatename-identifier-initializer.js
new file mode 100644
index 0000000000..5fe94107f8
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-privatename-identifier-initializer.js
@@ -0,0 +1,104 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-privatename-identifier-initializer.case
+// - src/class-elements/productions/cls-decl-new-sc-line-method.template
+/*---
+description: Valid PrivateName (field definitions followed by a method in a new line with a semicolon)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ #$ = 1; #_ = 1; #\u{6F} = 1; #\u2118 = 1; #ZW_\u200C_NJ = 1; #ZW_\u200D_J = 1;
+ m() { return 42; }
+ $() {
+ return this.#$;
+ }
+ _() {
+ return this.#_;
+ }
+ \u{6F}() {
+ return this.#\u{6F};
+ }
+ \u2118() {
+ return this.#\u2118;
+ }
+ ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ;
+ }
+ ZW_\u200D_J() {
+ return this.#ZW_\u200D_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(), 1);
+assert.sameValue(c._(), 1);
+assert.sameValue(c.\u{6F}(), 1);
+assert.sameValue(c.\u2118(), 1);
+assert.sameValue(c.ZW_\u200C_NJ(), 1);
+assert.sameValue(c.ZW_\u200D_J(), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-privatename-identifier.js
new file mode 100644
index 0000000000..01c917154e
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-privatename-identifier.js
@@ -0,0 +1,110 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-new-sc-line-method.template
+/*---
+description: Valid PrivateName (field definitions followed by a method in a new line with a semicolon)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ #$; #_; #\u{6F}; #\u2118; #ZW_\u200C_NJ; #ZW_\u200D_J;
+ m() { return 42; }
+ $(value) {
+ this.#$ = value;
+ return this.#$;
+ }
+ _(value) {
+ this.#_ = value;
+ return this.#_;
+ }
+ \u{6F}(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F};
+ }
+ \u2118(value) {
+ this.#\u2118 = value;
+ return this.#\u2118;
+ }
+ ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ = value;
+ return this.#ZW_\u200C_NJ;
+ }
+ ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J = value;
+ return this.#ZW_\u200D_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.\u2118(1), 1);
+assert.sameValue(c.ZW_\u200C_NJ(1), 1);
+assert.sameValue(c.ZW_\u200D_J(1), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-static-async-generator-method-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-static-async-generator-method-privatename-identifier-alt.js
new file mode 100644
index 0000000000..5ad352be49
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-static-async-generator-method-privatename-identifier-alt.js
@@ -0,0 +1,135 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-async-generator-method-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-new-sc-line-method.template
+/*---
+description: Valid Static AsyncGeneratorMethod PrivateName (field definitions followed by a method in a new line with a semicolon)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static async * #$(value) {
+ yield * await value;
+ }
+ static async * #_(value) {
+ yield * await value;
+ }
+ static async * #o(value) {
+ yield * await value;
+ }
+ static async * #℘(value) {
+ yield * await value;
+ }
+ static async * #ZW_‌_NJ(value) {
+ yield * await value;
+ }
+ static async * #ZW_‍_J(value) {
+ yield * await value;
+ };
+ m() { return 42; }
+ static get $() {
+ return this.#$;
+ }
+ static get _() {
+ return this.#_;
+ }
+ static get o() {
+ return this.#o;
+ }
+ static get ℘() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#℘;
+ }
+ static get ZW_‌_NJ() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‌_NJ;
+ }
+ static get ZW_‍_J() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‍_J;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+Promise.all([
+ C.$([1]).next(),
+ C._([1]).next(),
+ C.o([1]).next(),
+ C.℘([1]).next(), // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.ZW_‌_NJ([1]).next(), // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.ZW_‍_J([1]).next(), // DO NOT CHANGE THE NAME OF THIS FIELD
+]).then(results => {
+
+ assert.sameValue(results[0].value, 1);
+ assert.sameValue(results[1].value, 1);
+ assert.sameValue(results[2].value, 1);
+ assert.sameValue(results[3].value, 1);
+ assert.sameValue(results[4].value, 1);
+ assert.sameValue(results[5].value, 1);
+
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-static-async-generator-method-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-static-async-generator-method-privatename-identifier.js
new file mode 100644
index 0000000000..13bf7cefb5
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-static-async-generator-method-privatename-identifier.js
@@ -0,0 +1,136 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-async-generator-method-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-new-sc-line-method.template
+/*---
+description: Valid Static AsyncGeneratorMethod PrivateName (field definitions followed by a method in a new line with a semicolon)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static async * #$(value) {
+ yield * await value;
+ }
+ static async * #_(value) {
+ yield * await value;
+ }
+ static async * #\u{6F}(value) {
+ yield * await value;
+ }
+ static async * #\u2118(value) {
+ yield * await value;
+ }
+ static async * #ZW_\u200C_NJ(value) {
+ yield * await value;
+ }
+ static async * #ZW_\u200D_J(value) {
+ yield * await value;
+ };
+ m() { return 42; }
+ static get $() {
+ return this.#$;
+ }
+ static get _() {
+ return this.#_;
+ }
+ static get \u{6F}() {
+ return this.#\u{6F};
+ }
+ static get \u2118() {
+ return this.#\u2118;
+ }
+ static get ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ;
+ }
+ static get ZW_\u200D_J() {
+ return this.#ZW_\u200D_J;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+Promise.all([
+ C.$([1]).next(),
+ C._([1]).next(),
+ C.\u{6F}([1]).next(),
+ C.\u2118([1]).next(),
+ C.ZW_\u200C_NJ([1]).next(),
+ C.ZW_\u200D_J([1]).next(),
+]).then(results => {
+
+ assert.sameValue(results[0].value, 1);
+ assert.sameValue(results[1].value, 1);
+ assert.sameValue(results[2].value, 1);
+ assert.sameValue(results[3].value, 1);
+ assert.sameValue(results[4].value, 1);
+ assert.sameValue(results[5].value, 1);
+
+}).then($DONE, $DONE);
+
diff --git a/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-static-async-method-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-static-async-method-privatename-identifier-alt.js
new file mode 100644
index 0000000000..4ddcf3c8c1
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-static-async-method-privatename-identifier-alt.js
@@ -0,0 +1,135 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-async-method-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-new-sc-line-method.template
+/*---
+description: Valid Static AsyncMethod PrivateName (field definitions followed by a method in a new line with a semicolon)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ AsyncMethod
+
+ AsyncMethod :
+ async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static async #$(value) {
+ return await value;
+ }
+ static async #_(value) {
+ return await value;
+ }
+ static async #o(value) {
+ return await value;
+ }
+ static async #℘(value) {
+ return await value;
+ }
+ static async #ZW_‌_NJ(value) {
+ return await value;
+ }
+ static async #ZW_‍_J(value) {
+ return await value;
+ };
+ m() { return 42; }
+ static async $(value) {
+ return await this.#$(value);
+ }
+ static async _(value) {
+ return await this.#_(value);
+ }
+ static async o(value) {
+ return await this.#o(value);
+ }
+ static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return await this.#℘(value);
+ }
+ static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return await this.#ZW_‌_NJ(value);
+ }
+ static async ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return await this.#ZW_‍_J(value);
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+Promise.all([
+ C.$(1),
+ C._(1),
+ C.o(1),
+ C.℘(1), // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.ZW_‌_NJ(1), // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.ZW_‍_J(1), // DO NOT CHANGE THE NAME OF THIS FIELD
+]).then(results => {
+
+ assert.sameValue(results[0], 1);
+ assert.sameValue(results[1], 1);
+ assert.sameValue(results[2], 1);
+ assert.sameValue(results[3], 1);
+ assert.sameValue(results[4], 1);
+ assert.sameValue(results[5], 1);
+
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-static-async-method-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-static-async-method-privatename-identifier.js
new file mode 100644
index 0000000000..85de245b7f
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-static-async-method-privatename-identifier.js
@@ -0,0 +1,136 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-async-method-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-new-sc-line-method.template
+/*---
+description: Valid Static AsyncMethod PrivateName (field definitions followed by a method in a new line with a semicolon)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ AsyncMethod
+
+ AsyncMethod :
+ async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static async #$(value) {
+ return await value;
+ }
+ static async #_(value) {
+ return await value;
+ }
+ static async #\u{6F}(value) {
+ return await value;
+ }
+ static async #\u2118(value) {
+ return await value;
+ }
+ static async #ZW_\u200C_NJ(value) {
+ return await value;
+ }
+ static async #ZW_\u200D_J(value) {
+ return await value;
+ };
+ m() { return 42; }
+ static async $(value) {
+ return await this.#$(value);
+ }
+ static async _(value) {
+ return await this.#_(value);
+ }
+ static async \u{6F}(value) {
+ return await this.#\u{6F}(value);
+ }
+ static async \u2118(value) {
+ return await this.#\u2118(value);
+ }
+ static async ZW_\u200C_NJ(value) {
+ return await this.#ZW_\u200C_NJ(value);
+ }
+ static async ZW_\u200D_J(value) {
+ return await this.#ZW_\u200D_J(value);
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+Promise.all([
+ C.$(1),
+ C._(1),
+ C.\u{6F}(1),
+ C.\u2118(1),
+ C.ZW_\u200C_NJ(1),
+ C.ZW_\u200D_J(1),
+]).then(results => {
+
+ assert.sameValue(results[0], 1);
+ assert.sameValue(results[1], 1);
+ assert.sameValue(results[2], 1);
+ assert.sameValue(results[3], 1);
+ assert.sameValue(results[4], 1);
+ assert.sameValue(results[5], 1);
+
+}).then($DONE, $DONE);
+
diff --git a/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-static-generator-method-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-static-generator-method-privatename-identifier-alt.js
new file mode 100644
index 0000000000..78a95feb85
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-static-generator-method-privatename-identifier-alt.js
@@ -0,0 +1,125 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-generator-method-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-new-sc-line-method.template
+/*---
+description: Valid Static GeneratorMethod PrivateName (field definitions followed by a method in a new line with a semicolon)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ GeneratorMethod
+
+ GeneratorMethod :
+ * ClassElementName ( UniqueFormalParameters ){ GeneratorBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static * #$(value) {
+ yield * value;
+ }
+ static * #_(value) {
+ yield * value;
+ }
+ static * #o(value) {
+ yield * value;
+ }
+ static * #℘(value) {
+ yield * value;
+ }
+ static * #ZW_‌_NJ(value) {
+ yield * value;
+ }
+ static * #ZW_‍_J(value) {
+ yield * value;
+ };
+ m() { return 42; }
+ static get $() {
+ return this.#$;
+ }
+ static get _() {
+ return this.#_;
+ }
+ static get o() {
+ return this.#o;
+ }
+ static get ℘() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#℘;
+ }
+ static get ZW_‌_NJ() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‌_NJ;
+ }
+ static get ZW_‍_J() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‍_J;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$([1]).next().value, 1);
+assert.sameValue(C._([1]).next().value, 1);
+assert.sameValue(C.o([1]).next().value, 1);
+assert.sameValue(C.℘([1]).next().value, 1);
+assert.sameValue(C.ZW_‌_NJ([1]).next().value, 1);
+assert.sameValue(C.ZW_‍_J([1]).next().value, 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-static-generator-method-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-static-generator-method-privatename-identifier.js
new file mode 100644
index 0000000000..82b2ec6d18
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-static-generator-method-privatename-identifier.js
@@ -0,0 +1,126 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-generator-method-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-new-sc-line-method.template
+/*---
+description: Valid Static GeneratorMethod PrivateName (field definitions followed by a method in a new line with a semicolon)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ GeneratorMethod
+
+ GeneratorMethod :
+ * ClassElementName ( UniqueFormalParameters ){ GeneratorBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static * #$(value) {
+ yield * value;
+ }
+ static * #_(value) {
+ yield * value;
+ }
+ static * #\u{6F}(value) {
+ yield * value;
+ }
+ static * #\u2118(value) {
+ yield * value;
+ }
+ static * #ZW_\u200C_NJ(value) {
+ yield * value;
+ }
+ static * #ZW_\u200D_J(value) {
+ yield * value;
+ };
+ m() { return 42; }
+ static get $() {
+ return this.#$;
+ }
+ static get _() {
+ return this.#_;
+ }
+ static get \u{6F}() {
+ return this.#\u{6F};
+ }
+ static get \u2118() {
+ return this.#\u2118;
+ }
+ static get ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ;
+ }
+ static get ZW_\u200D_J() {
+ return this.#ZW_\u200D_J;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$([1]).next().value, 1);
+assert.sameValue(C._([1]).next().value, 1);
+assert.sameValue(C.\u{6F}([1]).next().value, 1);
+assert.sameValue(C.\u2118([1]).next().value, 1);
+assert.sameValue(C.ZW_\u200C_NJ([1]).next().value, 1);
+assert.sameValue(C.ZW_\u200D_J([1]).next().value, 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-static-method-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-static-method-privatename-identifier-alt.js
new file mode 100644
index 0000000000..35b209fff2
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-static-method-privatename-identifier-alt.js
@@ -0,0 +1,123 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-method-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-new-sc-line-method.template
+/*---
+description: Valid Static Method PrivateName (field definitions followed by a method in a new line with a semicolon)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ ClassElementName ( UniqueFormalParameters ){ FunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static #$(value) {
+ return value;
+ }
+ static #_(value) {
+ return value;
+ }
+ static #o(value) {
+ return value;
+ }
+ static #℘(value) {
+ return value;
+ }
+ static #ZW_‌_NJ(value) {
+ return value;
+ }
+ static #ZW_‍_J(value) {
+ return value;
+ };
+ m() { return 42; }
+ static $(value) {
+ return this.#$(value);
+ }
+ static _(value) {
+ return this.#_(value);
+ }
+ static o(value) {
+ return this.#o(value);
+ }
+ static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#℘(value);
+ }
+ static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‌_NJ(value);
+ }
+ static ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‍_J(value);
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(1), 1);
+assert.sameValue(C._(1), 1);
+assert.sameValue(C.o(1), 1);
+assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+assert.sameValue(C.ZW_‌_NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+assert.sameValue(C.ZW_‍_J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-static-method-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-static-method-privatename-identifier.js
new file mode 100644
index 0000000000..7fbc907383
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-static-method-privatename-identifier.js
@@ -0,0 +1,123 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-method-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-new-sc-line-method.template
+/*---
+description: Valid Static Method PrivateName (field definitions followed by a method in a new line with a semicolon)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ ClassElementName ( UniqueFormalParameters ){ FunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static #$(value) {
+ return value;
+ }
+ static #_(value) {
+ return value;
+ }
+ static #\u{6F}(value) {
+ return value;
+ }
+ static #\u2118(value) {
+ return value;
+ }
+ static #ZW_\u200C_NJ(value) {
+ return value;
+ }
+ static #ZW_\u200D_J(value) {
+ return value;
+ };
+ m() { return 42; }
+ static $(value) {
+ return this.#$(value);
+ }
+ static _(value) {
+ return this.#_(value);
+ }
+ static \u{6F}(value) {
+ return this.#\u{6F}(value);
+ }
+ static \u2118(value) {
+ return this.#\u2118(value);
+ }
+ static ZW_\u200C_NJ(value) {
+ return this.#ZW_\u200C_NJ(value);
+ }
+ static ZW_\u200D_J(value) {
+ return this.#ZW_\u200D_J(value);
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(1), 1);
+assert.sameValue(C._(1), 1);
+assert.sameValue(C.\u{6F}(1), 1);
+assert.sameValue(C.\u2118(1), 1);
+assert.sameValue(C.ZW_\u200C_NJ(1), 1);
+assert.sameValue(C.ZW_\u200D_J(1), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-static-privatename-identifier-alt-by-classname.js b/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-static-privatename-identifier-alt-by-classname.js
new file mode 100644
index 0000000000..ba19461f26
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-static-privatename-identifier-alt-by-classname.js
@@ -0,0 +1,111 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-alt-by-classname.case
+// - src/class-elements/productions/cls-decl-new-sc-line-method.template
+/*---
+description: Valid Static PrivateName (field definitions followed by a method in a new line with a semicolon)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_‍_J;
+ m() { return 42; }
+ static $(value) {
+ C.#$ = value;
+ return C.#$;
+ }
+ static _(value) {
+ C.#_ = value;
+ return C.#_;
+ }
+ static o(value) {
+ C.#\u{6F} = value;
+ return C.#\u{6F};
+ }
+ static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.#℘ = value;
+ return C.#℘;
+ }
+ static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.#ZW_‌_NJ = value;
+ return C.#ZW_‌_NJ;
+ }
+ static ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.#ZW_‍_J = value;
+ return C.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(1), 1);
+assert.sameValue(C._(1), 1);
+assert.sameValue(C.o(1), 1);
+assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+assert.sameValue(C.ZW_‌_NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+assert.sameValue(C.ZW_‍_J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-static-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-static-privatename-identifier-alt.js
new file mode 100644
index 0000000000..3f64c4b090
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-static-privatename-identifier-alt.js
@@ -0,0 +1,111 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-new-sc-line-method.template
+/*---
+description: Valid Static PrivateName (field definitions followed by a method in a new line with a semicolon)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_‍_J;
+ m() { return 42; }
+ static $(value) {
+ this.#$ = value;
+ return this.#$;
+ }
+ static _(value) {
+ this.#_ = value;
+ return this.#_;
+ }
+ static o(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F};
+ }
+ static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ this.#℘ = value;
+ return this.#℘;
+ }
+ static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ this.#ZW_‌_NJ = value;
+ return this.#ZW_‌_NJ;
+ }
+ static ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ this.#ZW_‍_J = value;
+ return this.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(1), 1);
+assert.sameValue(C._(1), 1);
+assert.sameValue(C.o(1), 1);
+assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+assert.sameValue(C.ZW_‌_NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+assert.sameValue(C.ZW_‍_J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-static-privatename-identifier-by-classname.js b/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-static-privatename-identifier-by-classname.js
new file mode 100644
index 0000000000..6702dff50a
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-static-privatename-identifier-by-classname.js
@@ -0,0 +1,111 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-by-classname.case
+// - src/class-elements/productions/cls-decl-new-sc-line-method.template
+/*---
+description: Valid Static PrivateName (field definitions followed by a method in a new line with a semicolon)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J;
+ m() { return 42; }
+ static $(value) {
+ C.#$ = value;
+ return C.#$;
+ }
+ static _(value) {
+ C.#_ = value;
+ return C.#_;
+ }
+ static \u{6F}(value) {
+ C.#\u{6F} = value;
+ return C.#\u{6F};
+ }
+ static \u2118(value) {
+ C.#\u2118 = value;
+ return C.#\u2118;
+ }
+ static ZW_\u200C_NJ(value) {
+ C.#ZW_\u200C_NJ = value;
+ return C.#ZW_\u200C_NJ;
+ }
+ static ZW_\u200D_J(value) {
+ C.#ZW_\u200D_J = value;
+ return C.#ZW_\u200D_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(1), 1);
+assert.sameValue(C._(1), 1);
+assert.sameValue(C.\u{6F}(1), 1);
+assert.sameValue(C.\u2118(1), 1);
+assert.sameValue(C.ZW_\u200C_NJ(1), 1);
+assert.sameValue(C.ZW_\u200D_J(1), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-static-privatename-identifier-initializer-alt-by-classname.js b/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-static-privatename-identifier-initializer-alt-by-classname.js
new file mode 100644
index 0000000000..45a772c8f2
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-static-privatename-identifier-initializer-alt-by-classname.js
@@ -0,0 +1,105 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-initializer-alt-by-classname.case
+// - src/class-elements/productions/cls-decl-new-sc-line-method.template
+/*---
+description: Valid Static PrivateName (field definitions followed by a method in a new line with a semicolon)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_‍_J = 1;
+ m() { return 42; }
+ static $() {
+ return C.#$;
+ }
+ static _() {
+ return C.#_;
+ }
+ static \u{6F}() {
+ return C.#\u{6F};
+ }
+ static ℘() {
+ return C.#℘;
+ }
+ static ZW_‌_NJ() {
+ return C.#ZW_‌_NJ;
+ }
+ static ZW_‍_J() {
+ return C.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(), 1);
+assert.sameValue(C._(), 1);
+assert.sameValue(C.\u{6F}(), 1);
+assert.sameValue(C.℘(), 1);
+assert.sameValue(C.ZW_‌_NJ(), 1);
+assert.sameValue(C.ZW_‍_J(), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-static-privatename-identifier-initializer-alt.js b/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-static-privatename-identifier-initializer-alt.js
new file mode 100644
index 0000000000..42f363a9cd
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-static-privatename-identifier-initializer-alt.js
@@ -0,0 +1,105 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-initializer-alt.case
+// - src/class-elements/productions/cls-decl-new-sc-line-method.template
+/*---
+description: Valid Static PrivateName (field definitions followed by a method in a new line with a semicolon)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_‍_J = 1;
+ m() { return 42; }
+ static $() {
+ return this.#$;
+ }
+ static _() {
+ return this.#_;
+ }
+ static \u{6F}() {
+ return this.#\u{6F};
+ }
+ static ℘() {
+ return this.#℘;
+ }
+ static ZW_‌_NJ() {
+ return this.#ZW_‌_NJ;
+ }
+ static ZW_‍_J() {
+ return this.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(), 1);
+assert.sameValue(C._(), 1);
+assert.sameValue(C.\u{6F}(), 1);
+assert.sameValue(C.℘(), 1);
+assert.sameValue(C.ZW_‌_NJ(), 1);
+assert.sameValue(C.ZW_‍_J(), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-static-privatename-identifier-initializer.js b/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-static-privatename-identifier-initializer.js
new file mode 100644
index 0000000000..b5b7b7e340
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-static-privatename-identifier-initializer.js
@@ -0,0 +1,105 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-initializer.case
+// - src/class-elements/productions/cls-decl-new-sc-line-method.template
+/*---
+description: Valid Static PrivateName (field definitions followed by a method in a new line with a semicolon)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #\u2118 = 1; static #ZW_\u200C_NJ = 1; static #ZW_\u200D_J = 1;
+ m() { return 42; }
+ static $() {
+ return this.#$;
+ }
+ static _() {
+ return this.#_;
+ }
+ static \u{6F}() {
+ return this.#\u{6F};
+ }
+ static \u2118() {
+ return this.#\u2118;
+ }
+ static ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ;
+ }
+ static ZW_\u200D_J() {
+ return this.#ZW_\u200D_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(), 1);
+assert.sameValue(C._(), 1);
+assert.sameValue(C.\u{6F}(), 1);
+assert.sameValue(C.\u2118(), 1);
+assert.sameValue(C.ZW_\u200C_NJ(), 1);
+assert.sameValue(C.ZW_\u200D_J(), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-static-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-static-privatename-identifier.js
new file mode 100644
index 0000000000..4c51ca0bd4
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-rs-static-privatename-identifier.js
@@ -0,0 +1,111 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-new-sc-line-method.template
+/*---
+description: Valid Static PrivateName (field definitions followed by a method in a new line with a semicolon)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J;
+ m() { return 42; }
+ static $(value) {
+ this.#$ = value;
+ return this.#$;
+ }
+ static _(value) {
+ this.#_ = value;
+ return this.#_;
+ }
+ static \u{6F}(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F};
+ }
+ static \u2118(value) {
+ this.#\u2118 = value;
+ return this.#\u2118;
+ }
+ static ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ = value;
+ return this.#ZW_\u200C_NJ;
+ }
+ static ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J = value;
+ return this.#ZW_\u200D_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(1), 1);
+assert.sameValue(C._(1), 1);
+assert.sameValue(C.\u{6F}(1), 1);
+assert.sameValue(C.\u2118(1), 1);
+assert.sameValue(C.ZW_\u200C_NJ(1), 1);
+assert.sameValue(C.ZW_\u200D_J(1), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-static-private-fields.js b/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-static-private-fields.js
new file mode 100644
index 0000000000..ecb032989a
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-static-private-fields.js
@@ -0,0 +1,72 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/static-private-fields.case
+// - src/class-elements/productions/cls-decl-new-sc-line-method.template
+/*---
+description: static private fields (field definitions followed by a method in a new line with a semicolon)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ static FieldDefinition ;
+
+ FieldDefinition :
+ ClassElementName Initializer_opt
+
+ ClassElementName :
+ PrivateName
+
+ PrivateName :
+ # IdentifierName
+
+---*/
+
+
+class C {
+ static #x; static #y;
+ m() { return 42; }
+ static x() {
+ this.#x = 42;
+ return this.#x;
+ }
+ static y() {
+ this.#y = 43;
+ return this.#y;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+// Test the private fields do not appear as properties before set to value
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#x"), "test 1");
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 2");
+assert(!Object.prototype.hasOwnProperty.call(c, "#x"), "test 3");
+
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#y"), "test 4");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 5");
+assert(!Object.prototype.hasOwnProperty.call(c, "#y"), "test 6");
+
+// Test if private fields can be sucessfully accessed and set to value
+assert.sameValue(C.x(), 42, "test 7");
+assert.sameValue(C.y(), 43, "test 8");
+
+// Test the private fields do not appear as properties before after set to value
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 9");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 10");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-static-private-methods-with-fields.js b/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-static-private-methods-with-fields.js
new file mode 100644
index 0000000000..fa2cf48168
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-static-private-methods-with-fields.js
@@ -0,0 +1,89 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/static-private-methods-with-fields.case
+// - src/class-elements/productions/cls-decl-new-sc-line-method.template
+/*---
+description: static private methods with fields (field definitions followed by a method in a new line with a semicolon)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class-static-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ static FieldDefinition ;
+
+ FieldDefinition :
+ ClassElementName Initializer_opt
+
+ ClassElementName :
+ PrivateName
+
+ PrivateName :
+ # IdentifierName
+
+---*/
+
+
+class C {
+ static #xVal; static #yVal;
+ m() { return 42; }
+ static #x(value) {
+ this.#xVal = value;
+ return this.#xVal;
+ }
+ static #y(value) {
+ this.#yVal = value;
+ return this.#yVal;
+ }
+ static x() {
+ return this.#x(42);
+ }
+ static y() {
+ return this.#y(43);
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+// Test the private methods do not appear as properties before set to value
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#x"), "test 1");
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 2");
+assert(!Object.prototype.hasOwnProperty.call(c, "#x"), "test 3");
+
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#y"), "test 4");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 5");
+assert(!Object.prototype.hasOwnProperty.call(c, "#y"), "test 6");
+
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#xVal"), "test 7");
+assert(!Object.prototype.hasOwnProperty.call(C, "#xVal"), "test 8");
+assert(!Object.prototype.hasOwnProperty.call(c, "#xVal"), "test 9");
+
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#yVal"), "test 10");
+assert(!Object.prototype.hasOwnProperty.call(C, "#yVal"), "test 11");
+assert(!Object.prototype.hasOwnProperty.call(c, "#yVal"), "test 12");
+
+// Test if private fields can be sucessfully accessed and set to value
+assert.sameValue(C.x(), 42, "test 13");
+assert.sameValue(C.y(), 43, "test 14");
+
+// Test the private fields do not appear as properties before after set to value
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 15");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 16");
+
+assert(!Object.prototype.hasOwnProperty.call(C, "#xVal"), "test 17");
+assert(!Object.prototype.hasOwnProperty.call(C, "#yVal"), "test 18");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-static-private-methods.js b/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-static-private-methods.js
new file mode 100644
index 0000000000..160950265f
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-static-private-methods.js
@@ -0,0 +1,76 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/static-private-methods.case
+// - src/class-elements/productions/cls-decl-new-sc-line-method.template
+/*---
+description: static private methods (field definitions followed by a method in a new line with a semicolon)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ static FieldDefinition ;
+
+ FieldDefinition :
+ ClassElementName Initializer_opt
+
+ ClassElementName :
+ PrivateName
+
+ PrivateName :
+ # IdentifierName
+
+---*/
+
+
+class C {
+ ;
+ m() { return 42; }
+ static #x(value) {
+ return value / 2;
+ }
+ static #y(value) {
+ return value * 2;
+ }
+ static x() {
+ return this.#x(84);
+ }
+ static y() {
+ return this.#y(43);
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+// Test the private methods do not appear as properties before set to value
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#x"), "test 1");
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 2");
+assert(!Object.prototype.hasOwnProperty.call(c, "#x"), "test 3");
+
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#y"), "test 4");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 5");
+assert(!Object.prototype.hasOwnProperty.call(c, "#y"), "test 6");
+
+// Test if private fields can be sucessfully accessed and set to value
+assert.sameValue(C.x(), 42, "test 7");
+assert.sameValue(C.y(), 86, "test 8");
+
+// Test the private fields do not appear as properties before after set to value
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 9");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 10");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-string-literal-names.js b/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-string-literal-names.js
new file mode 100644
index 0000000000..09c7a06843
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/new-sc-line-method-string-literal-names.js
@@ -0,0 +1,110 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/string-literal-names.case
+// - src/class-elements/productions/cls-decl-new-sc-line-method.template
+/*---
+description: String literal names (field definitions followed by a method in a new line with a semicolon)
+esid: prod-FieldDefinition
+features: [class-fields-public, class]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement:
+ ...
+ FieldDefinition ;
+
+ FieldDefinition:
+ ClassElementName Initializer_opt
+
+ ClassElementName:
+ PropertyName
+
+---*/
+
+
+class C {
+ 'a'; "b"; 'c' = 39;
+ "d" = 42;
+ m() { return 42; }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "a"),
+ "a does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "a"),
+ "a does not appear as an own property on C constructor"
+);
+
+verifyProperty(c, "a", {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "b"),
+ "b does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "b"),
+ "b does not appear as an own property on C constructor"
+);
+
+verifyProperty(c, "b", {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "c"),
+ "c does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "c"),
+ "c does not appear as an own property on C constructor"
+);
+
+verifyProperty(c, "c", {
+ value: 39,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "d"),
+ "d does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "d"),
+ "d does not appear as an own property on C constructor"
+);
+
+verifyProperty(c, "d", {
+ value: 42,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-accessor-is-visible-in-computed-properties.js b/js/src/tests/test262/language/statements/class/elements/private-accessor-is-visible-in-computed-properties.js
new file mode 100644
index 0000000000..0084349ef3
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-accessor-is-visible-in-computed-properties.js
@@ -0,0 +1,34 @@
+// Copyright (C) 2019 Caio Lima (Igalia SL). All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: Private getter of a class is visible in its ComputetProperty scope
+esid: prod-ClassTail
+info: |
+ ClassTail : ClassHeritage { ClassBody }
+ 1. Let lex be the LexicalEnvironment of the running execution context.
+ 2. Let classScope be NewDeclarativeEnvironment(lex).
+ 3. Let classScopeEnvRec be classScope's EnvironmentRecord.
+ ...
+ 15. Set the running execution context's LexicalEnvironment to classScope.
+ 16. Set the running execution context's PrivateEnvironment to classPrivateEnvironment.
+ ...
+ 27. For each ClassElement e in order from elements
+ a. If IsStatic of e is false, then
+ i. Let field be the result of ClassElementEvaluation for e with arguments proto and false.
+ ...
+features: [class-methods-private, class-fields-public, class]
+---*/
+
+assert.throws(TypeError, function() {
+ class C {
+ get #f() {
+ throw new Test262Error();
+ }
+
+ [this.#f] = 'Test262';
+ }
+}, 'access to a private acessor from ordinary object');
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-accessor-name/browser.js b/js/src/tests/test262/language/statements/class/elements/private-accessor-name/browser.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-accessor-name/browser.js
diff --git a/js/src/tests/test262/language/statements/class/elements/private-accessor-name/inst-private-escape-sequence-ZWJ.js b/js/src/tests/test262/language/statements/class/elements/private-accessor-name/inst-private-escape-sequence-ZWJ.js
new file mode 100644
index 0000000000..ac75d7fc59
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-accessor-name/inst-private-escape-sequence-ZWJ.js
@@ -0,0 +1,80 @@
+// This file was procedurally generated from the following sources:
+// - src/accessor-names/private-escape-sequence-ZWJ.case
+// - src/accessor-names/private/cls-private-decl-inst.template
+/*---
+description: Private IdentifierName - ZWJ (Class declaration, private instance method)
+features: [class, class-methods-private]
+flags: [generated]
+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".
+
+---*/
+
+var stringSet;
+
+class C {
+ get #ZW_\u200D_J() { return 'get string'; }
+ set #ZW_\u200D_J(param) { stringSet = param; }
+
+ getPrivateReference() {
+ return this.#ZW_‍_J;
+ }
+
+ setPrivateReference(value) {
+ this.#ZW_‍_J = value;
+ }
+};
+
+var inst = new C();
+
+assert.sameValue(inst.getPrivateReference(), 'get string');
+
+inst.setPrivateReference('set string');
+assert.sameValue(stringSet, 'set string');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-accessor-name/inst-private-escape-sequence-ZWNJ.js b/js/src/tests/test262/language/statements/class/elements/private-accessor-name/inst-private-escape-sequence-ZWNJ.js
new file mode 100644
index 0000000000..d99e759d6d
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-accessor-name/inst-private-escape-sequence-ZWNJ.js
@@ -0,0 +1,80 @@
+// This file was procedurally generated from the following sources:
+// - src/accessor-names/private-escape-sequence-ZWNJ.case
+// - src/accessor-names/private/cls-private-decl-inst.template
+/*---
+description: Private IdentifierName - ZWNJ (Class declaration, private instance method)
+features: [class, class-methods-private]
+flags: [generated]
+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".
+
+---*/
+
+var stringSet;
+
+class C {
+ get #ZW_\u200C_NJ() { return 'get string'; }
+ set #ZW_\u200C_NJ(param) { stringSet = param; }
+
+ getPrivateReference() {
+ return this.#ZW_‌_NJ;
+ }
+
+ setPrivateReference(value) {
+ this.#ZW_‌_NJ = value;
+ }
+};
+
+var inst = new C();
+
+assert.sameValue(inst.getPrivateReference(), 'get string');
+
+inst.setPrivateReference('set string');
+assert.sameValue(stringSet, 'set string');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-accessor-name/inst-private-escape-sequence-u2118.js b/js/src/tests/test262/language/statements/class/elements/private-accessor-name/inst-private-escape-sequence-u2118.js
new file mode 100644
index 0000000000..c9470c32e0
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-accessor-name/inst-private-escape-sequence-u2118.js
@@ -0,0 +1,80 @@
+// This file was procedurally generated from the following sources:
+// - src/accessor-names/private-escape-sequence-u2118.case
+// - src/accessor-names/private/cls-private-decl-inst.template
+/*---
+description: Private IdentifierName - u2118 (℘) (Class declaration, private instance method)
+features: [class, class-methods-private]
+flags: [generated]
+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".
+
+---*/
+
+var stringSet;
+
+class C {
+ get #\u2118() { return 'get string'; }
+ set #\u2118(param) { stringSet = param; }
+
+ getPrivateReference() {
+ return this.#℘;
+ }
+
+ setPrivateReference(value) {
+ this.#℘ = value;
+ }
+};
+
+var inst = new C();
+
+assert.sameValue(inst.getPrivateReference(), 'get string');
+
+inst.setPrivateReference('set string');
+assert.sameValue(stringSet, 'set string');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-accessor-name/inst-private-escape-sequence-u6F.js b/js/src/tests/test262/language/statements/class/elements/private-accessor-name/inst-private-escape-sequence-u6F.js
new file mode 100644
index 0000000000..7bd39f4bb0
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-accessor-name/inst-private-escape-sequence-u6F.js
@@ -0,0 +1,80 @@
+// This file was procedurally generated from the following sources:
+// - src/accessor-names/private-escape-sequence-u6F.case
+// - src/accessor-names/private/cls-private-decl-inst.template
+/*---
+description: Private IdentifierName - u6F (o) (Class declaration, private instance method)
+features: [class, class-methods-private]
+flags: [generated]
+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".
+
+---*/
+
+var stringSet;
+
+class C {
+ get #\u{6F}() { return 'get string'; }
+ set #\u{6F}(param) { stringSet = param; }
+
+ getPrivateReference() {
+ return this.#o;
+ }
+
+ setPrivateReference(value) {
+ this.#o = value;
+ }
+};
+
+var inst = new C();
+
+assert.sameValue(inst.getPrivateReference(), 'get string');
+
+inst.setPrivateReference('set string');
+assert.sameValue(stringSet, 'set string');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-accessor-name/inst-private-name-ZWJ.js b/js/src/tests/test262/language/statements/class/elements/private-accessor-name/inst-private-name-ZWJ.js
new file mode 100644
index 0000000000..5c8ebeaef5
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-accessor-name/inst-private-name-ZWJ.js
@@ -0,0 +1,80 @@
+// This file was procedurally generated from the following sources:
+// - src/accessor-names/private-name-ZWJ.case
+// - src/accessor-names/private/cls-private-decl-inst.template
+/*---
+description: Private IdentifierName - ZWJ (Class declaration, private instance method)
+features: [class, class-methods-private]
+flags: [generated]
+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".
+
+---*/
+
+var stringSet;
+
+class C {
+ get #ZW_‍_J() { return 'get string'; }
+ set #ZW_‍_J(param) { stringSet = param; }
+
+ getPrivateReference() {
+ return this.#ZW_‍_J;
+ }
+
+ setPrivateReference(value) {
+ this.#ZW_‍_J = value;
+ }
+};
+
+var inst = new C();
+
+assert.sameValue(inst.getPrivateReference(), 'get string');
+
+inst.setPrivateReference('set string');
+assert.sameValue(stringSet, 'set string');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-accessor-name/inst-private-name-ZWNJ.js b/js/src/tests/test262/language/statements/class/elements/private-accessor-name/inst-private-name-ZWNJ.js
new file mode 100644
index 0000000000..85a6a43601
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-accessor-name/inst-private-name-ZWNJ.js
@@ -0,0 +1,80 @@
+// This file was procedurally generated from the following sources:
+// - src/accessor-names/private-name-ZWNJ.case
+// - src/accessor-names/private/cls-private-decl-inst.template
+/*---
+description: Private IdentifierName - ZWNJ (Class declaration, private instance method)
+features: [class, class-methods-private]
+flags: [generated]
+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".
+
+---*/
+
+var stringSet;
+
+class C {
+ get #ZW_‌_NJ() { return 'get string'; }
+ set #ZW_‌_NJ(param) { stringSet = param; }
+
+ getPrivateReference() {
+ return this.#ZW_‌_NJ;
+ }
+
+ setPrivateReference(value) {
+ this.#ZW_‌_NJ = value;
+ }
+};
+
+var inst = new C();
+
+assert.sameValue(inst.getPrivateReference(), 'get string');
+
+inst.setPrivateReference('set string');
+assert.sameValue(stringSet, 'set string');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-accessor-name/inst-private-name-common.js b/js/src/tests/test262/language/statements/class/elements/private-accessor-name/inst-private-name-common.js
new file mode 100644
index 0000000000..70756ae6ff
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-accessor-name/inst-private-name-common.js
@@ -0,0 +1,80 @@
+// This file was procedurally generated from the following sources:
+// - src/accessor-names/private-name-common.case
+// - src/accessor-names/private/cls-private-decl-inst.template
+/*---
+description: Private IdentifierName - common (Class declaration, private instance method)
+features: [class, class-methods-private]
+flags: [generated]
+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".
+
+---*/
+
+var stringSet;
+
+class C {
+ get #test262() { return 'get string'; }
+ set #test262(param) { stringSet = param; }
+
+ getPrivateReference() {
+ return this.#test262;
+ }
+
+ setPrivateReference(value) {
+ this.#test262 = value;
+ }
+};
+
+var inst = new C();
+
+assert.sameValue(inst.getPrivateReference(), 'get string');
+
+inst.setPrivateReference('set string');
+assert.sameValue(stringSet, 'set string');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-accessor-name/inst-private-name-dollar.js b/js/src/tests/test262/language/statements/class/elements/private-accessor-name/inst-private-name-dollar.js
new file mode 100644
index 0000000000..e151c45262
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-accessor-name/inst-private-name-dollar.js
@@ -0,0 +1,80 @@
+// This file was procedurally generated from the following sources:
+// - src/accessor-names/private-name-dollar.case
+// - src/accessor-names/private/cls-private-decl-inst.template
+/*---
+description: Private IdentifierName - $ (Class declaration, private instance method)
+features: [class, class-methods-private]
+flags: [generated]
+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".
+
+---*/
+
+var stringSet;
+
+class C {
+ get #$() { return 'get string'; }
+ set #$(param) { stringSet = param; }
+
+ getPrivateReference() {
+ return this.#$;
+ }
+
+ setPrivateReference(value) {
+ this.#$ = value;
+ }
+};
+
+var inst = new C();
+
+assert.sameValue(inst.getPrivateReference(), 'get string');
+
+inst.setPrivateReference('set string');
+assert.sameValue(stringSet, 'set string');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-accessor-name/inst-private-name-u2118.js b/js/src/tests/test262/language/statements/class/elements/private-accessor-name/inst-private-name-u2118.js
new file mode 100644
index 0000000000..9e000f3a63
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-accessor-name/inst-private-name-u2118.js
@@ -0,0 +1,80 @@
+// This file was procedurally generated from the following sources:
+// - src/accessor-names/private-name-u2118.case
+// - src/accessor-names/private/cls-private-decl-inst.template
+/*---
+description: Private IdentifierName - ℘ (Class declaration, private instance method)
+features: [class, class-methods-private]
+flags: [generated]
+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".
+
+---*/
+
+var stringSet;
+
+class C {
+ get #℘() { return 'get string'; }
+ set #℘(param) { stringSet = param; }
+
+ getPrivateReference() {
+ return this.#℘;
+ }
+
+ setPrivateReference(value) {
+ this.#℘ = value;
+ }
+};
+
+var inst = new C();
+
+assert.sameValue(inst.getPrivateReference(), 'get string');
+
+inst.setPrivateReference('set string');
+assert.sameValue(stringSet, 'set string');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-accessor-name/inst-private-name-underscore.js b/js/src/tests/test262/language/statements/class/elements/private-accessor-name/inst-private-name-underscore.js
new file mode 100644
index 0000000000..febea21fec
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-accessor-name/inst-private-name-underscore.js
@@ -0,0 +1,80 @@
+// This file was procedurally generated from the following sources:
+// - src/accessor-names/private-name-underscore.case
+// - src/accessor-names/private/cls-private-decl-inst.template
+/*---
+description: Private IdentifierName - _ (Class declaration, private instance method)
+features: [class, class-methods-private]
+flags: [generated]
+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".
+
+---*/
+
+var stringSet;
+
+class C {
+ get #_() { return 'get string'; }
+ set #_(param) { stringSet = param; }
+
+ getPrivateReference() {
+ return this.#_;
+ }
+
+ setPrivateReference(value) {
+ this.#_ = value;
+ }
+};
+
+var inst = new C();
+
+assert.sameValue(inst.getPrivateReference(), 'get string');
+
+inst.setPrivateReference('set string');
+assert.sameValue(stringSet, 'set string');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-accessor-name/shell.js b/js/src/tests/test262/language/statements/class/elements/private-accessor-name/shell.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-accessor-name/shell.js
diff --git a/js/src/tests/test262/language/statements/class/elements/private-accessor-name/static-private-escape-sequence-ZWJ.js b/js/src/tests/test262/language/statements/class/elements/private-accessor-name/static-private-escape-sequence-ZWJ.js
new file mode 100644
index 0000000000..351eb7f5b4
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-accessor-name/static-private-escape-sequence-ZWJ.js
@@ -0,0 +1,79 @@
+// This file was procedurally generated from the following sources:
+// - src/accessor-names/private-escape-sequence-ZWJ.case
+// - src/accessor-names/private/cls-private-decl-static.template
+/*---
+description: Private IdentifierName - ZWJ (Class declaration, static method)
+features: [class, class-static-methods-private]
+flags: [generated]
+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".
+
+---*/
+
+var stringSet;
+
+class C {
+ static get #ZW_\u200D_J() { return 'get string'; }
+ static set #ZW_\u200D_J(param) { stringSet = param; }
+
+ static getPrivateReference() {
+ return this.#ZW_‍_J;
+ }
+
+ static setPrivateReference(value) {
+ this.#ZW_‍_J = value;
+ }
+}
+
+assert.sameValue(C.getPrivateReference(), 'get string');
+
+C.setPrivateReference('set string');
+assert.sameValue(stringSet, 'set string');
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-accessor-name/static-private-escape-sequence-ZWNJ.js b/js/src/tests/test262/language/statements/class/elements/private-accessor-name/static-private-escape-sequence-ZWNJ.js
new file mode 100644
index 0000000000..05ea4118f2
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-accessor-name/static-private-escape-sequence-ZWNJ.js
@@ -0,0 +1,79 @@
+// This file was procedurally generated from the following sources:
+// - src/accessor-names/private-escape-sequence-ZWNJ.case
+// - src/accessor-names/private/cls-private-decl-static.template
+/*---
+description: Private IdentifierName - ZWNJ (Class declaration, static method)
+features: [class, class-static-methods-private]
+flags: [generated]
+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".
+
+---*/
+
+var stringSet;
+
+class C {
+ static get #ZW_\u200C_NJ() { return 'get string'; }
+ static set #ZW_\u200C_NJ(param) { stringSet = param; }
+
+ static getPrivateReference() {
+ return this.#ZW_‌_NJ;
+ }
+
+ static setPrivateReference(value) {
+ this.#ZW_‌_NJ = value;
+ }
+}
+
+assert.sameValue(C.getPrivateReference(), 'get string');
+
+C.setPrivateReference('set string');
+assert.sameValue(stringSet, 'set string');
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-accessor-name/static-private-escape-sequence-u2118.js b/js/src/tests/test262/language/statements/class/elements/private-accessor-name/static-private-escape-sequence-u2118.js
new file mode 100644
index 0000000000..554a6a1034
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-accessor-name/static-private-escape-sequence-u2118.js
@@ -0,0 +1,79 @@
+// This file was procedurally generated from the following sources:
+// - src/accessor-names/private-escape-sequence-u2118.case
+// - src/accessor-names/private/cls-private-decl-static.template
+/*---
+description: Private IdentifierName - u2118 (℘) (Class declaration, static method)
+features: [class, class-static-methods-private]
+flags: [generated]
+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".
+
+---*/
+
+var stringSet;
+
+class C {
+ static get #\u2118() { return 'get string'; }
+ static set #\u2118(param) { stringSet = param; }
+
+ static getPrivateReference() {
+ return this.#℘;
+ }
+
+ static setPrivateReference(value) {
+ this.#℘ = value;
+ }
+}
+
+assert.sameValue(C.getPrivateReference(), 'get string');
+
+C.setPrivateReference('set string');
+assert.sameValue(stringSet, 'set string');
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-accessor-name/static-private-escape-sequence-u6F.js b/js/src/tests/test262/language/statements/class/elements/private-accessor-name/static-private-escape-sequence-u6F.js
new file mode 100644
index 0000000000..1420f0d547
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-accessor-name/static-private-escape-sequence-u6F.js
@@ -0,0 +1,79 @@
+// This file was procedurally generated from the following sources:
+// - src/accessor-names/private-escape-sequence-u6F.case
+// - src/accessor-names/private/cls-private-decl-static.template
+/*---
+description: Private IdentifierName - u6F (o) (Class declaration, static method)
+features: [class, class-static-methods-private]
+flags: [generated]
+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".
+
+---*/
+
+var stringSet;
+
+class C {
+ static get #\u{6F}() { return 'get string'; }
+ static set #\u{6F}(param) { stringSet = param; }
+
+ static getPrivateReference() {
+ return this.#o;
+ }
+
+ static setPrivateReference(value) {
+ this.#o = value;
+ }
+}
+
+assert.sameValue(C.getPrivateReference(), 'get string');
+
+C.setPrivateReference('set string');
+assert.sameValue(stringSet, 'set string');
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-accessor-name/static-private-name-ZWJ.js b/js/src/tests/test262/language/statements/class/elements/private-accessor-name/static-private-name-ZWJ.js
new file mode 100644
index 0000000000..fa0d3b1a6a
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-accessor-name/static-private-name-ZWJ.js
@@ -0,0 +1,79 @@
+// This file was procedurally generated from the following sources:
+// - src/accessor-names/private-name-ZWJ.case
+// - src/accessor-names/private/cls-private-decl-static.template
+/*---
+description: Private IdentifierName - ZWJ (Class declaration, static method)
+features: [class, class-static-methods-private]
+flags: [generated]
+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".
+
+---*/
+
+var stringSet;
+
+class C {
+ static get #ZW_‍_J() { return 'get string'; }
+ static set #ZW_‍_J(param) { stringSet = param; }
+
+ static getPrivateReference() {
+ return this.#ZW_‍_J;
+ }
+
+ static setPrivateReference(value) {
+ this.#ZW_‍_J = value;
+ }
+}
+
+assert.sameValue(C.getPrivateReference(), 'get string');
+
+C.setPrivateReference('set string');
+assert.sameValue(stringSet, 'set string');
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-accessor-name/static-private-name-ZWNJ.js b/js/src/tests/test262/language/statements/class/elements/private-accessor-name/static-private-name-ZWNJ.js
new file mode 100644
index 0000000000..15fc7dbbd8
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-accessor-name/static-private-name-ZWNJ.js
@@ -0,0 +1,79 @@
+// This file was procedurally generated from the following sources:
+// - src/accessor-names/private-name-ZWNJ.case
+// - src/accessor-names/private/cls-private-decl-static.template
+/*---
+description: Private IdentifierName - ZWNJ (Class declaration, static method)
+features: [class, class-static-methods-private]
+flags: [generated]
+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".
+
+---*/
+
+var stringSet;
+
+class C {
+ static get #ZW_‌_NJ() { return 'get string'; }
+ static set #ZW_‌_NJ(param) { stringSet = param; }
+
+ static getPrivateReference() {
+ return this.#ZW_‌_NJ;
+ }
+
+ static setPrivateReference(value) {
+ this.#ZW_‌_NJ = value;
+ }
+}
+
+assert.sameValue(C.getPrivateReference(), 'get string');
+
+C.setPrivateReference('set string');
+assert.sameValue(stringSet, 'set string');
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-accessor-name/static-private-name-common.js b/js/src/tests/test262/language/statements/class/elements/private-accessor-name/static-private-name-common.js
new file mode 100644
index 0000000000..ddc98e5e34
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-accessor-name/static-private-name-common.js
@@ -0,0 +1,79 @@
+// This file was procedurally generated from the following sources:
+// - src/accessor-names/private-name-common.case
+// - src/accessor-names/private/cls-private-decl-static.template
+/*---
+description: Private IdentifierName - common (Class declaration, static method)
+features: [class, class-static-methods-private]
+flags: [generated]
+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".
+
+---*/
+
+var stringSet;
+
+class C {
+ static get #test262() { return 'get string'; }
+ static set #test262(param) { stringSet = param; }
+
+ static getPrivateReference() {
+ return this.#test262;
+ }
+
+ static setPrivateReference(value) {
+ this.#test262 = value;
+ }
+}
+
+assert.sameValue(C.getPrivateReference(), 'get string');
+
+C.setPrivateReference('set string');
+assert.sameValue(stringSet, 'set string');
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-accessor-name/static-private-name-dollar.js b/js/src/tests/test262/language/statements/class/elements/private-accessor-name/static-private-name-dollar.js
new file mode 100644
index 0000000000..a71d3733a5
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-accessor-name/static-private-name-dollar.js
@@ -0,0 +1,79 @@
+// This file was procedurally generated from the following sources:
+// - src/accessor-names/private-name-dollar.case
+// - src/accessor-names/private/cls-private-decl-static.template
+/*---
+description: Private IdentifierName - $ (Class declaration, static method)
+features: [class, class-static-methods-private]
+flags: [generated]
+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".
+
+---*/
+
+var stringSet;
+
+class C {
+ static get #$() { return 'get string'; }
+ static set #$(param) { stringSet = param; }
+
+ static getPrivateReference() {
+ return this.#$;
+ }
+
+ static setPrivateReference(value) {
+ this.#$ = value;
+ }
+}
+
+assert.sameValue(C.getPrivateReference(), 'get string');
+
+C.setPrivateReference('set string');
+assert.sameValue(stringSet, 'set string');
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-accessor-name/static-private-name-u2118.js b/js/src/tests/test262/language/statements/class/elements/private-accessor-name/static-private-name-u2118.js
new file mode 100644
index 0000000000..914573983b
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-accessor-name/static-private-name-u2118.js
@@ -0,0 +1,79 @@
+// This file was procedurally generated from the following sources:
+// - src/accessor-names/private-name-u2118.case
+// - src/accessor-names/private/cls-private-decl-static.template
+/*---
+description: Private IdentifierName - ℘ (Class declaration, static method)
+features: [class, class-static-methods-private]
+flags: [generated]
+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".
+
+---*/
+
+var stringSet;
+
+class C {
+ static get #℘() { return 'get string'; }
+ static set #℘(param) { stringSet = param; }
+
+ static getPrivateReference() {
+ return this.#℘;
+ }
+
+ static setPrivateReference(value) {
+ this.#℘ = value;
+ }
+}
+
+assert.sameValue(C.getPrivateReference(), 'get string');
+
+C.setPrivateReference('set string');
+assert.sameValue(stringSet, 'set string');
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-accessor-name/static-private-name-underscore.js b/js/src/tests/test262/language/statements/class/elements/private-accessor-name/static-private-name-underscore.js
new file mode 100644
index 0000000000..7356830d4f
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-accessor-name/static-private-name-underscore.js
@@ -0,0 +1,79 @@
+// This file was procedurally generated from the following sources:
+// - src/accessor-names/private-name-underscore.case
+// - src/accessor-names/private/cls-private-decl-static.template
+/*---
+description: Private IdentifierName - _ (Class declaration, static method)
+features: [class, class-static-methods-private]
+flags: [generated]
+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".
+
+---*/
+
+var stringSet;
+
+class C {
+ static get #_() { return 'get string'; }
+ static set #_(param) { stringSet = param; }
+
+ static getPrivateReference() {
+ return this.#_;
+ }
+
+ static setPrivateReference(value) {
+ this.#_ = value;
+ }
+}
+
+assert.sameValue(C.getPrivateReference(), 'get string');
+
+C.setPrivateReference('set string');
+assert.sameValue(stringSet, 'set string');
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-arrow-fnc-init-err-contains-arguments.js b/js/src/tests/test262/language/statements/class/elements/private-arrow-fnc-init-err-contains-arguments.js
new file mode 100644
index 0000000000..651ce6c2e3
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-arrow-fnc-init-err-contains-arguments.js
@@ -0,0 +1,36 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/init-err-contains-arguments.case
+// - src/class-elements/initializer-error/cls-decl-fields-private-arrow-fnc.template
+/*---
+description: Syntax error if `arguments` used in class field (private field, arrow function expression)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-public, arrow-function, class-fields-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ FieldDefinition:
+ PropertyNameInitializeropt
+
+ - It is a Syntax Error if ContainsArguments of Initializer is true.
+
+ Static Semantics: ContainsArguments
+ IdentifierReference : Identifier
+
+ 1. If the StringValue of Identifier is "arguments", return true.
+ ...
+ For all other grammatical productions, recurse on all nonterminals. If any piece returns true, then return true. Otherwise return false.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x = () => arguments;
+}
+
diff --git a/js/src/tests/test262/language/statements/class/elements/private-arrow-fnc-init-err-contains-super.js b/js/src/tests/test262/language/statements/class/elements/private-arrow-fnc-init-err-contains-super.js
new file mode 100644
index 0000000000..63e05382c6
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-arrow-fnc-init-err-contains-super.js
@@ -0,0 +1,29 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/init-err-contains-super.case
+// - src/class-elements/initializer-error/cls-decl-fields-private-arrow-fnc.template
+/*---
+description: Syntax error if `super()` used in class field (private field, arrow function expression)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-public, arrow-function, class-fields-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ FieldDefinition:
+ PropertyNameInitializeropt
+
+ - It is a Syntax Error if Initializer is present and Initializer Contains SuperCall is true.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x = () => super();
+}
+
diff --git a/js/src/tests/test262/language/statements/class/elements/private-async-generator-method-name.js b/js/src/tests/test262/language/statements/class/elements/private-async-generator-method-name.js
new file mode 100644
index 0000000000..6d631f0d72
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-async-generator-method-name.js
@@ -0,0 +1,61 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-async-generator-method-name.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: Private async generators methods have name property properly configured (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-methods-private, class]
+flags: [generated]
+info: |
+ Updated Productions
+
+ ClassElement : MethodDefinition
+ 1. Return ClassElementEvaluation of MethodDefinition with arguments ! Get(homeObject, "prototype"),enumerable, and "prototype".
+
+ ClassElement : MethodDefinition
+ ClassElement : static MethodDefinition
+ 1. Perform ? PropertyDefinitionEvaluation with parameters object and enumerable.
+ 2. Return empty.
+
+ AsyncMethod : async [no LineTerminator here] * ClassElementName (UniqueFormalParameters) { AsyncFunctionBody }
+ 1. Let propKey be the result of evaluating ClassElementName.
+ ...
+ 12. Perform ? DefineOrdinaryMethod(key, homeObject, closure, enumerable).
+
+ ClassElementName : PrivateIdentifier
+ 1. Let bindingName be StringValue of PrivateIdentifier.
+ ...
+ 5. If scopeEnvRec's binding for bindingName is uninitialized,
+ a. Let field be NewPrivateName(bindingName).
+ b. Perform ! scopeEnvRec.InitializeBinding(bindingName, field).
+ 6. Otherwise,
+ a. Let field be scopeEnvRec.GetBindingValue(bindingName).
+ 7. Assert: field.[[Description]] is bindingName.
+ 8. Return field.
+
+ DefineOrdinaryMethod(key, homeObject, closure, enumerable)
+ 1. Perform SetFunctionName(closure, key).
+ 2. If key is a Private Name,
+ a. Assert: key does not have a [[Kind]] field.
+ b. Set key.[[Kind]] to "method".
+ c. Set key.[[Value]] to closure.
+ d. Set key.[[Brand]] to homeObject.
+ 3. Else,
+ a. Let desc be the PropertyDescriptor{[[Value]]: closure, [[Writable]]: true, [[Enumerable]]: enumerable, [[Configurable]]: true}.
+ b. Perform ? DefinePropertyOrThrow(homeObject, key, desc).
+
+---*/
+
+
+class C {
+ async * #method() {};
+
+ getPrivateMethod() {
+ return this.#method;
+ }
+}
+
+let c = new C();
+assert.sameValue(c.getPrivateMethod().name, "#method");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-async-method-name.js b/js/src/tests/test262/language/statements/class/elements/private-async-method-name.js
new file mode 100644
index 0000000000..f7318e2cea
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-async-method-name.js
@@ -0,0 +1,61 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-async-method-name.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: Private async methods have name property properly configured (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-methods-private, class]
+flags: [generated]
+info: |
+ Updated Productions
+
+ ClassElement : MethodDefinition
+ 1. Return ClassElementEvaluation of MethodDefinition with arguments ! Get(homeObject, "prototype"),enumerable, and "prototype".
+
+ ClassElement : MethodDefinition
+ ClassElement : static MethodDefinition
+ 1. Perform ? PropertyDefinitionEvaluation with parameters object and enumerable.
+ 2. Return empty.
+
+ AsyncMethod : async [no LineTerminator here] ClassElementName (UniqueFormalParameters) { AsyncFunctionBody }
+ 1. Let propKey be the result of evaluating ClassElementName.
+ ...
+ 10. Perform ? DefineOrdinaryMethod(key, homeObject, closure, enumerable).
+
+ ClassElementName : PrivateIdentifier
+ 1. Let bindingName be StringValue of PrivateIdentifier.
+ ...
+ 5. If scopeEnvRec's binding for bindingName is uninitialized,
+ a. Let field be NewPrivateName(bindingName).
+ b. Perform ! scopeEnvRec.InitializeBinding(bindingName, field).
+ 6. Otherwise,
+ a. Let field be scopeEnvRec.GetBindingValue(bindingName).
+ 7. Assert: field.[[Description]] is bindingName.
+ 8. Return field.
+
+ DefineOrdinaryMethod(key, homeObject, closure, enumerable)
+ 1. Perform SetFunctionName(closure, key).
+ 2. If key is a Private Name,
+ a. Assert: key does not have a [[Kind]] field.
+ b. Set key.[[Kind]] to "method".
+ c. Set key.[[Value]] to closure.
+ d. Set key.[[Brand]] to homeObject.
+ 3. Else,
+ a. Let desc be the PropertyDescriptor{[[Value]]: closure, [[Writable]]: true, [[Enumerable]]: enumerable, [[Configurable]]: true}.
+ b. Perform ? DefinePropertyOrThrow(homeObject, key, desc).
+
+---*/
+
+
+class C {
+ async #method() {};
+
+ getPrivateMethod() {
+ return this.#method;
+ }
+}
+
+let c = new C();
+assert.sameValue(c.getPrivateMethod().name, "#method");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-class-field-on-frozen-objects-strict.js b/js/src/tests/test262/language/statements/class/elements/private-class-field-on-frozen-objects-strict.js
new file mode 100644
index 0000000000..8c90bfdd31
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-class-field-on-frozen-objects-strict.js
@@ -0,0 +1,34 @@
+'use strict';
+// Copyright (C) 2019 Caio Lima. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: It is possible to add private fields on frozen objects
+esid: sec-define-field
+info: |
+ DefineField(receiver, fieldRecord)
+ ...
+ 8. If fieldName is a Private Name,
+ a. Perform ? PrivateFieldAdd(fieldName, receiver, initValue).
+ 9. Else,
+ a. Assert: IsPropertyKey(fieldName) is true.
+ b. Perform ? CreateDataPropertyOrThrow(receiver, fieldName, initValue).
+ 10. Return.
+features: [class, class-fields-private, class-fields-public]
+flags: [onlyStrict]
+---*/
+
+class Test {
+ f = this;
+ #g = (Object.freeze(this), "Test262");
+
+ get g() {
+ return this.#g;
+ }
+}
+
+let t = new Test();
+assert.sameValue(t.f, t);
+assert.sameValue(t.g, "Test262");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-derived-cls-direct-eval-contains-superproperty-1.js b/js/src/tests/test262/language/statements/class/elements/private-derived-cls-direct-eval-contains-superproperty-1.js
new file mode 100644
index 0000000000..b7a7ecf1b1
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-derived-cls-direct-eval-contains-superproperty-1.js
@@ -0,0 +1,36 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/eval-contains-superproperty-1.case
+// - src/class-elements/initializer-eval-super-property/cls-decl-private-fields-eval.template
+/*---
+description: super.x in StatementList of eval (direct eval)
+esid: sec-performeval-rules-in-initializer
+features: [class, class-fields-public, class-fields-private]
+flags: [generated]
+info: |
+ Additional Early Error Rules for Eval Inside Initializer
+ These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer.
+ ScriptBody : StatementList
+
+ ...
+ The remaining eval rules apply as outside a constructor, inside a method, and inside a function.
+
+ Additional Early Error Rules for Eval Outside Methods
+ These static semantics are applied by PerformEval when a direct eval call occurs outside of a MethodDefinition.
+ ScriptBody : StatementList
+
+ It is a Syntax Error if StatementList Contains SuperProperty.
+
+---*/
+
+
+var executed = false;
+class A {}
+class C extends A {
+ #x = eval('executed = true; super.x;');
+}
+
+new C();
+
+assert.sameValue(executed, true);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-derived-cls-direct-eval-contains-superproperty-2.js b/js/src/tests/test262/language/statements/class/elements/private-derived-cls-direct-eval-contains-superproperty-2.js
new file mode 100644
index 0000000000..ba434a3f39
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-derived-cls-direct-eval-contains-superproperty-2.js
@@ -0,0 +1,33 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/eval-contains-superproperty-2.case
+// - src/class-elements/initializer-eval-super-property/cls-decl-private-fields-eval.template
+/*---
+description: super['x'] in StatementList of eval (direct eval)
+esid: sec-performeval-rules-in-initializer
+features: [class, class-fields-public, class-fields-private]
+flags: [generated]
+info: |
+ The remaining eval rules apply as outside a constructor, inside a method, and inside a function.
+
+ Additional Early Error Rules for Eval Outside Methods
+
+ These static semantics are applied by PerformEval when a direct eval call occurs outside of a MethodDefinition.
+
+ ScriptBody : StatementList
+
+ It is a Syntax Error if StatementList Contains SuperProperty.
+
+---*/
+
+
+var executed = false;
+class A {}
+class C extends A {
+ #x = eval('executed = true; super["x"];');
+}
+
+new C();
+
+assert.sameValue(executed, true);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-derived-cls-direct-eval-err-contains-supercall-1.js b/js/src/tests/test262/language/statements/class/elements/private-derived-cls-direct-eval-err-contains-supercall-1.js
new file mode 100644
index 0000000000..5a6449746f
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-derived-cls-direct-eval-err-contains-supercall-1.js
@@ -0,0 +1,38 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/eval-err-contains-supercall-1.case
+// - src/class-elements/initializer-eval-super-call/cls-decl-private-fields-eval.template
+/*---
+description: error if `super()['x']` in StatementList of eval (direct eval)
+esid: sec-performeval-rules-in-initializer
+features: [class, class-fields-public, class-fields-private]
+flags: [generated]
+info: |
+ Additional Early Error Rules for Eval Inside Initializer
+ These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer.
+ ScriptBody : StatementList
+
+ ...
+ The remaining eval rules apply as outside a constructor, inside a method, and inside a function.
+
+ Additional Early Error Rules for Eval Outside Constructor Methods
+ These static semantics are applied by PerformEval when a direct eval call occurs outside of the constructor method of a ClassDeclaration or ClassExpression.
+ ScriptBody : StatementList
+
+ It is a Syntax Error if StatementList Contains SuperCall.
+
+---*/
+
+
+var executed = false;
+class A {}
+class C extends A {
+ #x = eval('executed = true; super()["x"];');
+}
+
+assert.throws(SyntaxError, function() {
+ new C();
+});
+
+assert.sameValue(executed, false);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-derived-cls-direct-eval-err-contains-supercall-2.js b/js/src/tests/test262/language/statements/class/elements/private-derived-cls-direct-eval-err-contains-supercall-2.js
new file mode 100644
index 0000000000..31b908edd1
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-derived-cls-direct-eval-err-contains-supercall-2.js
@@ -0,0 +1,31 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/eval-err-contains-supercall-2.case
+// - src/class-elements/initializer-eval-super-call/cls-decl-private-fields-eval.template
+/*---
+description: error if `super().x` in StatementList of eval (direct eval)
+esid: sec-performeval-rules-in-initializer
+features: [class, class-fields-public, class-fields-private]
+flags: [generated]
+info: |
+ Additional Early Error Rules for Eval Outside Constructor Methods
+ These static semantics are applied by PerformEval when a direct eval call occurs outside of the constructor method of a ClassDeclaration or ClassExpression.
+ ScriptBody : StatementList
+
+ It is a Syntax Error if StatementList Contains SuperCall.
+
+---*/
+
+
+var executed = false;
+class A {}
+class C extends A {
+ #x = eval('executed = true; super().x;');
+}
+
+assert.throws(SyntaxError, function() {
+ new C();
+});
+
+assert.sameValue(executed, false);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-derived-cls-direct-eval-err-contains-supercall.js b/js/src/tests/test262/language/statements/class/elements/private-derived-cls-direct-eval-err-contains-supercall.js
new file mode 100644
index 0000000000..e565f03a28
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-derived-cls-direct-eval-err-contains-supercall.js
@@ -0,0 +1,38 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/eval-err-contains-supercall.case
+// - src/class-elements/initializer-eval-super-call/cls-decl-private-fields-eval.template
+/*---
+description: error if `super()` in StatementList of eval (direct eval)
+esid: sec-performeval-rules-in-initializer
+features: [class, class-fields-public, class-fields-private]
+flags: [generated]
+info: |
+ Additional Early Error Rules for Eval Inside Initializer
+ These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer.
+ ScriptBody : StatementList
+
+ ...
+ The remaining eval rules apply as outside a constructor, inside a method, and inside a function.
+
+ Additional Early Error Rules for Eval Outside Constructor Methods
+ These static semantics are applied by PerformEval when a direct eval call occurs outside of the constructor method of a ClassDeclaration or ClassExpression.
+ ScriptBody : StatementList
+
+ It is a Syntax Error if StatementList Contains SuperCall.
+
+---*/
+
+
+var executed = false;
+class A {}
+class C extends A {
+ #x = eval('executed = true; super();');
+}
+
+assert.throws(SyntaxError, function() {
+ new C();
+});
+
+assert.sameValue(executed, false);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-derived-cls-indirect-eval-contains-superproperty-1.js b/js/src/tests/test262/language/statements/class/elements/private-derived-cls-indirect-eval-contains-superproperty-1.js
new file mode 100644
index 0000000000..2d40dd1074
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-derived-cls-indirect-eval-contains-superproperty-1.js
@@ -0,0 +1,38 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/eval-contains-superproperty-1.case
+// - src/class-elements/initializer-eval-super-property/cls-decl-private-fields-indirect-eval.template
+/*---
+description: super.x in StatementList of eval (indirect eval)
+esid: sec-performeval-rules-in-initializer
+features: [class, class-fields-public, class-fields-private]
+flags: [generated]
+info: |
+ Additional Early Error Rules for Eval Inside Initializer
+ These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer.
+ ScriptBody : StatementList
+
+ ...
+ The remaining eval rules apply as outside a constructor, inside a method, and inside a function.
+
+ Additional Early Error Rules for Eval Outside Methods
+ These static semantics are applied by PerformEval when a direct eval call occurs outside of a MethodDefinition.
+ ScriptBody : StatementList
+
+ It is a Syntax Error if StatementList Contains SuperProperty.
+
+---*/
+
+
+var executed = false;
+class A {}
+class C extends A {
+ #x = (0, eval)('executed = true; super.x;');
+}
+
+assert.throws(SyntaxError, function() {
+ new C();
+});
+
+assert.sameValue(executed, false);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-derived-cls-indirect-eval-contains-superproperty-2.js b/js/src/tests/test262/language/statements/class/elements/private-derived-cls-indirect-eval-contains-superproperty-2.js
new file mode 100644
index 0000000000..f8a3a172f0
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-derived-cls-indirect-eval-contains-superproperty-2.js
@@ -0,0 +1,35 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/eval-contains-superproperty-2.case
+// - src/class-elements/initializer-eval-super-property/cls-decl-private-fields-indirect-eval.template
+/*---
+description: super['x'] in StatementList of eval (indirect eval)
+esid: sec-performeval-rules-in-initializer
+features: [class, class-fields-public, class-fields-private]
+flags: [generated]
+info: |
+ The remaining eval rules apply as outside a constructor, inside a method, and inside a function.
+
+ Additional Early Error Rules for Eval Outside Methods
+
+ These static semantics are applied by PerformEval when a direct eval call occurs outside of a MethodDefinition.
+
+ ScriptBody : StatementList
+
+ It is a Syntax Error if StatementList Contains SuperProperty.
+
+---*/
+
+
+var executed = false;
+class A {}
+class C extends A {
+ #x = (0, eval)('executed = true; super["x"];');
+}
+
+assert.throws(SyntaxError, function() {
+ new C();
+});
+
+assert.sameValue(executed, false);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-derived-cls-indirect-eval-err-contains-supercall-1.js b/js/src/tests/test262/language/statements/class/elements/private-derived-cls-indirect-eval-err-contains-supercall-1.js
new file mode 100644
index 0000000000..531cb1436b
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-derived-cls-indirect-eval-err-contains-supercall-1.js
@@ -0,0 +1,38 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/eval-err-contains-supercall-1.case
+// - src/class-elements/initializer-eval-super-call/cls-decl-private-fields-indirect-eval.template
+/*---
+description: error if `super()['x']` in StatementList of eval (indirect eval)
+esid: sec-performeval-rules-in-initializer
+features: [class, class-fields-public, class-fields-private]
+flags: [generated]
+info: |
+ Additional Early Error Rules for Eval Inside Initializer
+ These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer.
+ ScriptBody : StatementList
+
+ ...
+ The remaining eval rules apply as outside a constructor, inside a method, and inside a function.
+
+ Additional Early Error Rules for Eval Outside Constructor Methods
+ These static semantics are applied by PerformEval when a direct eval call occurs outside of the constructor method of a ClassDeclaration or ClassExpression.
+ ScriptBody : StatementList
+
+ It is a Syntax Error if StatementList Contains SuperCall.
+
+---*/
+
+
+var executed = false;
+class A {}
+class C extends A {
+ #x = (0, eval)('executed = true; super()["x"];');
+}
+
+assert.throws(SyntaxError, function() {
+ new C();
+});
+
+assert.sameValue(executed, false);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-derived-cls-indirect-eval-err-contains-supercall-2.js b/js/src/tests/test262/language/statements/class/elements/private-derived-cls-indirect-eval-err-contains-supercall-2.js
new file mode 100644
index 0000000000..1f2393a9c7
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-derived-cls-indirect-eval-err-contains-supercall-2.js
@@ -0,0 +1,31 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/eval-err-contains-supercall-2.case
+// - src/class-elements/initializer-eval-super-call/cls-decl-private-fields-indirect-eval.template
+/*---
+description: error if `super().x` in StatementList of eval (indirect eval)
+esid: sec-performeval-rules-in-initializer
+features: [class, class-fields-public, class-fields-private]
+flags: [generated]
+info: |
+ Additional Early Error Rules for Eval Outside Constructor Methods
+ These static semantics are applied by PerformEval when a direct eval call occurs outside of the constructor method of a ClassDeclaration or ClassExpression.
+ ScriptBody : StatementList
+
+ It is a Syntax Error if StatementList Contains SuperCall.
+
+---*/
+
+
+var executed = false;
+class A {}
+class C extends A {
+ #x = (0, eval)('executed = true; super().x;');
+}
+
+assert.throws(SyntaxError, function() {
+ new C();
+});
+
+assert.sameValue(executed, false);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-derived-cls-indirect-eval-err-contains-supercall.js b/js/src/tests/test262/language/statements/class/elements/private-derived-cls-indirect-eval-err-contains-supercall.js
new file mode 100644
index 0000000000..b034236fee
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-derived-cls-indirect-eval-err-contains-supercall.js
@@ -0,0 +1,38 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/eval-err-contains-supercall.case
+// - src/class-elements/initializer-eval-super-call/cls-decl-private-fields-indirect-eval.template
+/*---
+description: error if `super()` in StatementList of eval (indirect eval)
+esid: sec-performeval-rules-in-initializer
+features: [class, class-fields-public, class-fields-private]
+flags: [generated]
+info: |
+ Additional Early Error Rules for Eval Inside Initializer
+ These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer.
+ ScriptBody : StatementList
+
+ ...
+ The remaining eval rules apply as outside a constructor, inside a method, and inside a function.
+
+ Additional Early Error Rules for Eval Outside Constructor Methods
+ These static semantics are applied by PerformEval when a direct eval call occurs outside of the constructor method of a ClassDeclaration or ClassExpression.
+ ScriptBody : StatementList
+
+ It is a Syntax Error if StatementList Contains SuperCall.
+
+---*/
+
+
+var executed = false;
+class A {}
+class C extends A {
+ #x = (0, eval)('executed = true; super();');
+}
+
+assert.throws(SyntaxError, function() {
+ new C();
+});
+
+assert.sameValue(executed, false);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-direct-eval-err-contains-arguments.js b/js/src/tests/test262/language/statements/class/elements/private-direct-eval-err-contains-arguments.js
new file mode 100644
index 0000000000..1e10f34afd
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-direct-eval-err-contains-arguments.js
@@ -0,0 +1,38 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/eval-err-contains-arguments.case
+// - src/class-elements/initializer-direct-eval-arguments/cls-decl-private-fields-eval.template
+/*---
+description: error if `arguments` in StatementList of eval (direct eval)
+esid: sec-performeval-rules-in-initializer
+features: [class, class-fields-public, class-fields-private]
+flags: [generated]
+info: |
+ Additional Early Error Rules for Eval Inside Initializer
+ These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer.
+ ScriptBody : StatementList
+
+ It is a Syntax Error if ContainsArguments of StatementList is true.
+ ...
+
+ Static Semantics: ContainsArguments
+ IdentifierReference : Identifier
+
+ 1. If the StringValue of Identifier is "arguments", return true.
+ ...
+ For all other grammatical productions, recurse on all nonterminals. If any piece returns true, then return true. Otherwise return false.
+
+---*/
+
+
+var executed = false;
+class C {
+ #x = eval('executed = true; arguments;');
+}
+
+assert.throws(SyntaxError, function() {
+ new C();
+});
+
+assert.sameValue(executed, false);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-direct-eval-err-contains-newtarget.js b/js/src/tests/test262/language/statements/class/elements/private-direct-eval-err-contains-newtarget.js
new file mode 100644
index 0000000000..296e3c82f4
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-direct-eval-err-contains-newtarget.js
@@ -0,0 +1,36 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/eval-err-contains-newtarget.case
+// - src/class-elements/initializer-eval-newtarget/cls-decl-private-fields-eval.template
+/*---
+description: error if `new.target` in StatementList of eval (direct eval)
+esid: sec-performeval-rules-in-initializer
+features: [class, new.target, class-fields-private]
+flags: [generated]
+info: |
+ Additional Early Error Rules for Eval Inside Initializer
+ These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer.
+ ScriptBody : StatementList
+
+ ...
+ The remaining eval rules apply as outside a constructor, inside a method, and inside a function.
+
+ Additional Early Error Rules for Eval Outside Functions
+ These static semantics are applied by PerformEval when a direct eval call occurs outside of any function.
+ ScriptBody : StatementList
+
+ It is a Syntax Error if StatementList Contains NewTarget.
+
+---*/
+
+
+var executed = false;
+class C {
+ #x = eval('executed = true; new.target;');
+}
+
+var c = new C();
+
+assert.sameValue(executed, true);
+assert.sameValue(c.x, undefined);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-field-access-on-inner-arrow-function.js b/js/src/tests/test262/language/statements/class/elements/private-field-access-on-inner-arrow-function.js
new file mode 100644
index 0000000000..15051fcb92
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-field-access-on-inner-arrow-function.js
@@ -0,0 +1,43 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-field-access-on-inner-arrow-function.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: PrivateName of private field is visible on inner arrow function of class scope (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-fields-private, class]
+flags: [generated]
+info: |
+ Updated Productions
+
+ CallExpression[Yield, Await]:
+ CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+ SuperCall[?Yield, ?Await]
+ CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+ CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+ CallExpression[?Yield, ?Await].IdentifierName
+ CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+ CallExpression[?Yield, ?Await].PrivateName
+
+---*/
+
+
+class C {
+ #f = 'Test262';
+
+ method() {
+ let arrowFunction = () => {
+ return this.#f;
+ }
+
+ return arrowFunction();
+ }
+}
+
+let c = new C();
+assert.sameValue(c.method(), 'Test262');
+let o = {};
+assert.throws(TypeError, function() {
+ c.method.call(o);
+}, 'accessed private field from an ordinary object');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-field-access-on-inner-function.js b/js/src/tests/test262/language/statements/class/elements/private-field-access-on-inner-function.js
new file mode 100644
index 0000000000..e2d3d663ee
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-field-access-on-inner-function.js
@@ -0,0 +1,44 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-field-access-on-inner-function.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: PrivateName of private field is visible on inner function of class scope (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-fields-private, class]
+flags: [generated]
+info: |
+ Updated Productions
+
+ CallExpression[Yield, Await]:
+ CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+ SuperCall[?Yield, ?Await]
+ CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+ CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+ CallExpression[?Yield, ?Await].IdentifierName
+ CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+ CallExpression[?Yield, ?Await].PrivateName
+
+---*/
+
+
+class C {
+ #f = 'Test262';
+
+ method() {
+ let self = this;
+ function innerFunction() {
+ return self.#f;
+ }
+
+ return innerFunction();
+ }
+}
+
+let c = new C();
+assert.sameValue(c.method(), 'Test262');
+let o = {};
+assert.throws(TypeError, function() {
+ c.method.call(o);
+}, 'accessed private field from an ordinary object');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-field-after-optional-chain.js b/js/src/tests/test262/language/statements/class/elements/private-field-after-optional-chain.js
new file mode 100644
index 0000000000..9ed4c44f1b
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-field-after-optional-chain.js
@@ -0,0 +1,46 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-field-after-optional-chain.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: OptionalChain.PrivateIdentifier is a valid syntax (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-fields-private, optional-chaining, class]
+flags: [generated]
+info: |
+ Updated Productions
+
+ OptionalChain[Yield, Await] :
+ `?.` `[` Expression[+In, ?Yield, ?Await] `]`
+ `?.` IdentifierName
+ `?.` Arguments[?Yield, ?Await]
+ `?.` TemplateLiteral[?Yield, ?Await, +Tagged]
+ OptionalChain[?Yield, ?Await] `[` Expression[+In, ?Yield, ?Await] `]`
+ OptionalChain[?Yield, ?Await] `.` IdentifierName
+ OptionalChain[?Yield, ?Await] Arguments[?Yield, ?Await]
+ OptionalChain[?Yield, ?Await] TemplateLiteral[?Yield, ?Await, +Tagged]
+ OptionalChain[?Yield, ?Await] `.` PrivateIdentifier
+
+---*/
+
+
+class C {
+ #f = 'Test262';
+
+ method(o) {
+ return o?.c.#f;
+ }
+}
+
+let c = new C();
+let o = {c: c};
+assert.sameValue(c.method(o), 'Test262');
+
+assert.sameValue(c.method(null), undefined);
+assert.sameValue(c.method(undefined), undefined);
+
+o = {c: new Object()};
+assert.throws(TypeError, function() {
+ c.method(o);
+}, 'accessed private field from an ordinary object');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-field-as-arrow-function.js b/js/src/tests/test262/language/statements/class/elements/private-field-as-arrow-function.js
new file mode 100644
index 0000000000..85e3f2c133
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-field-as-arrow-function.js
@@ -0,0 +1,35 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-field-as-arrow-function.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: Calling arrow function returned from private field access (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-fields-private, arrow-function, class]
+flags: [generated]
+info: |
+ Updated Productions
+
+ CallExpression[Yield, Await]:
+ CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+ SuperCall[?Yield, ?Await]
+ CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+ CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+ CallExpression[?Yield, ?Await].IdentifierName
+ CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+ CallExpression[?Yield, ?Await].PrivateName
+
+---*/
+
+
+class C {
+ #m = () => 'test262';
+
+ method() {
+ return this.#m();
+ }
+}
+
+let c = new C();
+assert.sameValue(c.method(), 'test262');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-field-as-async-arrow-function.js b/js/src/tests/test262/language/statements/class/elements/private-field-as-async-arrow-function.js
new file mode 100644
index 0000000000..1adaa1c557
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-field-as-async-arrow-function.js
@@ -0,0 +1,37 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-field-as-async-arrow-function.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: Calling async arrow function returned from private field access (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-fields-private, async-functions, arrow-function, class]
+flags: [generated, async]
+info: |
+ Updated Productions
+
+ CallExpression[Yield, Await]:
+ CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+ SuperCall[?Yield, ?Await]
+ CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+ CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+ CallExpression[?Yield, ?Await].IdentifierName
+ CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+ CallExpression[?Yield, ?Await].PrivateName
+
+---*/
+
+
+class C {
+ #m = async () => 'test262';
+
+ method() {
+ return this.#m();
+ }
+}
+
+let c = new C();
+
+c.method().then((value) => assert.sameValue(value, 'test262'))
+ .then($DONE, $DONE);
+
diff --git a/js/src/tests/test262/language/statements/class/elements/private-field-as-async-function.js b/js/src/tests/test262/language/statements/class/elements/private-field-as-async-function.js
new file mode 100644
index 0000000000..80d08d209b
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-field-as-async-function.js
@@ -0,0 +1,37 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-field-as-async-function.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: Calling async function returned from private field access (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-fields-private, async-functions, class]
+flags: [generated, async]
+info: |
+ Updated Productions
+
+ CallExpression[Yield, Await]:
+ CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+ SuperCall[?Yield, ?Await]
+ CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+ CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+ CallExpression[?Yield, ?Await].IdentifierName
+ CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+ CallExpression[?Yield, ?Await].PrivateName
+
+---*/
+
+
+class C {
+ #m = async function() { return 'test262'; };
+
+ method() {
+ return this.#m();
+ }
+}
+
+let c = new C();
+
+c.method().then((value) => assert.sameValue(value, 'test262'))
+ .then($DONE, $DONE);
+
diff --git a/js/src/tests/test262/language/statements/class/elements/private-field-as-function.js b/js/src/tests/test262/language/statements/class/elements/private-field-as-function.js
new file mode 100644
index 0000000000..e710d58eb3
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-field-as-function.js
@@ -0,0 +1,35 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-field-as-function.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: Calling result returned from private field access (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-fields-private, class]
+flags: [generated]
+info: |
+ Updated Productions
+
+ CallExpression[Yield, Await]:
+ CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+ SuperCall[?Yield, ?Await]
+ CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+ CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+ CallExpression[?Yield, ?Await].IdentifierName
+ CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+ CallExpression[?Yield, ?Await].PrivateName
+
+---*/
+
+
+class C {
+ #m = function () { return 'test262'; };
+
+ method() {
+ return this.#m();
+ }
+}
+
+let c = new C();
+assert.sameValue(c.method(), 'test262');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-field-is-not-clobbered-by-computed-property.js b/js/src/tests/test262/language/statements/class/elements/private-field-is-not-clobbered-by-computed-property.js
new file mode 100644
index 0000000000..1121bb41f2
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-field-is-not-clobbered-by-computed-property.js
@@ -0,0 +1,45 @@
+// Copyright (C) 2019 Caio Lima (Igalia SL). All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: Private field is not clobbered by computed property
+esid: sec-privatefieldget
+info: |
+ PrivateFieldGet (P, O)
+ 1. Assert: P is a Private Name.
+ 2. If O is not an object, throw a TypeError exception.
+ 3. If P.[[Kind]] is "field",
+ a. Let entry be PrivateFieldFind(P, O).
+ b. If entry is empty, throw a TypeError exception.
+ c. Return entry.[[PrivateFieldValue]].
+ 4. Perform ? PrivateBrandCheck(O, P).
+ 5. If P.[[Kind]] is "method",
+ a. Return P.[[Value]].
+ 6. Else,
+ a. Assert: P.[[Kind]] is "accessor".
+ b. If P does not have a [[Get]] field, throw a TypeError exception.
+ c. Let getter be P.[[Get]].
+ d. Return ? Call(getter, O).
+features: [class-fields-public, class-fields-private, class]
+---*/
+
+class C {
+ #m = 44;
+ ["#m"] = this.#m / 11;
+
+ checkPrivateField() {
+ assert.sameValue(this.hasOwnProperty("#m"), true);
+ assert.sameValue("#m" in this, true);
+
+ assert.sameValue(this["#m"], 4);
+
+ assert.sameValue(this.#m, 44);
+
+ return 0;
+ }
+}
+
+let c = new C();
+assert.sameValue(c.checkPrivateField(), 0);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-field-is-visible-in-computed-properties.js b/js/src/tests/test262/language/statements/class/elements/private-field-is-visible-in-computed-properties.js
new file mode 100644
index 0000000000..cb2bb60987
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-field-is-visible-in-computed-properties.js
@@ -0,0 +1,51 @@
+// Copyright (C) 2019 Caio Lima (Igalia SL). All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: PrivateName of a class is visible in its ComputetProperty scope
+esid: prod-ClassTail
+info: |
+ ClassTail : ClassHeritage { ClassBody }
+ 1. Let lex be the LexicalEnvironment of the running execution context.
+ 2. Let classScope be NewDeclarativeEnvironment(lex).
+ 3. Let classScopeEnvRec be classScope's EnvironmentRecord.
+ ...
+ 8. If ClassBodyopt is present, then
+ a. For each element dn of the PrivateBoundIdentifiers of ClassBodyopt,
+ i. Perform classPrivateEnvRec.CreateImmutableBinding(dn, true).
+ ii. Let privateName be NewPrivateName(dn).
+ iii. Perform ! classPrivateEnvRec.InitializeBinding(dn, dn).
+ ...
+ 15. Set the running execution context's LexicalEnvironment to classScope.
+ 16. Set the running execution context's PrivateEnvironment to classPrivateEnvironment.
+ ...
+ 27. For each ClassElement e in order from elements
+ a. If IsStatic of e is false, then
+ i. Let field be the result of ClassElementEvaluation for e with arguments proto and false.
+ ...
+
+ GetValue ( V )
+ ...
+ 5. If IsPropertyReference(V), then
+ ...
+ b. If IsPrivateReference(V), then
+ i. Return ? PrivateFieldGet(GetReferencedName(V), base).
+
+ PrivateFieldGet ( P, O )
+ ...
+ 4. If entry is empty, throw a TypeError exception.
+ ...
+
+features: [class-fields-private, class-fields-public, class]
+---*/
+
+const self = this;
+assert.throws(TypeError, function() {
+ class C {
+ [self.#f] = 'Test262';
+ #f = 'foo';
+ }
+}, 'access to a not defined private field in object should throw a TypeError');
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-field-on-nested-class.js b/js/src/tests/test262/language/statements/class/elements/private-field-on-nested-class.js
new file mode 100644
index 0000000000..fe62912de9
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-field-on-nested-class.js
@@ -0,0 +1,47 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-field-on-nested-class.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: PrivateName CallExpression usage (private field) (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-fields-private, class-fields-public, class]
+flags: [generated]
+info: |
+ Updated Productions
+
+ CallExpression[Yield, Await]:
+ CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+ SuperCall[?Yield, ?Await]
+ CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+ CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+ CallExpression[?Yield, ?Await].IdentifierName
+ CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+ CallExpression[?Yield, ?Await].PrivateName
+
+---*/
+
+
+class C {
+ #outer = 'test262';
+
+ B_withoutPrivateField = class {
+ method(o) {
+ return o.#outer;
+ }
+ }
+
+ B_withPrivateField = class {
+ #inner = 42;
+ method(o) {
+ return o.#outer;
+ }
+ }
+}
+
+let c = new C();
+let innerB1 = new c.B_withoutPrivateField();
+assert.sameValue(innerB1.method(c), 'test262');
+let innerB2 = new c.B_withPrivateField();
+assert.sameValue(innerB2.method(c), 'test262');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-field-visible-to-direct-eval-on-initializer.js b/js/src/tests/test262/language/statements/class/elements/private-field-visible-to-direct-eval-on-initializer.js
new file mode 100644
index 0000000000..5abd78669d
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-field-visible-to-direct-eval-on-initializer.js
@@ -0,0 +1,49 @@
+// Copyright (C) 2019 Caio Lima (Igalia SL). All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: Private field is visible on initializer with direct eval
+esid: sec-privatefieldget
+info: |
+ PrivateFieldGet (P, O)
+ 1. Assert: P is a Private Name.
+ 2. If O is not an object, throw a TypeError exception.
+ 3. If P.[[Kind]] is "field",
+ a. Let entry be PrivateFieldFind(P, O).
+ b. If entry is empty, throw a TypeError exception.
+ c. Return entry.[[PrivateFieldValue]].
+ 4. Perform ? PrivateBrandCheck(O, P).
+ 5. If P.[[Kind]] is "method",
+ a. Return P.[[Value]].
+ 6. Else,
+ a. Assert: P.[[Kind]] is "accessor".
+ b. If P does not have a [[Get]] field, throw a TypeError exception.
+ c. Let getter be P.[[Get]].
+ d. Return ? Call(getter, O).
+
+ ClassElementName : PrivateIdentifier
+ 1. Let privateIdentifier be StringValue of PrivateIdentifier.
+ 2. Let privateName be NewPrivateName(privateIdentifier).
+ 3. Let scope be the running execution context's PrivateEnvironment.
+ 4. Let scopeEnvRec be scope's EnvironmentRecord.
+ 5. Perform ! scopeEnvRec.InitializeBinding(privateIdentifier, privateName).
+ 6. Return privateName.
+
+ MakePrivateReference ( baseValue, privateIdentifier )
+ 1. Let env be the running execution context's PrivateEnvironment.
+ 2. Let privateNameBinding be ? ResolveBinding(privateIdentifier, env).
+ 3. Let privateName be GetValue(privateNameBinding).
+ 4. Assert: privateName is a Private Name.
+ 5. Return a value of type Reference whose base value is baseValue, whose referenced name is privateName, whose strict reference flag is true.
+features: [class-fields-private, class-fields-public, class]
+---*/
+
+class C {
+ #m = 44;
+ v = eval("this.#m");
+}
+
+let c = new C();
+assert.sameValue(c.v, 44);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-field-visible-to-direct-eval.js b/js/src/tests/test262/language/statements/class/elements/private-field-visible-to-direct-eval.js
new file mode 100644
index 0000000000..706e4a64b8
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-field-visible-to-direct-eval.js
@@ -0,0 +1,61 @@
+// Copyright (C) 2019 Caio Lima (Igalia SL). All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: Private field is visible to direct eval code
+esid: sec-privatefieldget
+info: |
+ PrivateFieldGet (P, O)
+ 1. Assert: P is a Private Name.
+ 2. If O is not an object, throw a TypeError exception.
+ 3. If P.[[Kind]] is "field",
+ a. Let entry be PrivateFieldFind(P, O).
+ b. If entry is empty, throw a TypeError exception.
+ c. Return entry.[[PrivateFieldValue]].
+ 4. Perform ? PrivateBrandCheck(O, P).
+ 5. If P.[[Kind]] is "method",
+ a. Return P.[[Value]].
+ 6. Else,
+ a. Assert: P.[[Kind]] is "accessor".
+ b. If P does not have a [[Get]] field, throw a TypeError exception.
+ c. Let getter be P.[[Get]].
+ d. Return ? Call(getter, O).
+
+ ClassElementName : PrivateIdentifier
+ 1. Let privateIdentifier be StringValue of PrivateIdentifier.
+ 2. Let privateName be NewPrivateName(privateIdentifier).
+ 3. Let scope be the running execution context's PrivateEnvironment.
+ 4. Let scopeEnvRec be scope's EnvironmentRecord.
+ 5. Perform ! scopeEnvRec.InitializeBinding(privateIdentifier, privateName).
+ 6. Return privateName.
+
+ MakePrivateReference ( baseValue, privateIdentifier )
+ 1. Let env be the running execution context's PrivateEnvironment.
+ 2. Let privateNameBinding be ? ResolveBinding(privateIdentifier, env).
+ 3. Let privateName be GetValue(privateNameBinding).
+ 4. Assert: privateName is a Private Name.
+ 5. Return a value of type Reference whose base value is baseValue, whose referenced name is privateName, whose strict reference flag is true.
+features: [class-fields-private, class]
+---*/
+
+class C {
+ #m = 44;
+
+ getWithEval() {
+ return eval("this.#m");
+ }
+}
+
+class D {
+ #m = 44;
+}
+
+let c = new C();
+assert.sameValue(c.getWithEval(), 44);
+
+let d = new D();
+assert.throws(TypeError, function() {
+ c.getWithEval.call(d);
+}, "invalid access to a private field");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-field-with-initialized-id-is-visible-in-computed-properties.js b/js/src/tests/test262/language/statements/class/elements/private-field-with-initialized-id-is-visible-in-computed-properties.js
new file mode 100644
index 0000000000..5945177e73
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-field-with-initialized-id-is-visible-in-computed-properties.js
@@ -0,0 +1,78 @@
+// Copyright (C) 2019 Caio Lima (Igalia SL). All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: PrivateName of a class is visible in its ComputetProperty scope
+esid: prod-ClassTail
+info: |
+ ClassTail : ClassHeritage { ClassBody }
+ 1. Let lex be the LexicalEnvironment of the running execution context.
+ 2. Let classScope be NewDeclarativeEnvironment(lex).
+ 3. Let classScopeEnvRec be classScope's EnvironmentRecord.
+ ...
+ 8. If ClassBodyopt is present, then
+ a. For each element dn of the PrivateBoundIdentifiers of ClassBodyopt,
+ i. Perform classPrivateEnvRec.CreateImmutableBinding(dn, true).
+ ...
+ 15. Set the running execution context's LexicalEnvironment to classScope.
+ 16. Set the running execution context's PrivateEnvironment to classPrivateEnvironment.
+ ...
+ 27. For each ClassElement e in order from elements
+ a. If IsStatic of e is false, then
+ i. Let field be the result of ClassElementEvaluation for e with arguments proto and false.
+ ...
+
+ FieldDefinition : ClassElementName Initializer
+ 1. Let name be the result of evaluating ClassElementName.
+ ...
+
+ ClassElementName : PrivateIdentifier
+ 1. Let privateIdentifier be StringValue of PrivateIdentifier.
+ 2. Let privateName be NewPrivateName(privateIdentifier).
+ 3. Let scope be the running execution context's PrivateEnvironment.
+ 4. Let scopeEnvRec be scope's EnvironmentRecord.
+ 5. Perform ! scopeEnvRec.InitializeBinding(privateIdentifier, privateName).
+ 6. Return privateName.
+
+ MemberExpression : MemberExpression . PrivateIdentifier
+ ...
+ 5. Return MakePrivateReference(bv, fieldNameString).
+
+ MakePrivateReference ( baseValue, privateIdentifier )
+ ...
+ 2. Let privateNameBinding be ? ResolveBinding(privateIdentifier, env).
+ 3. Let privateName be GetValue(privateNameBinding).
+ ...
+
+ GetValue (V)
+ ...
+ 5. If IsPropertyReference(V), then
+ a. If HasPrimitiveBase(V), then
+ i. Assert: In this case, base will never be null or undefined.
+ ii. Let base be ToObject(base).
+ b. If IsPrivateReference(V), then
+ i. Return ? PrivateFieldGet(GetReferencedName(V), base).
+ 6. Else,
+ a. Assert: base is an Environment Record.
+ b. Return ? base.GetBindingValue(GetReferencedName(V), IsStrictReference(V)).
+
+ PrivateFieldGet (P, O)
+ 1. Assert: P is a Private Name.
+ 2. Assert: Type(O) is Object.
+ 3. Let entry be PrivateFieldFind(P, O).
+ 4. If entry is empty, throw a TypeError exception.
+ 5. Return entry.[[PrivateFieldValue]].
+
+features: [class-fields-private, class-fields-public, class]
+---*/
+
+const self = this;
+assert.throws(TypeError, function() {
+ class C {
+ #f = 'foo';
+ [self.#f] = 'Test262';
+ }
+}, 'access to a not defined private field in object should throw a TypeError');
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-generator-method-name.js b/js/src/tests/test262/language/statements/class/elements/private-generator-method-name.js
new file mode 100644
index 0000000000..d2650dbbdf
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-generator-method-name.js
@@ -0,0 +1,61 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-generator-method-name.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: Private generator methods have name property properly configured (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-methods-private, class]
+flags: [generated]
+info: |
+ Updated Productions
+
+ ClassElement : MethodDefinition
+ 1. Return ClassElementEvaluation of MethodDefinition with arguments ! Get(homeObject, "prototype"),enumerable, and "prototype".
+
+ GeneratorMethod : * ClassElementName (UniqueFormalParameters) { GeneratorBody }
+ 1. Let key be the result of evaluating ClassElementName.
+ ...
+ 12. Return DefineOrdinaryMethod(key, homeObject, closure, enumerable).
+
+ ClassElement : MethodDefinition
+ ClassElement : static MethodDefinition
+ 1. Perform ? PropertyDefinitionEvaluation with parameters object and enumerable.
+ 2. Return empty.
+
+ ClassElementName : PrivateIdentifier
+ 1. Let bindingName be StringValue of PrivateIdentifier.
+ ...
+ 5. If scopeEnvRec's binding for bindingName is uninitialized,
+ a. Let field be NewPrivateName(bindingName).
+ b. Perform ! scopeEnvRec.InitializeBinding(bindingName, field).
+ 6. Otherwise,
+ a. Let field be scopeEnvRec.GetBindingValue(bindingName).
+ 7. Assert: field.[[Description]] is bindingName.
+ 8. Return field.
+
+ DefineOrdinaryMethod(key, homeObject, closure, enumerable)
+ 1. Perform SetFunctionName(closure, key).
+ 2. If key is a Private Name,
+ a. Assert: key does not have a [[Kind]] field.
+ b. Set key.[[Kind]] to "method".
+ c. Set key.[[Value]] to closure.
+ d. Set key.[[Brand]] to homeObject.
+ 3. Else,
+ a. Let desc be the PropertyDescriptor{[[Value]]: closure, [[Writable]]: true, [[Enumerable]]: enumerable, [[Configurable]]: true}.
+ b. Perform ? DefinePropertyOrThrow(homeObject, key, desc).
+
+---*/
+
+
+class C {
+ * #method() {};
+
+ getPrivateMethod() {
+ return this.#method;
+ }
+}
+
+let c = new C();
+assert.sameValue(c.getPrivateMethod().name, "#method");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-getter-access-on-inner-arrow-function.js b/js/src/tests/test262/language/statements/class/elements/private-getter-access-on-inner-arrow-function.js
new file mode 100644
index 0000000000..eb230b531f
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-getter-access-on-inner-arrow-function.js
@@ -0,0 +1,43 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-getter-access-on-inner-arrow-function.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: PrivateName of private getter is visible on inner arrow function of class scope (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-methods-private, class]
+flags: [generated]
+info: |
+ Updated Productions
+
+ CallExpression[Yield, Await]:
+ CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+ SuperCall[?Yield, ?Await]
+ CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+ CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+ CallExpression[?Yield, ?Await].IdentifierName
+ CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+ CallExpression[?Yield, ?Await].PrivateName
+
+---*/
+
+
+class C {
+ get #m() { return 'Test262'; }
+
+ method() {
+ let arrowFunction = () => {
+ return this.#m;
+ }
+
+ return arrowFunction();
+ }
+}
+
+let c = new C();
+assert.sameValue(c.method(), 'Test262');
+let o = {};
+assert.throws(TypeError, function() {
+ c.method.call(o);
+}, 'accessed private accessor from an ordinary object');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-getter-access-on-inner-function.js b/js/src/tests/test262/language/statements/class/elements/private-getter-access-on-inner-function.js
new file mode 100644
index 0000000000..0f5ea60b1c
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-getter-access-on-inner-function.js
@@ -0,0 +1,44 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-getter-access-on-inner-function.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: PrivateName of private getter is visible on inner function of class scope (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-methods-private, class]
+flags: [generated]
+info: |
+ Updated Productions
+
+ CallExpression[Yield, Await]:
+ CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+ SuperCall[?Yield, ?Await]
+ CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+ CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+ CallExpression[?Yield, ?Await].IdentifierName
+ CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+ CallExpression[?Yield, ?Await].PrivateName
+
+---*/
+
+
+class C {
+ get #m() { return 'Test262'; }
+
+ method() {
+ let self = this;
+ function innerFunction() {
+ return self.#m;
+ }
+
+ return innerFunction();
+ }
+}
+
+let c = new C();
+assert.sameValue(c.method(), 'Test262');
+let o = {};
+assert.throws(TypeError, function() {
+ c.method.call(o);
+}, 'accessed private accessor from an ordinary object');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-getter-brand-check-multiple-evaluations-of-class.js b/js/src/tests/test262/language/statements/class/elements/private-getter-brand-check-multiple-evaluations-of-class.js
new file mode 100644
index 0000000000..ce8089407e
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-getter-brand-check-multiple-evaluations-of-class.js
@@ -0,0 +1,49 @@
+// Copyright (C) 2019 Caio Lima (Igalia SL). All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: Every new evaluation of a class creates a different brand (private getter)
+esid: sec-privatefieldget
+info: |
+ ClassTail : ClassHeritage { ClassBody }
+ ...
+ 11. Let proto be ObjectCreate(protoParent).
+ ...
+ 31. If PrivateBoundIdentifiers of ClassBody contains a Private Name P such that the P's [[Kind]] field is either "method" or "accessor",
+ a. Set F.[[PrivateBrand]] to proto.
+ ...
+
+ PrivateBrandCheck(O, P)
+ 1. If O.[[PrivateBrands]] does not contain an entry e such that SameValue(e, P.[[Brand]]) is true,
+ a. Throw a TypeError exception.
+features: [class, class-methods-private]
+---*/
+
+let createAndInstantiateClass = function () {
+ class C {
+ get #m() { return 'test262'; }
+
+ access(o) {
+ return o.#m;
+ }
+ }
+
+ let c = new C();
+ return c;
+};
+
+let c1 = createAndInstantiateClass();
+let c2 = createAndInstantiateClass();
+
+assert.sameValue(c1.access(c1), 'test262');
+assert.sameValue(c2.access(c2), 'test262');
+
+assert.throws(TypeError, function() {
+ c1.access(c2);
+}, 'invalid access of c1 private method');
+
+assert.throws(TypeError, function() {
+ c2.access(c1);
+}, 'invalid access of c2 private method');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-getter-brand-check-super-class.js b/js/src/tests/test262/language/statements/class/elements/private-getter-brand-check-super-class.js
new file mode 100644
index 0000000000..e0fd805fed
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-getter-brand-check-super-class.js
@@ -0,0 +1,50 @@
+// Copyright (C) 2019 Caio Lima (Igalia SL). All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: Subclass can access private methods of a superclass (private getter)
+esid: sec-privatefieldget
+info: |
+ SuperCall : super Arguments
+ ...
+ 10. Perform ? InitializeInstanceElements(result, F).
+ ...
+
+ InitializeInstanceFieldsElements ( O, constructor )
+ 1. Assert: Type ( O ) is Object.
+ 2. Assert: Assert constructor is an ECMAScript function object.
+ 3. If constructor.[[PrivateBrand]] is not undefined,
+ a. Perform ? PrivateBrandAdd(O, constructor.[[PrivateBrand]]).
+ 4. Let fieldRecords be the value of constructor's [[Fields]] internal slot.
+ 5. For each item fieldRecord in order from fieldRecords,
+ a. Perform ? DefineField(O, fieldRecord).
+ 6. Return.
+features: [class, class-methods-private]
+---*/
+
+class S {
+ get #m() { return 'super class'; }
+
+ superAccess() { return this.#m; }
+}
+
+class C extends S {
+ get #m() { return 'test262'; }
+
+ access() {
+ return this.#m;
+ }
+}
+
+let c = new C();
+
+assert.sameValue(c.access(), 'test262');
+assert.sameValue(c.superAccess(), 'super class');
+
+let s = new S();
+assert.sameValue(s.superAccess(), 'super class');
+assert.throws(TypeError, function() {
+ c.access.call(s);
+}, 'invalid access of C private method');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-getter-brand-check.js b/js/src/tests/test262/language/statements/class/elements/private-getter-brand-check.js
new file mode 100644
index 0000000000..775a26d7bd
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-getter-brand-check.js
@@ -0,0 +1,47 @@
+// Copyright (C) 2019 Caio Lima (Igalia SL). All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: PrivateBrandCheck fails when the object O doesn't have P.[[Brand]] (private getter)
+esid: sec-privatefieldget
+info: |
+ PrivateFieldGet (P, O)
+ 1. Assert: P is a Private Name.
+ 2. If O is not an object, throw a TypeError exception.
+ 3. If P.[[Kind]] is "field",
+ a. Let entry be PrivateFieldFind(P, O).
+ b. If entry is empty, throw a TypeError exception.
+ c. Return entry.[[PrivateFieldValue]].
+ 4. Perform ? PrivateBrandCheck(O, P).
+ 5. If P.[[Kind]] is "method",
+ a. Return P.[[Value]].
+ 6. Else,
+ a. Assert: P.[[Kind]] is "accessor".
+ b. If P does not have a [[Get]] field, throw a TypeError exception.
+ c. Let getter be P.[[Get]].
+ d. Return ? Call(getter, O).
+
+ PrivateBrandCheck(O, P)
+ 1. If O.[[PrivateBrands]] does not contain an entry e such that SameValue(e, P.[[Brand]]) is true,
+ a. Throw a TypeError exception.
+features: [class, class-methods-private]
+---*/
+
+class C {
+ get #m() { return 'test262'; }
+
+ access(o) {
+ return o.#m;
+ }
+}
+
+let c = new C();
+assert.sameValue(c.access(c), 'test262');
+
+let o = {};
+assert.throws(TypeError, function() {
+ c.access(o);
+}, 'invalid access a private method');
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-getter-is-not-a-own-property.js b/js/src/tests/test262/language/statements/class/elements/private-getter-is-not-a-own-property.js
new file mode 100644
index 0000000000..71901a7d2b
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-getter-is-not-a-own-property.js
@@ -0,0 +1,47 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-getter-is-not-a-own-property.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: Private getter is not stored as an own property of objects (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-methods-private, class]
+flags: [generated]
+info: |
+ PrivateFieldGet (P, O)
+ 1. Assert: P is a Private Name.
+ 2. If O is not an object, throw a TypeError exception.
+ 3. If P.[[Kind]] is "field",
+ a. Let entry be PrivateFieldFind(P, O).
+ b. If entry is empty, throw a TypeError exception.
+ c. Return entry.[[PrivateFieldValue]].
+ 4. Perform ? PrivateBrandCheck(O, P).
+ 5. If P.[[Kind]] is "method",
+ a. Return P.[[Value]].
+ 6. Else,
+ a. Assert: P.[[Kind]] is "accessor".
+ b. If P does not have a [[Get]] field, throw a TypeError exception.
+ c. Let getter be P.[[Get]].
+ d. Return ? Call(getter, O).
+
+---*/
+
+
+class C {
+ get #m() { return "Test262"; }
+
+ checkPrivateGetter() {
+ assert.sameValue(this.hasOwnProperty("#m"), false);
+ assert.sameValue("#m" in this, false);
+
+ assert.sameValue(this.__lookupGetter__("#m"), undefined);
+
+ assert.sameValue(this.#m, "Test262");
+
+ return 0;
+ }
+}
+
+let c = new C();
+assert.sameValue(c.checkPrivateGetter(), 0);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-getter-is-not-clobbered-by-computed-property.js b/js/src/tests/test262/language/statements/class/elements/private-getter-is-not-clobbered-by-computed-property.js
new file mode 100644
index 0000000000..14bae94912
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-getter-is-not-clobbered-by-computed-property.js
@@ -0,0 +1,45 @@
+// Copyright (C) 2019 Caio Lima (Igalia SL). All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: Private getter is not clobbered by computed property
+esid: sec-privatefieldget
+info: |
+ PrivateFieldGet (P, O)
+ 1. Assert: P is a Private Name.
+ 2. If O is not an object, throw a TypeError exception.
+ 3. If P.[[Kind]] is "field",
+ a. Let entry be PrivateFieldFind(P, O).
+ b. If entry is empty, throw a TypeError exception.
+ c. Return entry.[[PrivateFieldValue]].
+ 4. Perform ? PrivateBrandCheck(O, P).
+ 5. If P.[[Kind]] is "method",
+ a. Return P.[[Value]].
+ 6. Else,
+ a. Assert: P.[[Kind]] is "accessor".
+ b. If P does not have a [[Get]] field, throw a TypeError exception.
+ c. Let getter be P.[[Get]].
+ d. Return ? Call(getter, O).
+features: [class-methods-private, class-fields-public, class]
+---*/
+
+class C {
+ get #m() { return "Test262"; }
+ ["#m"] = 0;
+
+ checkPrivateGetter() {
+ assert.sameValue(this.hasOwnProperty("#m"), true);
+ assert.sameValue("#m" in this, true);
+
+ assert.sameValue(this["#m"], 0);
+
+ assert.sameValue(this.#m, "Test262");
+
+ return 0;
+ }
+}
+
+let c = new C();
+assert.sameValue(c.checkPrivateGetter(), 0);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-getter-on-nested-class.js b/js/src/tests/test262/language/statements/class/elements/private-getter-on-nested-class.js
new file mode 100644
index 0000000000..bdda163475
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-getter-on-nested-class.js
@@ -0,0 +1,38 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-getter-on-nested-class.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: PrivateName of private getter is available on inner classes (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-public, class]
+flags: [generated]
+info: |
+ Updated Productions
+
+ CallExpression[Yield, Await]:
+ CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+ SuperCall[?Yield, ?Await]
+ CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+ CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+ CallExpression[?Yield, ?Await].IdentifierName
+ CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+ CallExpression[?Yield, ?Await].PrivateName
+
+---*/
+
+
+class C {
+ get #m() { return 'test262'; }
+
+ B = class {
+ method(o) {
+ return o.#m;
+ }
+ }
+}
+
+let c = new C();
+let innerB = new c.B();
+assert.sameValue(innerB.method(c), 'test262');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-getter-shadowed-by-field-on-nested-class.js b/js/src/tests/test262/language/statements/class/elements/private-getter-shadowed-by-field-on-nested-class.js
new file mode 100644
index 0000000000..94bcb313bf
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-getter-shadowed-by-field-on-nested-class.js
@@ -0,0 +1,46 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-getter-shadowed-by-field-on-nested-class.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: PrivateName of private getter can be shadowed on inner classes by a private field (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class-fields-public, class]
+flags: [generated]
+info: |
+ Updated Productions
+
+ CallExpression[Yield, Await]:
+ CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+ SuperCall[?Yield, ?Await]
+ CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+ CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+ CallExpression[?Yield, ?Await].IdentifierName
+ CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+ CallExpression[?Yield, ?Await].PrivateName
+
+---*/
+
+
+class C {
+ get #m() { return 'outer class'; }
+
+ method() { return this.#m; }
+
+ B = class {
+ method(o) {
+ return o.#m;
+ }
+
+ #m = 'test262';
+ }
+}
+
+let c = new C();
+let innerB = new c.B();
+assert.sameValue(innerB.method(innerB), 'test262');
+assert.sameValue(c.method(), 'outer class');
+assert.throws(TypeError, function() {
+ innerB.method(c);
+}, 'accessed inner class field from an object of outer class');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-getter-shadowed-by-getter-on-nested-class.js b/js/src/tests/test262/language/statements/class/elements/private-getter-shadowed-by-getter-on-nested-class.js
new file mode 100644
index 0000000000..b1d797b880
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-getter-shadowed-by-getter-on-nested-class.js
@@ -0,0 +1,46 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-getter-shadowed-by-getter-on-nested-class.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: PrivateName of private getter can be shadowed on inner classes by a private getter (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-public, class]
+flags: [generated]
+info: |
+ Updated Productions
+
+ CallExpression[Yield, Await]:
+ CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+ SuperCall[?Yield, ?Await]
+ CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+ CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+ CallExpression[?Yield, ?Await].IdentifierName
+ CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+ CallExpression[?Yield, ?Await].PrivateName
+
+---*/
+
+
+class C {
+ get #m() { return 'outer class'; }
+
+ method() { return this.#m; }
+
+ B = class {
+ method(o) {
+ return o.#m;
+ }
+
+ get #m() { return 'test262'; }
+ }
+}
+
+let c = new C();
+let innerB = new c.B();
+assert.sameValue(innerB.method(innerB), 'test262');
+assert.sameValue(c.method(), 'outer class');
+assert.throws(TypeError, function() {
+ innerB.method(c);
+}, 'accessed inner class getter from an object of outer class');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-getter-shadowed-by-method-on-nested-class.js b/js/src/tests/test262/language/statements/class/elements/private-getter-shadowed-by-method-on-nested-class.js
new file mode 100644
index 0000000000..941ce75429
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-getter-shadowed-by-method-on-nested-class.js
@@ -0,0 +1,43 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-getter-shadowed-by-method-on-nested-class.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: PrivateName of private getter can be shadowed on inner class by a private method (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-public, class]
+flags: [generated]
+info: |
+ Updated Productions
+
+ CallExpression[Yield, Await]:
+ CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+ SuperCall[?Yield, ?Await]
+ CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+ CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+ CallExpression[?Yield, ?Await].IdentifierName
+ CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+ CallExpression[?Yield, ?Await].PrivateName
+
+---*/
+
+
+class C {
+ get #m() { throw new Test262Error(); }
+
+ B = class {
+ method(o) {
+ return o.#m();
+ }
+
+ #m() { return 'test262'; }
+ }
+}
+
+let c = new C();
+let innerB = new c.B();
+assert.sameValue(innerB.method(innerB), 'test262');
+assert.throws(TypeError, function() {
+ innerB.method(c);
+}, 'accessed inner class method from an object of outer class');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-getter-shadowed-by-setter-on-nested-class.js b/js/src/tests/test262/language/statements/class/elements/private-getter-shadowed-by-setter-on-nested-class.js
new file mode 100644
index 0000000000..4a042516a8
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-getter-shadowed-by-setter-on-nested-class.js
@@ -0,0 +1,51 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-getter-shadowed-by-setter-on-nested-class.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: PrivateName of private getter can be shadowed on inner classes by a private setter (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-public, class]
+flags: [generated]
+info: |
+ Updated Productions
+
+ CallExpression[Yield, Await]:
+ CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+ SuperCall[?Yield, ?Await]
+ CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+ CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+ CallExpression[?Yield, ?Await].IdentifierName
+ CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+ CallExpression[?Yield, ?Await].PrivateName
+
+---*/
+
+
+class C {
+ get #m() { return 'outer class'; }
+
+ method() { return this.#m; }
+
+ B = class {
+ method(o) {
+ return o.#m;
+ }
+
+ set #m(v) { this._v = v; }
+ }
+}
+
+let c = new C();
+let innerB = new c.B();
+
+assert.throws(TypeError, function() {
+ innerB.method(innerB);
+}, '[[Get]] operation of an accessor without getter');
+
+assert.sameValue(c.method(), 'outer class');
+
+assert.throws(TypeError, function() {
+ innerB.method(c);
+}, 'access of inner class accessor from an object of outer class');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-getter-visible-to-direct-eval-on-initializer.js b/js/src/tests/test262/language/statements/class/elements/private-getter-visible-to-direct-eval-on-initializer.js
new file mode 100644
index 0000000000..113f29c138
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-getter-visible-to-direct-eval-on-initializer.js
@@ -0,0 +1,49 @@
+// Copyright (C) 2019 Caio Lima (Igalia SL). All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: Private getter is visible on initializer with direct eval
+esid: sec-privatefieldget
+info: |
+ PrivateFieldGet (P, O)
+ 1. Assert: P is a Private Name.
+ 2. If O is not an object, throw a TypeError exception.
+ 3. If P.[[Kind]] is "field",
+ a. Let entry be PrivateFieldFind(P, O).
+ b. If entry is empty, throw a TypeError exception.
+ c. Return entry.[[PrivateFieldValue]].
+ 4. Perform ? PrivateBrandCheck(O, P).
+ 5. If P.[[Kind]] is "method",
+ a. Return P.[[Value]].
+ 6. Else,
+ a. Assert: P.[[Kind]] is "accessor".
+ b. If P does not have a [[Get]] field, throw a TypeError exception.
+ c. Let getter be P.[[Get]].
+ d. Return ? Call(getter, O).
+
+ ClassElementName : PrivateIdentifier
+ 1. Let privateIdentifier be StringValue of PrivateIdentifier.
+ 2. Let privateName be NewPrivateName(privateIdentifier).
+ 3. Let scope be the running execution context's PrivateEnvironment.
+ 4. Let scopeEnvRec be scope's EnvironmentRecord.
+ 5. Perform ! scopeEnvRec.InitializeBinding(privateIdentifier, privateName).
+ 6. Return privateName.
+
+ MakePrivateReference ( baseValue, privateIdentifier )
+ 1. Let env be the running execution context's PrivateEnvironment.
+ 2. Let privateNameBinding be ? ResolveBinding(privateIdentifier, env).
+ 3. Let privateName be GetValue(privateNameBinding).
+ 4. Assert: privateName is a Private Name.
+ 5. Return a value of type Reference whose base value is baseValue, whose referenced name is privateName, whose strict reference flag is true.
+features: [class-methods-private, class-fields-public, class]
+---*/
+
+class C {
+ get #m() { return "Test262"; };
+ v = eval("this.#m");
+}
+
+let c = new C();
+assert.sameValue(c.v, "Test262");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-getter-visible-to-direct-eval.js b/js/src/tests/test262/language/statements/class/elements/private-getter-visible-to-direct-eval.js
new file mode 100644
index 0000000000..55a54f0d16
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-getter-visible-to-direct-eval.js
@@ -0,0 +1,61 @@
+// Copyright (C) 2019 Caio Lima (Igalia SL). All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: Private getter is visible to direct eval code
+esid: sec-privatefieldget
+info: |
+ PrivateFieldGet (P, O)
+ 1. Assert: P is a Private Name.
+ 2. If O is not an object, throw a TypeError exception.
+ 3. If P.[[Kind]] is "field",
+ a. Let entry be PrivateFieldFind(P, O).
+ b. If entry is empty, throw a TypeError exception.
+ c. Return entry.[[PrivateFieldValue]].
+ 4. Perform ? PrivateBrandCheck(O, P).
+ 5. If P.[[Kind]] is "method",
+ a. Return P.[[Value]].
+ 6. Else,
+ a. Assert: P.[[Kind]] is "accessor".
+ b. If P does not have a [[Get]] field, throw a TypeError exception.
+ c. Let getter be P.[[Get]].
+ d. Return ? Call(getter, O).
+
+ ClassElementName : PrivateIdentifier
+ 1. Let privateIdentifier be StringValue of PrivateIdentifier.
+ 2. Let privateName be NewPrivateName(privateIdentifier).
+ 3. Let scope be the running execution context's PrivateEnvironment.
+ 4. Let scopeEnvRec be scope's EnvironmentRecord.
+ 5. Perform ! scopeEnvRec.InitializeBinding(privateIdentifier, privateName).
+ 6. Return privateName.
+
+ MakePrivateReference ( baseValue, privateIdentifier )
+ 1. Let env be the running execution context's PrivateEnvironment.
+ 2. Let privateNameBinding be ? ResolveBinding(privateIdentifier, env).
+ 3. Let privateName be GetValue(privateNameBinding).
+ 4. Assert: privateName is a Private Name.
+ 5. Return a value of type Reference whose base value is baseValue, whose referenced name is privateName, whose strict reference flag is true.
+features: [class-methods-private, class]
+---*/
+
+class C {
+ get #m() { return "Test262"; };
+
+ getWithEval() {
+ return eval("this.#m");
+ }
+}
+
+class D {
+ get #m() { throw new Test262Error(); };
+}
+
+let c = new C();
+assert.sameValue(c.getWithEval(), "Test262");
+
+let d = new D();
+assert.throws(TypeError, function() {
+ c.getWithEval.call(d);
+}, "invalid access to a private getter");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-indirect-eval-contains-arguments.js b/js/src/tests/test262/language/statements/class/elements/private-indirect-eval-contains-arguments.js
new file mode 100644
index 0000000000..4b58b0b29e
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-indirect-eval-contains-arguments.js
@@ -0,0 +1,25 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/eval-contains-arguments.case
+// - src/class-elements/initializer-indirect-eval-arguments/cls-decl-private-fields-indirect-eval.template
+/*---
+description: No error if `arguments` in StatementList of eval (indirect eval)
+esid: sec-performeval-rules-in-initializer
+features: [class, class-fields-public, class-fields-private]
+flags: [generated, noStrict]
+info: |
+ For indirect eval, the "Additional Early Error Rules for Eval Inside Initializer"
+ (in #sec-performeval-rules-in-initializer) are NOT applicable.
+
+---*/
+
+
+var arguments = 1;
+class C {
+ #x = (0, eval)('arguments;');
+ x() {
+ return this.#x;
+ }
+}
+assert.sameValue(new C().x(), arguments);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-indirect-eval-err-contains-newtarget.js b/js/src/tests/test262/language/statements/class/elements/private-indirect-eval-err-contains-newtarget.js
new file mode 100644
index 0000000000..a55ad8388d
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-indirect-eval-err-contains-newtarget.js
@@ -0,0 +1,37 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/eval-err-contains-newtarget.case
+// - src/class-elements/initializer-eval-newtarget/cls-decl-private-fields-indirect-eval.template
+/*---
+description: error if `new.target` in StatementList of eval (indirect eval)
+esid: sec-performeval-rules-in-initializer
+features: [class, new.target, class-fields-private]
+flags: [generated]
+info: |
+ Additional Early Error Rules for Eval Inside Initializer
+ These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer.
+ ScriptBody : StatementList
+
+ ...
+ The remaining eval rules apply as outside a constructor, inside a method, and inside a function.
+
+ Additional Early Error Rules for Eval Outside Functions
+ These static semantics are applied by PerformEval when a direct eval call occurs outside of any function.
+ ScriptBody : StatementList
+
+ It is a Syntax Error if StatementList Contains NewTarget.
+
+---*/
+
+
+var executed = false;
+class C {
+ #x = (0, eval)('executed = true; new.target;');
+}
+
+assert.throws(SyntaxError, function() {
+ new C();
+});
+
+assert.sameValue(executed, false);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-literal-name-init-err-contains-arguments.js b/js/src/tests/test262/language/statements/class/elements/private-literal-name-init-err-contains-arguments.js
new file mode 100644
index 0000000000..bc1117bcfc
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-literal-name-init-err-contains-arguments.js
@@ -0,0 +1,35 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/init-err-contains-arguments.case
+// - src/class-elements/initializer-error/cls-decl-fields-private-name.template
+/*---
+description: Syntax error if `arguments` used in class field (ClassElementName PrivateName)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-public, class-fields-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ FieldDefinition:
+ PropertyNameInitializeropt
+
+ - It is a Syntax Error if ContainsArguments of Initializer is true.
+
+ Static Semantics: ContainsArguments
+ IdentifierReference : Identifier
+
+ 1. If the StringValue of Identifier is "arguments", return true.
+ ...
+ For all other grammatical productions, recurse on all nonterminals. If any piece returns true, then return true. Otherwise return false.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x = arguments;
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/private-literal-name-init-err-contains-super.js b/js/src/tests/test262/language/statements/class/elements/private-literal-name-init-err-contains-super.js
new file mode 100644
index 0000000000..57126d4e80
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-literal-name-init-err-contains-super.js
@@ -0,0 +1,28 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/init-err-contains-super.case
+// - src/class-elements/initializer-error/cls-decl-fields-private-name.template
+/*---
+description: Syntax error if `super()` used in class field (ClassElementName PrivateName)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-public, class-fields-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ FieldDefinition:
+ PropertyNameInitializeropt
+
+ - It is a Syntax Error if Initializer is present and Initializer Contains SuperCall is true.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x = super();
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/private-method-access-on-inner-arrow-function.js b/js/src/tests/test262/language/statements/class/elements/private-method-access-on-inner-arrow-function.js
new file mode 100644
index 0000000000..a0e1670cfa
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-method-access-on-inner-arrow-function.js
@@ -0,0 +1,43 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-method-access-on-inner-arrow-function.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: PrivateName of private method is visible on inner arrow function of class scope (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-methods-private, class]
+flags: [generated]
+info: |
+ Updated Productions
+
+ CallExpression[Yield, Await]:
+ CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+ SuperCall[?Yield, ?Await]
+ CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+ CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+ CallExpression[?Yield, ?Await].IdentifierName
+ CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+ CallExpression[?Yield, ?Await].PrivateName
+
+---*/
+
+
+class C {
+ #m() { return 'Test262'; }
+
+ method() {
+ let arrowFunction = () => {
+ return this.#m();
+ }
+
+ return arrowFunction();
+ }
+}
+
+let c = new C();
+assert.sameValue(c.method(), 'Test262');
+let o = {};
+assert.throws(TypeError, function() {
+ c.method.call(o);
+}, 'accessed private method from an ordinary object');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-method-access-on-inner-function.js b/js/src/tests/test262/language/statements/class/elements/private-method-access-on-inner-function.js
new file mode 100644
index 0000000000..00d4ba02fe
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-method-access-on-inner-function.js
@@ -0,0 +1,44 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-method-access-on-inner-function.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: PrivateName of private method is visible on inner function of class scope (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-methods-private, class]
+flags: [generated]
+info: |
+ Updated Productions
+
+ CallExpression[Yield, Await]:
+ CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+ SuperCall[?Yield, ?Await]
+ CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+ CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+ CallExpression[?Yield, ?Await].IdentifierName
+ CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+ CallExpression[?Yield, ?Await].PrivateName
+
+---*/
+
+
+class C {
+ #m() { return 'Test262'; }
+
+ method() {
+ let self = this;
+ function innerFunction() {
+ return self.#m();
+ }
+
+ return innerFunction();
+ }
+}
+
+let c = new C();
+assert.sameValue(c.method(), 'Test262');
+let o = {};
+assert.throws(TypeError, function() {
+ c.method.call(o);
+}, 'accessed private method from an ordinary object');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-method-brand-check-multiple-evaluations-of-class.js b/js/src/tests/test262/language/statements/class/elements/private-method-brand-check-multiple-evaluations-of-class.js
new file mode 100644
index 0000000000..1a04a5c24f
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-method-brand-check-multiple-evaluations-of-class.js
@@ -0,0 +1,49 @@
+// Copyright (C) 2019 Caio Lima (Igalia SL). All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: Every new evaluation of a class creates a different brand (private method)
+esid: sec-privatefieldget
+info: |
+ ClassTail : ClassHeritage { ClassBody }
+ ...
+ 11. Let proto be ObjectCreate(protoParent).
+ ...
+ 31. If PrivateBoundIdentifiers of ClassBody contains a Private Name P such that the P's [[Kind]] field is either "method" or "accessor",
+ a. Set F.[[PrivateBrand]] to proto.
+ ...
+
+ PrivateBrandCheck(O, P)
+ 1. If O.[[PrivateBrands]] does not contain an entry e such that SameValue(e, P.[[Brand]]) is true,
+ a. Throw a TypeError exception.
+features: [class, class-methods-private]
+---*/
+
+let createAndInstantiateClass = function () {
+ class C {
+ #m() { return 'test262'; }
+
+ access(o) {
+ return o.#m();
+ }
+ }
+
+ let c = new C();
+ return c;
+};
+
+let c1 = createAndInstantiateClass();
+let c2 = createAndInstantiateClass();
+
+assert.sameValue(c1.access(c1), 'test262');
+assert.sameValue(c2.access(c2), 'test262');
+
+assert.throws(TypeError, function() {
+ c1.access(c2);
+}, 'invalid access of c1 private method');
+
+assert.throws(TypeError, function() {
+ c2.access(c1);
+}, 'invalid access of c2 private method');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-method-brand-check-super-class.js b/js/src/tests/test262/language/statements/class/elements/private-method-brand-check-super-class.js
new file mode 100644
index 0000000000..76387409ab
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-method-brand-check-super-class.js
@@ -0,0 +1,50 @@
+// Copyright (C) 2019 Caio Lima (Igalia SL). All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: Subclass can access private methods of a superclass (private method)
+esid: sec-privatefieldget
+info: |
+ SuperCall : super Arguments
+ ...
+ 10. Perform ? InitializeInstanceElements(result, F).
+ ...
+
+ InitializeInstanceFieldsElements ( O, constructor )
+ 1. Assert: Type ( O ) is Object.
+ 2. Assert: Assert constructor is an ECMAScript function object.
+ 3. If constructor.[[PrivateBrand]] is not undefined,
+ a. Perform ? PrivateBrandAdd(O, constructor.[[PrivateBrand]]).
+ 4. Let fieldRecords be the value of constructor's [[Fields]] internal slot.
+ 5. For each item fieldRecord in order from fieldRecords,
+ a. Perform ? DefineField(O, fieldRecord).
+ 6. Return.
+features: [class, class-methods-private]
+---*/
+
+class S {
+ #method() { return 'super class'; }
+
+ superAccess() { return this.#method(); }
+}
+
+class C extends S {
+ #method() { return 'test262'; }
+
+ access() {
+ return this.#method();
+ }
+}
+
+let c = new C();
+
+assert.sameValue(c.access(), 'test262');
+assert.sameValue(c.superAccess(), 'super class');
+
+let s = new S();
+assert.sameValue(s.superAccess(), 'super class');
+assert.throws(TypeError, function() {
+ c.access.call(s);
+}, 'invalid access of C private method');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-method-brand-check.js b/js/src/tests/test262/language/statements/class/elements/private-method-brand-check.js
new file mode 100644
index 0000000000..29d0a0ddec
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-method-brand-check.js
@@ -0,0 +1,47 @@
+// Copyright (C) 2019 Caio Lima (Igalia SL). All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: PrivateBrandCheck fails when the object O doesn't have P.[[Brand]] (private method)
+esid: sec-privatefieldget
+info: |
+ PrivateFieldGet (P, O)
+ 1. Assert: P is a Private Name.
+ 2. If O is not an object, throw a TypeError exception.
+ 3. If P.[[Kind]] is "field",
+ a. Let entry be PrivateFieldFind(P, O).
+ b. If entry is empty, throw a TypeError exception.
+ c. Return entry.[[PrivateFieldValue]].
+ 4. Perform ? PrivateBrandCheck(O, P).
+ 5. If P.[[Kind]] is "method",
+ a. Return P.[[Value]].
+ 6. Else,
+ a. Assert: P.[[Kind]] is "accessor".
+ b. If P does not have a [[Get]] field, throw a TypeError exception.
+ c. Let getter be P.[[Get]].
+ d. Return ? Call(getter, O).
+
+ PrivateBrandCheck(O, P)
+ 1. If O.[[PrivateBrands]] does not contain an entry e such that SameValue(e, P.[[Brand]]) is true,
+ a. Throw a TypeError exception.
+features: [class, class-methods-private]
+---*/
+
+class C {
+ #m() { return 'test262'; }
+
+ access(o) {
+ return o.#m();
+ }
+}
+
+let c = new C();
+assert.sameValue(c.access(c), 'test262');
+
+let o = {};
+assert.throws(TypeError, function() {
+ c.access(o);
+}, 'invalid access a private method');
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-method-comparison-multiple-evaluations-of-class.js b/js/src/tests/test262/language/statements/class/elements/private-method-comparison-multiple-evaluations-of-class.js
new file mode 100644
index 0000000000..5e63ac2f19
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-method-comparison-multiple-evaluations-of-class.js
@@ -0,0 +1,47 @@
+// Copyright (C) 2019 Caio Lima (Igalia SL). All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: Every new evaluation of a class creates a different brand (private getter)
+esid: sec-privatefieldget
+info: |
+ PrivateFieldGet (P, O)
+ 1. Assert: P is a Private Name.
+ 2. If O is not an object, throw a TypeError exception.
+ 3. If P.[[Kind]] is "field",
+ a. Let entry be PrivateFieldFind(P, O).
+ b. If entry is empty, throw a TypeError exception.
+ c. Return entry.[[PrivateFieldValue]].
+ 4. Perform ? PrivateBrandCheck(O, P).
+ 5. If P.[[Kind]] is "method",
+ a. Return P.[[Value]].
+ 6. Else,
+ a. Assert: P.[[Kind]] is "accessor".
+ b. If P does not have a [[Get]] field, throw a TypeError exception.
+ c. Let getter be P.[[Get]].
+ d. Return ? Call(getter, O).
+
+ PrivateBrandCheck(O, P)
+ 1. If O.[[PrivateBrands]] does not contain an entry e such that SameValue(e, P.[[Brand]]) is true,
+ a. Throw a TypeError exception.
+features: [class, class-methods-private]
+---*/
+
+let createAndInstantiateClass = function () {
+ class C {
+ #m() { return 'test262'; }
+
+ getPrivateMethod() {
+ return this.#m;
+ }
+ }
+
+ return new C();
+};
+
+let c1 = createAndInstantiateClass();
+let c2 = createAndInstantiateClass();
+
+assert.notSameValue(c1.getPrivateMethod(), c2.getPrivateMethod());
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-method-comparison.js b/js/src/tests/test262/language/statements/class/elements/private-method-comparison.js
new file mode 100644
index 0000000000..94b8d120bb
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-method-comparison.js
@@ -0,0 +1,47 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-method-comparison.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: PrivateFieldGet of a private method returns the same function object to every instance of the same class (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class, class-methods-private]
+flags: [generated]
+info: |
+ PrivateFieldGet (P, O)
+ 1. Assert: P is a Private Name.
+ 2. If O is not an object, throw a TypeError exception.
+ 3. If P.[[Kind]] is "field",
+ a. Let entry be PrivateFieldFind(P, O).
+ b. If entry is empty, throw a TypeError exception.
+ c. Return entry.[[PrivateFieldValue]].
+ 4. Perform ? PrivateBrandCheck(O, P).
+ 5. If P.[[Kind]] is "method",
+ a. Return P.[[Value]].
+ 6. Else,
+ a. Assert: P.[[Kind]] is "accessor".
+ b. If P does not have a [[Get]] field, throw a TypeError exception.
+ c. Let getter be P.[[Get]].
+ d. Return ? Call(getter, O).
+
+ PrivateBrandCheck(O, P)
+ 1. If O.[[PrivateBrands]] does not contain an entry e such that SameValue(e, P.[[Brand]]) is true,
+ a. Throw a TypeError exception.
+
+---*/
+
+
+class C {
+ #m() { return 'test262'; }
+
+ getPrivateMethod() {
+ return this.#m;
+ }
+
+}
+
+let c1 = new C();
+let c2 = new C();
+
+assert.sameValue(c1.getPrivateMethod(), c2.getPrivateMethod());
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-method-double-initialisation-get-and-set.js b/js/src/tests/test262/language/statements/class/elements/private-method-double-initialisation-get-and-set.js
new file mode 100644
index 0000000000..09ab4f46c9
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-method-double-initialisation-get-and-set.js
@@ -0,0 +1,37 @@
+// Copyright (C) 2021 André Bargull. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: >
+ Throws TypeError when attempting to install private methods multiple times.
+esid: sec-privatemethodoraccessoradd
+info: |
+ 7.3.28 PrivateMethodOrAccessorAdd ( method, O )
+ 1. Assert: method.[[Kind]] is either method or accessor.
+ 2. Let entry be ! PrivateElementFind(method.[[Key]], O).
+ 3. If entry is not empty, throw a TypeError exception.
+ ...
+
+features: [class, class-methods-private]
+---*/
+
+class Base {
+ constructor(o) {
+ return o;
+ }
+}
+
+class C extends Base {
+ get #p() {}
+ set #p(x) {}
+}
+
+var obj = {};
+
+new C(obj);
+
+assert.throws(TypeError, function() {
+ new C(obj);
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-method-double-initialisation-get.js b/js/src/tests/test262/language/statements/class/elements/private-method-double-initialisation-get.js
new file mode 100644
index 0000000000..7669951721
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-method-double-initialisation-get.js
@@ -0,0 +1,36 @@
+// Copyright (C) 2021 André Bargull. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: >
+ Throws TypeError when attempting to install private methods multiple times.
+esid: sec-privatemethodoraccessoradd
+info: |
+ 7.3.28 PrivateMethodOrAccessorAdd ( method, O )
+ 1. Assert: method.[[Kind]] is either method or accessor.
+ 2. Let entry be ! PrivateElementFind(method.[[Key]], O).
+ 3. If entry is not empty, throw a TypeError exception.
+ ...
+
+features: [class, class-methods-private]
+---*/
+
+class Base {
+ constructor(o) {
+ return o;
+ }
+}
+
+class C extends Base {
+ get #p() {}
+}
+
+var obj = {};
+
+new C(obj);
+
+assert.throws(TypeError, function() {
+ new C(obj);
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-method-double-initialisation-set.js b/js/src/tests/test262/language/statements/class/elements/private-method-double-initialisation-set.js
new file mode 100644
index 0000000000..41a8f92878
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-method-double-initialisation-set.js
@@ -0,0 +1,36 @@
+// Copyright (C) 2021 André Bargull. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: >
+ Throws TypeError when attempting to install private methods multiple times.
+esid: sec-privatemethodoraccessoradd
+info: |
+ 7.3.28 PrivateMethodOrAccessorAdd ( method, O )
+ 1. Assert: method.[[Kind]] is either method or accessor.
+ 2. Let entry be ! PrivateElementFind(method.[[Key]], O).
+ 3. If entry is not empty, throw a TypeError exception.
+ ...
+
+features: [class, class-methods-private]
+---*/
+
+class Base {
+ constructor(o) {
+ return o;
+ }
+}
+
+class C extends Base {
+ set #p(x) {}
+}
+
+var obj = {};
+
+new C(obj);
+
+assert.throws(TypeError, function() {
+ new C(obj);
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-method-double-initialisation.js b/js/src/tests/test262/language/statements/class/elements/private-method-double-initialisation.js
new file mode 100644
index 0000000000..cef42e6c13
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-method-double-initialisation.js
@@ -0,0 +1,36 @@
+// Copyright (C) 2021 André Bargull. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: >
+ Throws TypeError when attempting to install private methods multiple times.
+esid: sec-privatemethodoraccessoradd
+info: |
+ 7.3.28 PrivateMethodOrAccessorAdd ( method, O )
+ 1. Assert: method.[[Kind]] is either method or accessor.
+ 2. Let entry be ! PrivateElementFind(method.[[Key]], O).
+ 3. If entry is not empty, throw a TypeError exception.
+ ...
+
+features: [class, class-methods-private]
+---*/
+
+class Base {
+ constructor(o) {
+ return o;
+ }
+}
+
+class C extends Base {
+ #m() {}
+}
+
+var obj = {};
+
+new C(obj);
+
+assert.throws(TypeError, function() {
+ new C(obj);
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-method-get-and-call.js b/js/src/tests/test262/language/statements/class/elements/private-method-get-and-call.js
new file mode 100644
index 0000000000..863eb31b80
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-method-get-and-call.js
@@ -0,0 +1,49 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-method-get-and-call.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: Function returned by a private method can be called with other values as 'this' (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class, class-methods-private]
+flags: [generated]
+info: |
+ PrivateFieldGet (P, O)
+ 1. Assert: P is a Private Name.
+ 2. If O is not an object, throw a TypeError exception.
+ 3. If P.[[Kind]] is "field",
+ a. Let entry be PrivateFieldFind(P, O).
+ b. If entry is empty, throw a TypeError exception.
+ c. Return entry.[[PrivateFieldValue]].
+ 4. Perform ? PrivateBrandCheck(O, P).
+ 5. If P.[[Kind]] is "method",
+ a. Return P.[[Value]].
+ 6. Else,
+ a. Assert: P.[[Kind]] is "accessor".
+ b. If P does not have a [[Get]] field, throw a TypeError exception.
+ c. Let getter be P.[[Get]].
+ d. Return ? Call(getter, O).
+
+ PrivateBrandCheck(O, P)
+ 1. If O.[[PrivateBrands]] does not contain an entry e such that SameValue(e, P.[[Brand]]) is true,
+ a. Throw a TypeError exception.
+
+---*/
+
+
+class C {
+ #m() { return this._v; }
+
+ getPrivateMethod() {
+ return this.#m;
+ }
+
+}
+
+let c = new C();
+
+let o1 = {_v: 'test262'};
+let o2 = {_v: 'foo'};
+assert.sameValue(c.getPrivateMethod().call(o1), 'test262');
+assert.sameValue(c.getPrivateMethod().call(o2), 'foo');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-method-is-not-a-own-property.js b/js/src/tests/test262/language/statements/class/elements/private-method-is-not-a-own-property.js
new file mode 100644
index 0000000000..1998389348
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-method-is-not-a-own-property.js
@@ -0,0 +1,45 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-method-is-not-a-own-property.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: Private method is not stored as an own property of objects (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-methods-private, class]
+flags: [generated]
+info: |
+ PrivateFieldGet (P, O)
+ 1. Assert: P is a Private Name.
+ 2. If O is not an object, throw a TypeError exception.
+ 3. If P.[[Kind]] is "field",
+ a. Let entry be PrivateFieldFind(P, O).
+ b. If entry is empty, throw a TypeError exception.
+ c. Return entry.[[PrivateFieldValue]].
+ 4. Perform ? PrivateBrandCheck(O, P).
+ 5. If P.[[Kind]] is "method",
+ a. Return P.[[Value]].
+ 6. Else,
+ a. Assert: P.[[Kind]] is "accessor".
+ b. If P does not have a [[Get]] field, throw a TypeError exception.
+ c. Let getter be P.[[Get]].
+ d. Return ? Call(getter, O).
+
+---*/
+
+
+class C {
+ #m() { return "Test262"; }
+
+ checkPrivateMethod() {
+ assert.sameValue(this.hasOwnProperty("#m"), false);
+ assert.sameValue("#m" in this, false);
+
+ assert.sameValue(this.#m(), "Test262");
+
+ return 0;
+ }
+}
+
+let c = new C();
+assert.sameValue(c.checkPrivateMethod(), 0);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-method-is-not-clobbered-by-computed-property.js b/js/src/tests/test262/language/statements/class/elements/private-method-is-not-clobbered-by-computed-property.js
new file mode 100644
index 0000000000..381b1cd6fb
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-method-is-not-clobbered-by-computed-property.js
@@ -0,0 +1,45 @@
+// Copyright (C) 2019 Caio Lima (Igalia SL). All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: Private method is not clobbered by computed property
+esid: sec-privatefieldget
+info: |
+ PrivateFieldGet (P, O)
+ 1. Assert: P is a Private Name.
+ 2. If O is not an object, throw a TypeError exception.
+ 3. If P.[[Kind]] is "field",
+ a. Let entry be PrivateFieldFind(P, O).
+ b. If entry is empty, throw a TypeError exception.
+ c. Return entry.[[PrivateFieldValue]].
+ 4. Perform ? PrivateBrandCheck(O, P).
+ 5. If P.[[Kind]] is "method",
+ a. Return P.[[Value]].
+ 6. Else,
+ a. Assert: P.[[Kind]] is "accessor".
+ b. If P does not have a [[Get]] field, throw a TypeError exception.
+ c. Let getter be P.[[Get]].
+ d. Return ? Call(getter, O).
+features: [class-methods-private, class-fields-public, class]
+---*/
+
+class C {
+ #m() { return "Test262"; }
+ ["#m"] = 0;
+
+ checkPrivateMethod() {
+ assert.sameValue(this.hasOwnProperty("#m"), true);
+ assert.sameValue("#m" in this, true);
+
+ assert.sameValue(this["#m"], 0);
+
+ assert.sameValue(this.#m(), "Test262");
+
+ return 0;
+ }
+}
+
+let c = new C();
+assert.sameValue(c.checkPrivateMethod(), 0);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-method-is-visible-in-computed-properties.js b/js/src/tests/test262/language/statements/class/elements/private-method-is-visible-in-computed-properties.js
new file mode 100644
index 0000000000..2c85c9c7a8
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-method-is-visible-in-computed-properties.js
@@ -0,0 +1,34 @@
+// Copyright (C) 2019 Caio Lima (Igalia SL). All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: Private method of a class is visible in its ComputetProperty scope
+esid: prod-ClassTail
+info: |
+ ClassTail : ClassHeritage { ClassBody }
+ 1. Let lex be the LexicalEnvironment of the running execution context.
+ 2. Let classScope be NewDeclarativeEnvironment(lex).
+ 3. Let classScopeEnvRec be classScope's EnvironmentRecord.
+ ...
+ 15. Set the running execution context's LexicalEnvironment to classScope.
+ 16. Set the running execution context's PrivateEnvironment to classPrivateEnvironment.
+ ...
+ 27. For each ClassElement e in order from elements
+ a. If IsStatic of e is false, then
+ i. Let field be the result of ClassElementEvaluation for e with arguments proto and false.
+ ...
+features: [class-methods-private, class-fields-public, class]
+---*/
+
+assert.throws(TypeError, function() {
+ class C {
+ #m() {
+ throw new Test262Error();
+ }
+
+ [this.#m()] = 'Test262';
+ }
+}, 'access to a private method from ordinary object');
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-method-length.js b/js/src/tests/test262/language/statements/class/elements/private-method-length.js
new file mode 100644
index 0000000000..8e3f61770a
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-method-length.js
@@ -0,0 +1,49 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-method-length.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: Private methods have length property properly configured (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-methods-private, class]
+flags: [generated]
+info: |
+ Updated Productions
+
+ ClassElement : MethodDefinition
+ 1. Return ClassElementEvaluation of MethodDefinition with arguments ! Get(homeObject, "prototype"),enumerable, and "prototype".
+
+ ClassElement : static MethodDefinition
+ 1. Return ClassElementEvaluation of MethodDefinition with arguments homeObject, enumerable and "static".
+
+ MethodDefinition : ClassElementName( UniqueFormalParameters ) { FunctionBody }
+ 1. Let methodDef be DefineMethod of MethodDefinition with argument homeObject.
+ 2. ReturnIfAbrupt(methodDef).
+ 3. Perform ? DefineOrdinaryMethod(methodDef.[[Key]], homeObject, methodDef.[[Closure]], _enumerable).
+
+ ClassElement : MethodDefinition
+ ClassElement : static MethodDefinition
+ 1. Perform ? PropertyDefinitionEvaluation with parameters object and enumerable.
+ 2. Return empty.
+
+ MethodDefinition : ClassElementName (UniqueFormalParameters) { FunctionBody }
+ ...
+ 8. Let closure be FunctionCreate(kind, UniqueFormalParameters, FunctionBody, scope, privateScope, strict, prototype).
+ 9. Perform MakeMethod(closure, object).
+ 10. Return the Record{[[Key]]: propKey, [[Closure]]: closure}.
+
+---*/
+
+
+class C {
+ #method(a) {};
+
+ getPrivateMethod() {
+ return this.#method;
+ }
+
+}
+
+let c = new C();
+assert.sameValue(c.getPrivateMethod().length, 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-method-not-writable.js b/js/src/tests/test262/language/statements/class/elements/private-method-not-writable.js
new file mode 100644
index 0000000000..99346ae098
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-method-not-writable.js
@@ -0,0 +1,35 @@
+// Copyright (C) 2021 André Bargull. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: >
+ Throws TypeError when attempting to overwrite a private method.
+esid: sec-privateset
+info: |
+ 7.3.30 PrivateSet ( P, O, value )
+ 1. Let entry be ! PrivateElementFind(P, O).
+ 2. If entry is empty, throw a TypeError exception.
+ 3. If entry.[[Kind]] is field, then
+ ...
+ 4. Else if entry.[[Kind]] is method, then
+ a. Throw a TypeError exception.
+ 5. ...
+
+features: [class, class-methods-private]
+---*/
+
+class C {
+ #m() {}
+
+ assign() {
+ this.#m = 0;
+ }
+}
+
+var obj = new C();
+
+assert.throws(TypeError, function() {
+ obj.assign();
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-method-on-nested-class.js b/js/src/tests/test262/language/statements/class/elements/private-method-on-nested-class.js
new file mode 100644
index 0000000000..c378ce2ad1
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-method-on-nested-class.js
@@ -0,0 +1,38 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-method-on-nested-class.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: PrivateName of private method is available on inner classes (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-public, class]
+flags: [generated]
+info: |
+ Updated Productions
+
+ CallExpression[Yield, Await]:
+ CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+ SuperCall[?Yield, ?Await]
+ CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+ CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+ CallExpression[?Yield, ?Await].IdentifierName
+ CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+ CallExpression[?Yield, ?Await].PrivateName
+
+---*/
+
+
+class C {
+ #m() { return 'test262'; }
+
+ B = class {
+ method(o) {
+ return o.#m();
+ }
+ }
+}
+
+let c = new C();
+let innerB = new c.B();
+assert.sameValue(innerB.method(c), 'test262');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-method-referenced-from-static-method.js b/js/src/tests/test262/language/statements/class/elements/private-method-referenced-from-static-method.js
new file mode 100644
index 0000000000..d7e68cd59a
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-method-referenced-from-static-method.js
@@ -0,0 +1,40 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-method-referenced-from-static-method.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: Private method referenced from a static method (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-methods-private, class]
+flags: [generated]
+info: |
+ PrivateFieldGet (P, O)
+ 1. Assert: P is a Private Name.
+ 2. If O is not an object, throw a TypeError exception.
+ 3. If P.[[Kind]] is "field",
+ ...
+ 4. Perform ? PrivateBrandCheck(O, P).
+ 5. If P.[[Kind]] is "method",
+ a. Return P.[[Value]].
+ ...
+
+ PrivateBrandCheck(O, P)
+ 1. If O.[[PrivateBrands]] does not contain an entry e such that SameValue(e, P.[[Brand]]) is true,
+ a. Throw a TypeError exception.
+
+---*/
+
+
+class C {
+ #f() { return 42; }
+ static g() {
+ return this.#f();
+ }
+
+}
+
+assert.sameValue(C.g.call(new C()), 42);
+assert.throws(TypeError, function() {
+ C.g();
+}, 'Accessed private method from an object which did not contain it');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-method-shadowed-by-field-on-nested-class.js b/js/src/tests/test262/language/statements/class/elements/private-method-shadowed-by-field-on-nested-class.js
new file mode 100644
index 0000000000..4e93572bfa
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-method-shadowed-by-field-on-nested-class.js
@@ -0,0 +1,46 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-method-shadowed-by-field-on-nested-class.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: PrivateName of private method can be shadowed on inner classes by a private field (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class-fields-public, class]
+flags: [generated]
+info: |
+ Updated Productions
+
+ CallExpression[Yield, Await]:
+ CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+ SuperCall[?Yield, ?Await]
+ CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+ CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+ CallExpression[?Yield, ?Await].IdentifierName
+ CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+ CallExpression[?Yield, ?Await].PrivateName
+
+---*/
+
+
+class C {
+ #m() { return 'outer class'; }
+
+ method() { return this.#m(); }
+
+ B = class {
+ method(o) {
+ return o.#m;
+ }
+
+ #m = 'test262';
+ }
+}
+
+let c = new C();
+let innerB = new c.B();
+assert.sameValue(innerB.method(innerB), 'test262');
+assert.sameValue(c.method(), 'outer class');
+assert.throws(TypeError, function() {
+ innerB.method(c);
+}, 'accessed inner class field from an object of outer class');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-method-shadowed-by-getter-on-nested-class.js b/js/src/tests/test262/language/statements/class/elements/private-method-shadowed-by-getter-on-nested-class.js
new file mode 100644
index 0000000000..90f322a91c
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-method-shadowed-by-getter-on-nested-class.js
@@ -0,0 +1,49 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-method-shadowed-by-getter-on-nested-class.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: PrivateName of private method can be shadowed on inner classes by a private getter (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-public, class]
+flags: [generated]
+info: |
+ Updated Productions
+
+ CallExpression[Yield, Await]:
+ CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+ SuperCall[?Yield, ?Await]
+ CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+ CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+ CallExpression[?Yield, ?Await].IdentifierName
+ CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+ CallExpression[?Yield, ?Await].PrivateName
+
+---*/
+
+
+class C {
+ #m() { return 'outer class'; }
+
+ method() { return this.#m(); }
+
+ B = class {
+ method(o) {
+ return o.#m;
+ }
+
+ get #m() { return 'test262'; }
+ }
+}
+
+let c = new C();
+let innerB = new c.B();
+assert.sameValue(innerB.method(innerB), 'test262');
+assert.sameValue(c.method(), 'outer class');
+assert.throws(TypeError, function() {
+ innerB.method(c);
+}, 'accessed inner class getter from an object of outer class');
+assert.throws(TypeError, function() {
+ C.prototype.method.call(innerB);
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-method-shadowed-by-setter-on-nested-class.js b/js/src/tests/test262/language/statements/class/elements/private-method-shadowed-by-setter-on-nested-class.js
new file mode 100644
index 0000000000..80a379e3c6
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-method-shadowed-by-setter-on-nested-class.js
@@ -0,0 +1,51 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-method-shadowed-by-setter-on-nested-class.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: PrivateName of private method can be shadowed on inner classes by a private setter (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-public, class]
+flags: [generated]
+info: |
+ Updated Productions
+
+ CallExpression[Yield, Await]:
+ CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+ SuperCall[?Yield, ?Await]
+ CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+ CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+ CallExpression[?Yield, ?Await].IdentifierName
+ CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+ CallExpression[?Yield, ?Await].PrivateName
+
+---*/
+
+
+class C {
+ #m() { return 'outer class'; }
+
+ method() { return this.#m(); }
+
+ B = class {
+ method(o) {
+ return o.#m;
+ }
+
+ set #m(v) { this._v = v; }
+ }
+}
+
+let c = new C();
+let innerB = new c.B();
+
+assert.throws(TypeError, function() {
+ innerB.method(innerB);
+}, '[[Get]] operation of an accessor without getter');
+
+assert.sameValue(c.method(), 'outer class');
+
+assert.throws(TypeError, function() {
+ innerB.method(c);
+}, 'access of inner class accessor from an object of outer class');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-method-shadowed-on-nested-class.js b/js/src/tests/test262/language/statements/class/elements/private-method-shadowed-on-nested-class.js
new file mode 100644
index 0000000000..071ab0c649
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-method-shadowed-on-nested-class.js
@@ -0,0 +1,40 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-method-shadowed-on-nested-class.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: PrivateName of private method can be shadowed by inner class private method (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-public, class]
+flags: [generated]
+info: |
+ Updated Productions
+
+ CallExpression[Yield, Await]:
+ CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+ SuperCall[?Yield, ?Await]
+ CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+ CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+ CallExpression[?Yield, ?Await].IdentifierName
+ CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+ CallExpression[?Yield, ?Await].PrivateName
+
+---*/
+
+
+class C {
+ #m() { throw new Test262Error(); }
+
+ B = class {
+ method() {
+ return this.#m();
+ }
+
+ #m() { return 'test262'; }
+ }
+}
+
+let c = new C();
+let innerB = new c.B();
+assert.sameValue(innerB.method(), 'test262');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-method-visible-to-direct-eval-on-initializer.js b/js/src/tests/test262/language/statements/class/elements/private-method-visible-to-direct-eval-on-initializer.js
new file mode 100644
index 0000000000..a67f1ead92
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-method-visible-to-direct-eval-on-initializer.js
@@ -0,0 +1,49 @@
+// Copyright (C) 2019 Caio Lima (Igalia SL). All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: Private method is visible on initializer with direct eval
+esid: sec-privatefieldget
+info: |
+ PrivateFieldGet (P, O)
+ 1. Assert: P is a Private Name.
+ 2. If O is not an object, throw a TypeError exception.
+ 3. If P.[[Kind]] is "field",
+ a. Let entry be PrivateFieldFind(P, O).
+ b. If entry is empty, throw a TypeError exception.
+ c. Return entry.[[PrivateFieldValue]].
+ 4. Perform ? PrivateBrandCheck(O, P).
+ 5. If P.[[Kind]] is "method",
+ a. Return P.[[Value]].
+ 6. Else,
+ a. Assert: P.[[Kind]] is "accessor".
+ b. If P does not have a [[Get]] field, throw a TypeError exception.
+ c. Let getter be P.[[Get]].
+ d. Return ? Call(getter, O).
+
+ ClassElementName : PrivateIdentifier
+ 1. Let privateIdentifier be StringValue of PrivateIdentifier.
+ 2. Let privateName be NewPrivateName(privateIdentifier).
+ 3. Let scope be the running execution context's PrivateEnvironment.
+ 4. Let scopeEnvRec be scope's EnvironmentRecord.
+ 5. Perform ! scopeEnvRec.InitializeBinding(privateIdentifier, privateName).
+ 6. Return privateName.
+
+ MakePrivateReference ( baseValue, privateIdentifier )
+ 1. Let env be the running execution context's PrivateEnvironment.
+ 2. Let privateNameBinding be ? ResolveBinding(privateIdentifier, env).
+ 3. Let privateName be GetValue(privateNameBinding).
+ 4. Assert: privateName is a Private Name.
+ 5. Return a value of type Reference whose base value is baseValue, whose referenced name is privateName, whose strict reference flag is true.
+features: [class-methods-private, class-fields-public, class]
+---*/
+
+class C {
+ #m() { return "Test262"; };
+ v = eval("this.#m()");
+}
+
+let c = new C();
+assert.sameValue(c.v, "Test262");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-method-visible-to-direct-eval.js b/js/src/tests/test262/language/statements/class/elements/private-method-visible-to-direct-eval.js
new file mode 100644
index 0000000000..d1d0a18614
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-method-visible-to-direct-eval.js
@@ -0,0 +1,61 @@
+// Copyright (C) 2019 Caio Lima (Igalia SL). All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: Private method is visible to direct eval code
+esid: sec-privatefieldget
+info: |
+ PrivateFieldGet (P, O)
+ 1. Assert: P is a Private Name.
+ 2. If O is not an object, throw a TypeError exception.
+ 3. If P.[[Kind]] is "field",
+ a. Let entry be PrivateFieldFind(P, O).
+ b. If entry is empty, throw a TypeError exception.
+ c. Return entry.[[PrivateFieldValue]].
+ 4. Perform ? PrivateBrandCheck(O, P).
+ 5. If P.[[Kind]] is "method",
+ a. Return P.[[Value]].
+ 6. Else,
+ a. Assert: P.[[Kind]] is "accessor".
+ b. If P does not have a [[Get]] field, throw a TypeError exception.
+ c. Let getter be P.[[Get]].
+ d. Return ? Call(getter, O).
+
+ ClassElementName : PrivateIdentifier
+ 1. Let privateIdentifier be StringValue of PrivateIdentifier.
+ 2. Let privateName be NewPrivateName(privateIdentifier).
+ 3. Let scope be the running execution context's PrivateEnvironment.
+ 4. Let scopeEnvRec be scope's EnvironmentRecord.
+ 5. Perform ! scopeEnvRec.InitializeBinding(privateIdentifier, privateName).
+ 6. Return privateName.
+
+ MakePrivateReference ( baseValue, privateIdentifier )
+ 1. Let env be the running execution context's PrivateEnvironment.
+ 2. Let privateNameBinding be ? ResolveBinding(privateIdentifier, env).
+ 3. Let privateName be GetValue(privateNameBinding).
+ 4. Assert: privateName is a Private Name.
+ 5. Return a value of type Reference whose base value is baseValue, whose referenced name is privateName, whose strict reference flag is true.
+features: [class-methods-private, class]
+---*/
+
+class C {
+ #m() { return "Test262"; };
+
+ getWithEval() {
+ return eval("this.#m()");
+ }
+}
+
+class D {
+ #m() { throw new Test262Error(); };
+}
+
+let c = new C();
+assert.sameValue(c.getWithEval(), "Test262");
+
+let d = new D();
+assert.throws(TypeError, function() {
+ c.getWithEval.call(d);
+}, "invalid access to a private method");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-methods/browser.js b/js/src/tests/test262/language/statements/class/elements/private-methods/browser.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-methods/browser.js
diff --git a/js/src/tests/test262/language/statements/class/elements/private-methods/prod-private-async-generator.js b/js/src/tests/test262/language/statements/class/elements/private-methods/prod-private-async-generator.js
new file mode 100644
index 0000000000..c703df72d4
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-methods/prod-private-async-generator.js
@@ -0,0 +1,134 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/prod-private-async-generator.case
+// - src/class-elements/private-methods/cls-decl.template
+/*---
+description: Private Async Generator (private method definitions in a class declaration)
+esid: prod-MethodDefinition
+features: [async-iteration, class, class-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ MethodDefinition :
+ ClassElementName ( UniqueFormalParameters ) { FunctionBody }
+ GeneratorMethod
+ AsyncMethod
+ AsyncGeneratorMethod
+ get ClassElementName () { FunctionBody }
+ set ClassElementName ( PropertySetParameterList ) { FunctionBody }
+
+ GeneratorMethod :
+ * ClassElementName ( UniqueFormalParameters ){GeneratorBody}
+
+ AsyncMethod :
+ async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ) { AsyncFunctionBody }
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here]* ClassElementName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+ ---
+
+ InitializeClassElements ( F, proto )
+
+ ...
+ 5. For each item element in order from elements,
+ a. Assert: If element.[[Placement]] is "prototype" or "static", then element.[[Key]] is not a Private Name.
+ b. If element.[[Kind]] is "method" and element.[[Placement]] is "static" or "prototype",
+ i. Let receiver be F if element.[[Placement]] is "static", else let receiver be proto.
+ ii. Perform ? DefineClassElement(receiver, element).
+
+ InitializeInstanceElements ( O, constructor )
+
+ ...
+ 3. Let elements be the value of F's [[Elements]] internal slot.
+ 4. For each item element in order from elements,
+ a. If element.[[Placement]] is "own" and element.[[Kind]] is "method",
+ i. Perform ? DefineClassElement(O, element).
+
+ DefineClassElement (receiver, element)
+
+ ...
+ 6. If key is a Private Name,
+ a. Perform ? PrivateFieldDefine(receiver, key, descriptor).
+
+ PrivateFieldDefine (P, O, desc)
+
+ ...
+ 6. Append { [[PrivateName]]: P, [[PrivateFieldDescriptor]]: desc } to O.[[PrivateFieldDescriptors]].
+
+---*/
+var ctorPromise;
+
+
+
+/*** template notes
+ * method should always be #m
+ * the template provides c.ref() for external reference
+ */
+
+function hasProp(obj, name, expected, msg) {
+ var hasOwnProperty = Object.prototype.hasOwnProperty.call(obj, name);
+ assert.sameValue(hasOwnProperty, expected, msg);
+
+ var hasProperty = Reflect.has(obj, name);
+ assert.sameValue(hasProperty, expected, msg);
+}
+
+class C {
+ async * #m() { return 42; }
+
+
+ get ref() { return this.#m; }
+
+ constructor() {
+ hasProp(this, '#m', false, 'private methods are defined in an special internal slot and cannot be found as own properties');
+ assert.sameValue(typeof this.#m, 'function');
+ assert.sameValue(this.ref, this.#m, 'returns the same value');
+ assert.sameValue(this.#m, (() => this)().#m, 'memberexpression and call expression forms');
+
+ var ctorIter = this.#m();
+ var p = ctorIter.next();
+ ctorPromise = p.then(({ value, done }) => {
+ assert.sameValue(value, 42, 'return from generator method, inside ctor');
+ assert.sameValue(done, true, 'iterator is done, inside ctor');
+ }, $DONE);
+ assert.sameValue(this.#m.name, '#m', 'function name inside constructor');
+
+ }
+}
+
+var c = new C();
+var other = new C();
+
+hasProp(C.prototype, '#m', false, 'method is not defined in the prototype');
+hasProp(C, '#m', false, 'method is not defined in the contructor');
+hasProp(c, '#m', false, 'method cannot be seen outside of the class');
+
+/***
+ * MethodDefinition : ClassElementName ( UniqueFormalParameters ) { FunctionBody }
+ *
+ * 1. Let methodDef be DefineMethod of MethodDefinition with argument homeObject.
+ * ...
+ */
+assert.sameValue(c.ref, other.ref, 'The method is defined once, and reused on every new instance');
+
+assert.sameValue(c.ref.name, '#m', 'function name is preserved external reference');
+ctorPromise.then(() => {
+ // gets the returned async iterator from #m
+ var iter = c.ref();
+ return iter.next().then(({ value, done }) => {
+ assert.sameValue(value, 42, 'return from generator method');
+ assert.sameValue(done, true, 'iterator is done');
+ });
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-methods/prod-private-async-method.js b/js/src/tests/test262/language/statements/class/elements/private-methods/prod-private-async-method.js
new file mode 100644
index 0000000000..fa42763d30
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-methods/prod-private-async-method.js
@@ -0,0 +1,129 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/prod-private-async-method.case
+// - src/class-elements/private-methods/cls-decl.template
+/*---
+description: Private Async Method (private method definitions in a class declaration)
+esid: prod-MethodDefinition
+features: [async-functions, class, class-methods-private]
+flags: [generated, async]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ MethodDefinition :
+ ClassElementName ( UniqueFormalParameters ) { FunctionBody }
+ GeneratorMethod
+ AsyncMethod
+ AsyncGeneratorMethod
+ get ClassElementName () { FunctionBody }
+ set ClassElementName ( PropertySetParameterList ) { FunctionBody }
+
+ GeneratorMethod :
+ * ClassElementName ( UniqueFormalParameters ){GeneratorBody}
+
+ AsyncMethod :
+ async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ) { AsyncFunctionBody }
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here]* ClassElementName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+ ---
+
+ InitializeClassElements ( F, proto )
+
+ ...
+ 5. For each item element in order from elements,
+ a. Assert: If element.[[Placement]] is "prototype" or "static", then element.[[Key]] is not a Private Name.
+ b. If element.[[Kind]] is "method" and element.[[Placement]] is "static" or "prototype",
+ i. Let receiver be F if element.[[Placement]] is "static", else let receiver be proto.
+ ii. Perform ? DefineClassElement(receiver, element).
+
+ InitializeInstanceElements ( O, constructor )
+
+ ...
+ 3. Let elements be the value of F's [[Elements]] internal slot.
+ 4. For each item element in order from elements,
+ a. If element.[[Placement]] is "own" and element.[[Kind]] is "method",
+ i. Perform ? DefineClassElement(O, element).
+
+ DefineClassElement (receiver, element)
+
+ ...
+ 6. If key is a Private Name,
+ a. Perform ? PrivateFieldDefine(receiver, key, descriptor).
+
+ PrivateFieldDefine (P, O, desc)
+
+ ...
+ 6. Append { [[PrivateName]]: P, [[PrivateFieldDescriptor]]: desc } to O.[[PrivateFieldDescriptors]].
+
+---*/
+var ctorPromise;
+
+
+
+/*** template notes
+ * method should always be #m
+ * the template provides c.ref() for external reference
+ */
+
+function hasProp(obj, name, expected, msg) {
+ var hasOwnProperty = Object.prototype.hasOwnProperty.call(obj, name);
+ assert.sameValue(hasOwnProperty, expected, msg);
+
+ var hasProperty = Reflect.has(obj, name);
+ assert.sameValue(hasProperty, expected, msg);
+}
+
+class C {
+ async #m() { return 42; }
+
+
+ get ref() { return this.#m; }
+
+ constructor() {
+ hasProp(this, '#m', false, 'private methods are defined in an special internal slot and cannot be found as own properties');
+ assert.sameValue(typeof this.#m, 'function');
+ assert.sameValue(this.ref, this.#m, 'returns the same value');
+ assert.sameValue(this.#m, (() => this)().#m, 'memberexpression and call expression forms');
+
+ assert.sameValue(this.#m.name, '#m', 'function name inside constructor');
+ ctorPromise = this.#m().then(value => {
+ assert.sameValue(value, 42, 'already defined in the ctor');
+ }, $DONE);
+
+ }
+}
+
+var c = new C();
+var other = new C();
+
+hasProp(C.prototype, '#m', false, 'method is not defined in the prototype');
+hasProp(C, '#m', false, 'method is not defined in the contructor');
+hasProp(c, '#m', false, 'method cannot be seen outside of the class');
+
+/***
+ * MethodDefinition : ClassElementName ( UniqueFormalParameters ) { FunctionBody }
+ *
+ * 1. Let methodDef be DefineMethod of MethodDefinition with argument homeObject.
+ * ...
+ */
+assert.sameValue(c.ref, other.ref, 'The method is defined once, and reused on every new instance');
+
+assert.sameValue(c.ref.name, '#m', 'function name is preserved external reference');
+ctorPromise.then(() => {
+ // gets the returned promise from #m
+ return c.ref().then(value => {
+ assert.sameValue(value, 42, 'function return');
+ });
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-methods/prod-private-generator.js b/js/src/tests/test262/language/statements/class/elements/private-methods/prod-private-generator.js
new file mode 100644
index 0000000000..4cd79a852d
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-methods/prod-private-generator.js
@@ -0,0 +1,126 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/prod-private-generator.case
+// - src/class-elements/private-methods/cls-decl.template
+/*---
+description: Private Generator (private method definitions in a class declaration)
+esid: prod-MethodDefinition
+features: [generators, class, class-methods-private]
+flags: [generated]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ MethodDefinition :
+ ClassElementName ( UniqueFormalParameters ) { FunctionBody }
+ GeneratorMethod
+ AsyncMethod
+ AsyncGeneratorMethod
+ get ClassElementName () { FunctionBody }
+ set ClassElementName ( PropertySetParameterList ) { FunctionBody }
+
+ GeneratorMethod :
+ * ClassElementName ( UniqueFormalParameters ){GeneratorBody}
+
+ AsyncMethod :
+ async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ) { AsyncFunctionBody }
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here]* ClassElementName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+ ---
+
+ InitializeClassElements ( F, proto )
+
+ ...
+ 5. For each item element in order from elements,
+ a. Assert: If element.[[Placement]] is "prototype" or "static", then element.[[Key]] is not a Private Name.
+ b. If element.[[Kind]] is "method" and element.[[Placement]] is "static" or "prototype",
+ i. Let receiver be F if element.[[Placement]] is "static", else let receiver be proto.
+ ii. Perform ? DefineClassElement(receiver, element).
+
+ InitializeInstanceElements ( O, constructor )
+
+ ...
+ 3. Let elements be the value of F's [[Elements]] internal slot.
+ 4. For each item element in order from elements,
+ a. If element.[[Placement]] is "own" and element.[[Kind]] is "method",
+ i. Perform ? DefineClassElement(O, element).
+
+ DefineClassElement (receiver, element)
+
+ ...
+ 6. If key is a Private Name,
+ a. Perform ? PrivateFieldDefine(receiver, key, descriptor).
+
+ PrivateFieldDefine (P, O, desc)
+
+ ...
+ 6. Append { [[PrivateName]]: P, [[PrivateFieldDescriptor]]: desc } to O.[[PrivateFieldDescriptors]].
+
+---*/
+
+
+/*** template notes
+ * method should always be #m
+ * the template provides c.ref() for external reference
+ */
+
+function hasProp(obj, name, expected, msg) {
+ var hasOwnProperty = Object.prototype.hasOwnProperty.call(obj, name);
+ assert.sameValue(hasOwnProperty, expected, msg);
+
+ var hasProperty = Reflect.has(obj, name);
+ assert.sameValue(hasProperty, expected, msg);
+}
+
+class C {
+ * #m() { return 42; }
+
+
+ get ref() { return this.#m; }
+
+ constructor() {
+ hasProp(this, '#m', false, 'private methods are defined in an special internal slot and cannot be found as own properties');
+ assert.sameValue(typeof this.#m, 'function');
+ assert.sameValue(this.ref, this.#m, 'returns the same value');
+ assert.sameValue(this.#m, (() => this)().#m, 'memberexpression and call expression forms');
+
+ var res = this.#m().next();
+ assert.sameValue(res.value, 42, 'return from generator method, inside ctor');
+ assert.sameValue(res.done, true, 'iterator is done, inside ctor');
+ assert.sameValue(this.#m.name, '#m', 'function name inside constructor');
+
+ }
+}
+
+var c = new C();
+var other = new C();
+
+hasProp(C.prototype, '#m', false, 'method is not defined in the prototype');
+hasProp(C, '#m', false, 'method is not defined in the contructor');
+hasProp(c, '#m', false, 'method cannot be seen outside of the class');
+
+/***
+ * MethodDefinition : ClassElementName ( UniqueFormalParameters ) { FunctionBody }
+ *
+ * 1. Let methodDef be DefineMethod of MethodDefinition with argument homeObject.
+ * ...
+ */
+assert.sameValue(c.ref, other.ref, 'The method is defined once, and reused on every new instance');
+
+// gets the returned iterator from #m
+var res = c.ref().next();
+assert.sameValue(res.value, 42, 'return from generator method');
+assert.sameValue(res.done, true, 'iterator is done');
+assert.sameValue(c.ref.name, '#m', 'function name is preserved external reference');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-methods/prod-private-method-initialize-order.js b/js/src/tests/test262/language/statements/class/elements/private-methods/prod-private-method-initialize-order.js
new file mode 100644
index 0000000000..a44bf73cd1
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-methods/prod-private-method-initialize-order.js
@@ -0,0 +1,141 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/prod-private-method-initialize-order.case
+// - src/class-elements/private-methods/cls-decl.template
+/*---
+description: Private methods are added before any field initializer is run, even if they appear textually later (private method definitions in a class declaration)
+esid: prod-MethodDefinition
+features: [class-methods-private, class-fields-private, class-fields-public, class]
+flags: [generated]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ MethodDefinition :
+ ClassElementName ( UniqueFormalParameters ) { FunctionBody }
+ GeneratorMethod
+ AsyncMethod
+ AsyncGeneratorMethod
+ get ClassElementName () { FunctionBody }
+ set ClassElementName ( PropertySetParameterList ) { FunctionBody }
+
+ GeneratorMethod :
+ * ClassElementName ( UniqueFormalParameters ){GeneratorBody}
+
+ AsyncMethod :
+ async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ) { AsyncFunctionBody }
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here]* ClassElementName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+ ---
+
+ InitializeClassElements ( F, proto )
+
+ ...
+ 5. For each item element in order from elements,
+ a. Assert: If element.[[Placement]] is "prototype" or "static", then element.[[Key]] is not a Private Name.
+ b. If element.[[Kind]] is "method" and element.[[Placement]] is "static" or "prototype",
+ i. Let receiver be F if element.[[Placement]] is "static", else let receiver be proto.
+ ii. Perform ? DefineClassElement(receiver, element).
+
+ InitializeInstanceElements ( O, constructor )
+
+ ...
+ 3. Let elements be the value of F's [[Elements]] internal slot.
+ 4. For each item element in order from elements,
+ a. If element.[[Placement]] is "own" and element.[[Kind]] is "method",
+ i. Perform ? DefineClassElement(O, element).
+
+ DefineClassElement (receiver, element)
+
+ ...
+ 6. If key is a Private Name,
+ a. Perform ? PrivateFieldDefine(receiver, key, descriptor).
+
+ PrivateFieldDefine (P, O, desc)
+
+ ...
+ 6. Append { [[PrivateName]]: P, [[PrivateFieldDescriptor]]: desc } to O.[[PrivateFieldDescriptors]].
+
+
+ InitializeInstanceElements ( O, constructor )
+ ...
+ 4. For each item element in order from elements,
+ a. If element.[[Placement]] is "own" and element.[[Kind]] is "method",
+ i. Perform ? DefineClassElement(O, element).
+ 5. For each item element in order from elements,
+ a. If element.[[Placement]] is "own" and element.[[Kind]] is "field",
+ i. Assert: element.[[Descriptor]] does not have a [[Value]], [[Get]] or [[Set]] slot.
+ ii. Perform ? DefineClassElement(O, element).
+ 6. Return.
+
+ EDITOR'S NOTE:
+ Value properties are added before initializers so that private methods are visible from all initializers.
+
+---*/
+
+
+/*** template notes
+ * method should always be #m
+ * the template provides c.ref() for external reference
+ */
+
+function hasProp(obj, name, expected, msg) {
+ var hasOwnProperty = Object.prototype.hasOwnProperty.call(obj, name);
+ assert.sameValue(hasOwnProperty, expected, msg);
+
+ var hasProperty = Reflect.has(obj, name);
+ assert.sameValue(hasProperty, expected, msg);
+}
+
+class C {
+ a = this.#m();
+
+ #m() { return 42; }
+ get bGetter() { return this.#b; }
+
+ #b = this.#m();
+
+
+ get ref() { return this.#m; }
+
+ constructor() {
+ hasProp(this, '#m', false, 'private methods are defined in an special internal slot and cannot be found as own properties');
+ assert.sameValue(typeof this.#m, 'function');
+ assert.sameValue(this.ref, this.#m, 'returns the same value');
+ assert.sameValue(this.#m, (() => this)().#m, 'memberexpression and call expression forms');
+
+ assert.sameValue(this.a, 42);
+ assert.sameValue(this.#b, 42);
+
+ }
+}
+
+var c = new C();
+var other = new C();
+
+hasProp(C.prototype, '#m', false, 'method is not defined in the prototype');
+hasProp(C, '#m', false, 'method is not defined in the contructor');
+hasProp(c, '#m', false, 'method cannot be seen outside of the class');
+
+/***
+ * MethodDefinition : ClassElementName ( UniqueFormalParameters ) { FunctionBody }
+ *
+ * 1. Let methodDef be DefineMethod of MethodDefinition with argument homeObject.
+ * ...
+ */
+assert.sameValue(c.ref, other.ref, 'The method is defined once, and reused on every new instance');
+
+assert.sameValue(c.a, 42);
+assert.sameValue(c.bGetter, 42);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-methods/prod-private-method.js b/js/src/tests/test262/language/statements/class/elements/private-methods/prod-private-method.js
new file mode 100644
index 0000000000..77c16e2a58
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-methods/prod-private-method.js
@@ -0,0 +1,122 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/prod-private-method.case
+// - src/class-elements/private-methods/cls-decl.template
+/*---
+description: Private Method (private method definitions in a class declaration)
+esid: prod-MethodDefinition
+features: [class, class-methods-private]
+flags: [generated]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ MethodDefinition :
+ ClassElementName ( UniqueFormalParameters ) { FunctionBody }
+ GeneratorMethod
+ AsyncMethod
+ AsyncGeneratorMethod
+ get ClassElementName () { FunctionBody }
+ set ClassElementName ( PropertySetParameterList ) { FunctionBody }
+
+ GeneratorMethod :
+ * ClassElementName ( UniqueFormalParameters ){GeneratorBody}
+
+ AsyncMethod :
+ async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ) { AsyncFunctionBody }
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here]* ClassElementName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+ ---
+
+ InitializeClassElements ( F, proto )
+
+ ...
+ 5. For each item element in order from elements,
+ a. Assert: If element.[[Placement]] is "prototype" or "static", then element.[[Key]] is not a Private Name.
+ b. If element.[[Kind]] is "method" and element.[[Placement]] is "static" or "prototype",
+ i. Let receiver be F if element.[[Placement]] is "static", else let receiver be proto.
+ ii. Perform ? DefineClassElement(receiver, element).
+
+ InitializeInstanceElements ( O, constructor )
+
+ ...
+ 3. Let elements be the value of F's [[Elements]] internal slot.
+ 4. For each item element in order from elements,
+ a. If element.[[Placement]] is "own" and element.[[Kind]] is "method",
+ i. Perform ? DefineClassElement(O, element).
+
+ DefineClassElement (receiver, element)
+
+ ...
+ 6. If key is a Private Name,
+ a. Perform ? PrivateFieldDefine(receiver, key, descriptor).
+
+ PrivateFieldDefine (P, O, desc)
+
+ ...
+ 6. Append { [[PrivateName]]: P, [[PrivateFieldDescriptor]]: desc } to O.[[PrivateFieldDescriptors]].
+
+---*/
+
+
+/*** template notes
+ * method should always be #m
+ * the template provides c.ref() for external reference
+ */
+
+function hasProp(obj, name, expected, msg) {
+ var hasOwnProperty = Object.prototype.hasOwnProperty.call(obj, name);
+ assert.sameValue(hasOwnProperty, expected, msg);
+
+ var hasProperty = Reflect.has(obj, name);
+ assert.sameValue(hasProperty, expected, msg);
+}
+
+class C {
+ #m() { return 42; }
+
+
+ get ref() { return this.#m; }
+
+ constructor() {
+ hasProp(this, '#m', false, 'private methods are defined in an special internal slot and cannot be found as own properties');
+ assert.sameValue(typeof this.#m, 'function');
+ assert.sameValue(this.ref, this.#m, 'returns the same value');
+ assert.sameValue(this.#m, (() => this)().#m, 'memberexpression and call expression forms');
+
+ assert.sameValue(this.#m(), 42, 'already defined in the ctor');
+ assert.sameValue(this.#m.name, '#m', 'function name inside constructor');
+
+ }
+}
+
+var c = new C();
+var other = new C();
+
+hasProp(C.prototype, '#m', false, 'method is not defined in the prototype');
+hasProp(C, '#m', false, 'method is not defined in the contructor');
+hasProp(c, '#m', false, 'method cannot be seen outside of the class');
+
+/***
+ * MethodDefinition : ClassElementName ( UniqueFormalParameters ) { FunctionBody }
+ *
+ * 1. Let methodDef be DefineMethod of MethodDefinition with argument homeObject.
+ * ...
+ */
+assert.sameValue(c.ref, other.ref, 'The method is defined once, and reused on every new instance');
+
+// gets the returned value from #m
+assert.sameValue(c.ref(), 42, 'function return');
+assert.sameValue(c.ref.name, '#m', 'function name is preserved external reference');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-methods/shell.js b/js/src/tests/test262/language/statements/class/elements/private-methods/shell.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-methods/shell.js
diff --git a/js/src/tests/test262/language/statements/class/elements/private-setter-access-on-inner-arrow-function.js b/js/src/tests/test262/language/statements/class/elements/private-setter-access-on-inner-arrow-function.js
new file mode 100644
index 0000000000..beaec23a66
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-setter-access-on-inner-arrow-function.js
@@ -0,0 +1,44 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-setter-access-on-inner-arrow-function.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: PrivateName of private setter is visible on inner arrow function of class scope (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-methods-private, class]
+flags: [generated]
+info: |
+ Updated Productions
+
+ CallExpression[Yield, Await]:
+ CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+ SuperCall[?Yield, ?Await]
+ CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+ CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+ CallExpression[?Yield, ?Await].IdentifierName
+ CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+ CallExpression[?Yield, ?Await].PrivateName
+
+---*/
+
+
+class C {
+ set #m(v) { this._v = v; }
+
+ method() {
+ let arrowFunction = () => {
+ this.#m = 'Test262';
+ }
+
+ arrowFunction();
+ }
+}
+
+let c = new C();
+c.method();
+assert.sameValue(c._v, 'Test262');
+let o = {};
+assert.throws(TypeError, function() {
+ c.method.call(o);
+}, 'accessed private setter from an ordinary object');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-setter-access-on-inner-function.js b/js/src/tests/test262/language/statements/class/elements/private-setter-access-on-inner-function.js
new file mode 100644
index 0000000000..13dcd93871
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-setter-access-on-inner-function.js
@@ -0,0 +1,45 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-setter-access-on-inner-function.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: PrivateName of private setter is visible on inner function of class scope (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-methods-private, class]
+flags: [generated]
+info: |
+ Updated Productions
+
+ CallExpression[Yield, Await]:
+ CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+ SuperCall[?Yield, ?Await]
+ CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+ CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+ CallExpression[?Yield, ?Await].IdentifierName
+ CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+ CallExpression[?Yield, ?Await].PrivateName
+
+---*/
+
+
+class C {
+ set #m(v) { this._v = v; }
+
+ method() {
+ let self = this;
+ function innerFunction() {
+ self.#m = 'Test262';
+ }
+
+ innerFunction();
+ }
+}
+
+let c = new C();
+c.method();
+assert.sameValue(c._v, 'Test262');
+let o = {};
+assert.throws(TypeError, function() {
+ c.method.call(o);
+}, 'accessed private setter from an ordinary object');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-setter-brand-check-multiple-evaluations-of-class.js b/js/src/tests/test262/language/statements/class/elements/private-setter-brand-check-multiple-evaluations-of-class.js
new file mode 100644
index 0000000000..d4c179fb0e
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-setter-brand-check-multiple-evaluations-of-class.js
@@ -0,0 +1,51 @@
+// Copyright (C) 2019 Caio Lima (Igalia SL). All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: Every new evaluation of a class creates a different brand (private setter)
+esid: sec-privatefieldget
+info: |
+ ClassTail : ClassHeritage { ClassBody }
+ ...
+ 11. Let proto be ObjectCreate(protoParent).
+ ...
+ 31. If PrivateBoundIdentifiers of ClassBody contains a Private Name P such that the P's [[Kind]] field is either "method" or "accessor",
+ a. Set F.[[PrivateBrand]] to proto.
+ ...
+
+ PrivateBrandCheck(O, P)
+ 1. If O.[[PrivateBrands]] does not contain an entry e such that SameValue(e, P.[[Brand]]) is true,
+ a. Throw a TypeError exception.
+features: [class, class-methods-private]
+---*/
+
+let createAndInstantiateClass = function () {
+ class C {
+ set #m(v) { this._v = v; }
+
+ access(o, v) {
+ o.#m = v;
+ }
+ }
+
+ let c = new C();
+ return c;
+};
+
+let c1 = createAndInstantiateClass();
+let c2 = createAndInstantiateClass();
+
+c1.access(c1, 'test262');
+assert.sameValue(c1._v, 'test262');
+c2.access(c2, 'test262');
+assert.sameValue(c2._v, 'test262');
+
+assert.throws(TypeError, function() {
+ c1.access(c2, 'foo');
+}, 'invalid access of c1 private method');
+
+assert.throws(TypeError, function() {
+ c2.access(c1, 'foo');
+}, 'invalid access of c2 private method');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-setter-brand-check-super-class.js b/js/src/tests/test262/language/statements/class/elements/private-setter-brand-check-super-class.js
new file mode 100644
index 0000000000..87963f8f92
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-setter-brand-check-super-class.js
@@ -0,0 +1,55 @@
+// Copyright (C) 2019 Caio Lima (Igalia SL). All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: Subclass can access private methods of a superclass (private setter)
+esid: sec-privatefieldget
+info: |
+ SuperCall : super Arguments
+ ...
+ 10. Perform ? InitializeInstanceElements(result, F).
+ ...
+
+ InitializeInstanceFieldsElements ( O, constructor )
+ 1. Assert: Type ( O ) is Object.
+ 2. Assert: Assert constructor is an ECMAScript function object.
+ 3. If constructor.[[PrivateBrand]] is not undefined,
+ a. Perform ? PrivateBrandAdd(O, constructor.[[PrivateBrand]]).
+ 4. Let fieldRecords be the value of constructor's [[Fields]] internal slot.
+ 5. For each item fieldRecord in order from fieldRecords,
+ a. Perform ? DefineField(O, fieldRecord).
+ 6. Return.
+features: [class, class-methods-private]
+---*/
+
+class S {
+ set #m(v) { this._v = v }
+
+ superAccess(v) { this.#m = v; }
+}
+
+class C extends S {
+ set #m(v) { this._u = v; }
+
+ access(v) {
+ return this.#m = v;
+ }
+}
+
+let c = new C();
+
+c.access('test262');
+assert.sameValue(c._u, 'test262');
+
+c.superAccess('super class');
+assert.sameValue(c._v, 'super class');
+
+let s = new S();
+s.superAccess('super class')
+assert.sameValue(s._v, 'super class');
+
+assert.throws(TypeError, function() {
+ c.access.call(s, 'foo');
+}, 'invalid access of C private method');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-setter-brand-check.js b/js/src/tests/test262/language/statements/class/elements/private-setter-brand-check.js
new file mode 100644
index 0000000000..ba3e5ca66d
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-setter-brand-check.js
@@ -0,0 +1,48 @@
+// Copyright (C) 2019 Caio Lima (Igalia SL). All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: PrivateBrandCheck fails when the object O doesn't have P.[[Brand]] (private setter)
+esid: sec-privatefieldget
+info: |
+ PrivateFieldGet (P, O)
+ 1. Assert: P is a Private Name.
+ 2. If O is not an object, throw a TypeError exception.
+ 3. If P.[[Kind]] is "field",
+ a. Let entry be PrivateFieldFind(P, O).
+ b. If entry is empty, throw a TypeError exception.
+ c. Return entry.[[PrivateFieldValue]].
+ 4. Perform ? PrivateBrandCheck(O, P).
+ 5. If P.[[Kind]] is "method",
+ a. Return P.[[Value]].
+ 6. Else,
+ a. Assert: P.[[Kind]] is "accessor".
+ b. If P does not have a [[Get]] field, throw a TypeError exception.
+ c. Let getter be P.[[Get]].
+ d. Return ? Call(getter, O).
+
+ PrivateBrandCheck(O, P)
+ 1. If O.[[PrivateBrands]] does not contain an entry e such that SameValue(e, P.[[Brand]]) is true,
+ a. Throw a TypeError exception.
+features: [class, class-methods-private]
+---*/
+
+class C {
+ set #m(v) { this._v = v; }
+
+ access(o, v) {
+ return o.#m = v;
+ }
+}
+
+let c = new C();
+c.access(c, 'test262');
+assert.sameValue(c._v, 'test262');
+
+let o = {};
+assert.throws(TypeError, function() {
+ c.access(o, 'foo');
+}, 'invalid access a private setter');
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-setter-is-not-a-own-property.js b/js/src/tests/test262/language/statements/class/elements/private-setter-is-not-a-own-property.js
new file mode 100644
index 0000000000..8deba4fe5c
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-setter-is-not-a-own-property.js
@@ -0,0 +1,48 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-setter-is-not-a-own-property.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: Private setter is not stored as an own property of objects (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-methods-private, class]
+flags: [generated]
+info: |
+ PrivateFieldGet (P, O)
+ 1. Assert: P is a Private Name.
+ 2. If O is not an object, throw a TypeError exception.
+ 3. If P.[[Kind]] is "field",
+ a. Let entry be PrivateFieldFind(P, O).
+ b. If entry is empty, throw a TypeError exception.
+ c. Return entry.[[PrivateFieldValue]].
+ 4. Perform ? PrivateBrandCheck(O, P).
+ 5. If P.[[Kind]] is "method",
+ a. Return P.[[Value]].
+ 6. Else,
+ a. Assert: P.[[Kind]] is "accessor".
+ b. If P does not have a [[Get]] field, throw a TypeError exception.
+ c. Let getter be P.[[Get]].
+ d. Return ? Call(getter, O).
+
+---*/
+
+
+class C {
+ set #m(v) { this._v = v; }
+
+ checkPrivateSetter() {
+ assert.sameValue(this.hasOwnProperty("#m"), false);
+ assert.sameValue("#m" in this, false);
+
+ assert.sameValue(this.__lookupSetter__("#m"), undefined);
+
+ this.#m = "Test262";
+ assert.sameValue(this._v, "Test262");
+
+ return 0;
+ }
+}
+
+let c = new C();
+assert.sameValue(c.checkPrivateSetter(), 0);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-setter-is-not-clobbered-by-computed-property.js b/js/src/tests/test262/language/statements/class/elements/private-setter-is-not-clobbered-by-computed-property.js
new file mode 100644
index 0000000000..50943ffbcb
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-setter-is-not-clobbered-by-computed-property.js
@@ -0,0 +1,46 @@
+// Copyright (C) 2019 Caio Lima (Igalia SL). All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: Private setter is not clobbered by computed property
+esid: sec-privatefieldget
+info: |
+ PrivateFieldGet (P, O)
+ 1. Assert: P is a Private Name.
+ 2. If O is not an object, throw a TypeError exception.
+ 3. If P.[[Kind]] is "field",
+ a. Let entry be PrivateFieldFind(P, O).
+ b. If entry is empty, throw a TypeError exception.
+ c. Return entry.[[PrivateFieldValue]].
+ 4. Perform ? PrivateBrandCheck(O, P).
+ 5. If P.[[Kind]] is "method",
+ a. Return P.[[Value]].
+ 6. Else,
+ a. Assert: P.[[Kind]] is "accessor".
+ b. If P does not have a [[Get]] field, throw a TypeError exception.
+ c. Let getter be P.[[Get]].
+ d. Return ? Call(getter, O).
+features: [class-methods-private, class-fields-public, class]
+---*/
+
+class C {
+ set #m(v) { this._v = v; }
+ ["#m"] = 0;
+
+ checkPrivateSetter() {
+ assert.sameValue(this.hasOwnProperty("#m"), true);
+ assert.sameValue("#m" in this, true);
+
+ assert.sameValue(this["#m"], 0);
+
+ this.#m = "Test262";
+ assert.sameValue(this._v, "Test262");
+
+ return 0;
+ }
+}
+
+let c = new C();
+assert.sameValue(c.checkPrivateSetter(), 0);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-setter-on-nested-class.js b/js/src/tests/test262/language/statements/class/elements/private-setter-on-nested-class.js
new file mode 100644
index 0000000000..c320048fc6
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-setter-on-nested-class.js
@@ -0,0 +1,39 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-setter-on-nested-class.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: PrivateName of private setter is available on inner classes (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-public, class]
+flags: [generated]
+info: |
+ Updated Productions
+
+ CallExpression[Yield, Await]:
+ CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+ SuperCall[?Yield, ?Await]
+ CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+ CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+ CallExpression[?Yield, ?Await].IdentifierName
+ CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+ CallExpression[?Yield, ?Await].PrivateName
+
+---*/
+
+
+class C {
+ set #m(v) { this._v = v; }
+
+ B = class {
+ method(o, v) {
+ o.#m = v;
+ }
+ }
+}
+
+let c = new C();
+let innerB = new c.B();
+innerB.method(c, 'test262');
+assert.sameValue(c._v, 'test262');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-setter-shadowed-by-field-on-nested-class.js b/js/src/tests/test262/language/statements/class/elements/private-setter-shadowed-by-field-on-nested-class.js
new file mode 100644
index 0000000000..ac88ecdd4e
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-setter-shadowed-by-field-on-nested-class.js
@@ -0,0 +1,53 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-setter-shadowed-by-field-on-nested-class.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: PrivateName of private setter can be shadowed on inner classes by a private field (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class-fields-public, class]
+flags: [generated]
+info: |
+ Updated Productions
+
+ CallExpression[Yield, Await]:
+ CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+ SuperCall[?Yield, ?Await]
+ CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+ CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+ CallExpression[?Yield, ?Await].IdentifierName
+ CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+ CallExpression[?Yield, ?Await].PrivateName
+
+---*/
+
+
+class C {
+ set #m(v) { this._v = v; }
+
+ method(v) { this.#m = v; }
+
+ B = class {
+ method(o, v) {
+ o.#m = v;
+ }
+
+ get m() { return this.#m; }
+
+ #m;
+ }
+}
+
+let c = new C();
+let innerB = new c.B();
+
+innerB.method(innerB, 'test262');
+assert.sameValue(innerB.m, 'test262');
+
+c.method('outer class');
+assert.sameValue(c._v, 'outer class');
+
+assert.throws(TypeError, function() {
+ innerB.method(c, 'foo');
+}, 'accessed inner class field from an object of outer class');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-setter-shadowed-by-getter-on-nested-class.js b/js/src/tests/test262/language/statements/class/elements/private-setter-shadowed-by-getter-on-nested-class.js
new file mode 100644
index 0000000000..b3cfc60c75
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-setter-shadowed-by-getter-on-nested-class.js
@@ -0,0 +1,52 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-setter-shadowed-by-getter-on-nested-class.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: PrivateName of private setter can be shadowed on inner classes by a private getter (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-public, class]
+flags: [generated]
+info: |
+ Updated Productions
+
+ CallExpression[Yield, Await]:
+ CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+ SuperCall[?Yield, ?Await]
+ CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+ CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+ CallExpression[?Yield, ?Await].IdentifierName
+ CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+ CallExpression[?Yield, ?Await].PrivateName
+
+---*/
+
+
+class C {
+ set #m(v) { this._v = v; }
+
+ method(v) { this.#m = v; }
+
+ B = class {
+ method(o, v) {
+ o.#m = v;
+ }
+
+ get #m() { return 'test262'; }
+ }
+}
+
+let c = new C();
+let innerB = new c.B();
+
+assert.throws(TypeError, function() {
+ innerB.method(innerB);
+}, 'invalid [[Set]] of an acessor without setter');
+
+c.method('outer class');
+assert.sameValue(c._v, 'outer class');
+
+assert.throws(TypeError, function() {
+ innerB.method(c);
+}, 'invalid access of inner class getter from an object of outer class');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-setter-shadowed-by-method-on-nested-class.js b/js/src/tests/test262/language/statements/class/elements/private-setter-shadowed-by-method-on-nested-class.js
new file mode 100644
index 0000000000..89d45ebf96
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-setter-shadowed-by-method-on-nested-class.js
@@ -0,0 +1,52 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-setter-shadowed-by-method-on-nested-class.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: PrivateName of private setter can be shadowed on inner class by a private method (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-public, class]
+flags: [generated]
+info: |
+ Updated Productions
+
+ CallExpression[Yield, Await]:
+ CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+ SuperCall[?Yield, ?Await]
+ CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+ CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+ CallExpression[?Yield, ?Await].IdentifierName
+ CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+ CallExpression[?Yield, ?Await].PrivateName
+
+---*/
+
+
+class C {
+ set #m(v) { this._v = v; }
+
+ method(v) { this.#m = v; }
+
+ B = class {
+ method(o, v) {
+ o.#m = v;
+ }
+
+ #m() { return 'test262'; }
+ }
+}
+
+let c = new C();
+let innerB = new c.B();
+
+assert.throws(TypeError, function() {
+ innerB.method(innerB, 'foo');
+}, 'invalid [[Set]] operation in a private method');
+
+c.method('outer class');
+assert.sameValue(c._v, 'outer class');
+
+assert.throws(TypeError, function() {
+ innerB.method(c);
+}, 'invalid access of inner class method from an object of outer class');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-setter-shadowed-by-setter-on-nested-class.js b/js/src/tests/test262/language/statements/class/elements/private-setter-shadowed-by-setter-on-nested-class.js
new file mode 100644
index 0000000000..45c1e77b82
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-setter-shadowed-by-setter-on-nested-class.js
@@ -0,0 +1,51 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-setter-shadowed-by-setter-on-nested-class.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: PrivateName of private setter can be shadowed on inner classes by a private setter (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-public, class]
+flags: [generated]
+info: |
+ Updated Productions
+
+ CallExpression[Yield, Await]:
+ CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+ SuperCall[?Yield, ?Await]
+ CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+ CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+ CallExpression[?Yield, ?Await].IdentifierName
+ CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+ CallExpression[?Yield, ?Await].PrivateName
+
+---*/
+
+
+class C {
+ set #m(v) { this._v = v; }
+
+ method(v) { this.#m = v; }
+
+ B = class {
+ method(o, v) {
+ o.#m = v;
+ }
+
+ set #m(v) { this._v = v; }
+ }
+}
+
+let c = new C();
+let innerB = new c.B();
+
+innerB.method(innerB, 'test262');
+assert.sameValue(innerB._v, 'test262');
+
+c.method('outer class');
+assert.sameValue(c._v, 'outer class');
+
+assert.throws(TypeError, function() {
+ innerB.method(c, 'foo');
+}, 'access of inner class accessor from an object of outer class');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-setter-visible-to-direct-eval-on-initializer.js b/js/src/tests/test262/language/statements/class/elements/private-setter-visible-to-direct-eval-on-initializer.js
new file mode 100644
index 0000000000..76eaad950f
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-setter-visible-to-direct-eval-on-initializer.js
@@ -0,0 +1,50 @@
+// Copyright (C) 2019 Caio Lima (Igalia SL). All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: Private setter is visible on initializer with direct eval
+esid: sec-privatefieldset
+info: |
+ PrivateFieldSet (P, O, value )
+ 1. Assert: P is a Private Name.
+ 2. If O is not an object, throw a TypeError exception.
+ 3. If P.[[Kind]] is "field",
+ a. Let entry be PrivateFieldFind(P, O).
+ b. If entry is empty, throw a TypeError exception.
+ c. Set entry.[[PrivateFieldValue]] to value.
+ d. Return.
+ 4. If P.[[Kind]] is "method", throw a TypeError exception.
+ 5. Else,
+ a. Assert: P.[[Kind]] is "accessor".
+ b. If O.[[PrivateFieldBrands]] does not contain P.[[Brand]], throw a TypeError exception.
+ c. If P does not have a [[Set]] field, throw a TypeError exception.
+ d. Let setter be P.[[Set]].
+ e. Perform ? Call(setter, O, value).
+ f. Return.
+
+ ClassElementName : PrivateIdentifier
+ 1. Let privateIdentifier be StringValue of PrivateIdentifier.
+ 2. Let privateName be NewPrivateName(privateIdentifier).
+ 3. Let scope be the running execution context's PrivateEnvironment.
+ 4. Let scopeEnvRec be scope's EnvironmentRecord.
+ 5. Perform ! scopeEnvRec.InitializeBinding(privateIdentifier, privateName).
+ 6. Return privateName.
+
+ MakePrivateReference ( baseValue, privateIdentifier )
+ 1. Let env be the running execution context's PrivateEnvironment.
+ 2. Let privateNameBinding be ? ResolveBinding(privateIdentifier, env).
+ 3. Let privateName be GetValue(privateNameBinding).
+ 4. Assert: privateName is a Private Name.
+ 5. Return a value of type Reference whose base value is baseValue, whose referenced name is privateName, whose strict reference flag is true.
+features: [class-fields-public, class-methods-private, class]
+---*/
+
+class C {
+ set #m(v) { this._v = v; };
+ v = (eval("this.#m = 53"), this._v);
+}
+
+let c = new C();
+assert.sameValue(c.v, 53);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-setter-visible-to-direct-eval.js b/js/src/tests/test262/language/statements/class/elements/private-setter-visible-to-direct-eval.js
new file mode 100644
index 0000000000..5a0a24d0e5
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-setter-visible-to-direct-eval.js
@@ -0,0 +1,63 @@
+// Copyright (C) 2019 Caio Lima (Igalia SL). All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: Private setter is visible to direct eval code
+esid: sec-privatefieldset
+info: |
+ PrivateFieldSet (P, O, value )
+ 1. Assert: P is a Private Name.
+ 2. If O is not an object, throw a TypeError exception.
+ 3. If P.[[Kind]] is "field",
+ a. Let entry be PrivateFieldFind(P, O).
+ b. If entry is empty, throw a TypeError exception.
+ c. Set entry.[[PrivateFieldValue]] to value.
+ d. Return.
+ 4. If P.[[Kind]] is "method", throw a TypeError exception.
+ 5. Else,
+ a. Assert: P.[[Kind]] is "accessor".
+ b. If O.[[PrivateFieldBrands]] does not contain P.[[Brand]], throw a TypeError exception.
+ c. If P does not have a [[Set]] field, throw a TypeError exception.
+ d. Let setter be P.[[Set]].
+ e. Perform ? Call(setter, O, value).
+ f. Return.
+
+ ClassElementName : PrivateIdentifier
+ 1. Let privateIdentifier be StringValue of PrivateIdentifier.
+ 2. Let privateName be NewPrivateName(privateIdentifier).
+ 3. Let scope be the running execution context's PrivateEnvironment.
+ 4. Let scopeEnvRec be scope's EnvironmentRecord.
+ 5. Perform ! scopeEnvRec.InitializeBinding(privateIdentifier, privateName).
+ 6. Return privateName.
+
+ MakePrivateReference ( baseValue, privateIdentifier )
+ 1. Let env be the running execution context's PrivateEnvironment.
+ 2. Let privateNameBinding be ? ResolveBinding(privateIdentifier, env).
+ 3. Let privateName be GetValue(privateNameBinding).
+ 4. Assert: privateName is a Private Name.
+ 5. Return a value of type Reference whose base value is baseValue, whose referenced name is privateName, whose strict reference flag is true.
+features: [class-methods-private, class]
+---*/
+
+class C {
+ set #m(v) { this._v = v; };
+
+ setWithEval(v) {
+ eval("this.#m = v");
+ }
+}
+
+class D {
+ set #m(v) { throw new Test262Error(); };
+}
+
+let c = new C();
+c.setWithEval("Test262");
+assert.sameValue(c._v, "Test262");
+
+let d = new D();
+assert.throws(TypeError, function() {
+ c.setWithEval.call(d);
+}, "invalid access to a private setter");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-static-async-generator-method-name.js b/js/src/tests/test262/language/statements/class/elements/private-static-async-generator-method-name.js
new file mode 100644
index 0000000000..3e5e056e36
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-static-async-generator-method-name.js
@@ -0,0 +1,62 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-static-async-generator-method-name.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: Private static async generator methods have name property properly configured (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class]
+flags: [generated]
+info: |
+ Updated Productions
+
+ ClassElement : MethodDefinition
+ 1. Return ClassElementEvaluation of MethodDefinition with arguments ! Get(homeObject, "prototype"),enumerable, and "prototype".
+
+ ClassElement : static MethodDefinition
+ 1. Return ClassElementEvaluation of MethodDefinition with arguments homeObject, enumerable and "static".
+
+ AsyncMethod : async [no LineTerminator here] * ClassElementName (UniqueFormalParameters) { AsyncFunctionBody }
+ ...
+ 12. Perform ? DefineOrdinaryMethod(key, homeObject, closure, _enumerable).
+
+ ClassElement : MethodDefinition
+ ClassElement : static MethodDefinition
+ 1. Perform ? PropertyDefinitionEvaluation with parameters object and enumerable.
+ 2. Return empty.
+
+ ClassElementName : PrivateIdentifier
+ 1. Let bindingName be StringValue of PrivateIdentifier.
+ ...
+ 5. If scopeEnvRec's binding for bindingName is uninitialized,
+ a. Let field be NewPrivateName(bindingName).
+ b. Perform ! scopeEnvRec.InitializeBinding(bindingName, field).
+ 6. Otherwise,
+ a. Let field be scopeEnvRec.GetBindingValue(bindingName).
+ 7. Assert: field.[[Description]] is bindingName.
+ 8. Return field.
+
+ DefineOrdinaryMethod(key, homeObject, closure, enumerable)
+ 1. Perform SetFunctionName(closure, key).
+ 2. If key is a Private Name,
+ a. Assert: key does not have a [[Kind]] field.
+ b. Set key.[[Kind]] to "method".
+ c. Set key.[[Value]] to closure.
+ d. Set key.[[Brand]] to homeObject.
+ 3. Else,
+ a. Let desc be the PropertyDescriptor{[[Value]]: closure, [[Writable]]: true, [[Enumerable]]: enumerable, [[Configurable]]: true}.
+ b. Perform ? DefinePropertyOrThrow(homeObject, key, desc).
+
+---*/
+
+
+class C {
+ static async * #method() {};
+
+ static getPrivateMethod() {
+ return this.#method;
+ }
+}
+
+assert.sameValue(C.getPrivateMethod().name, "#method");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-static-async-method-name.js b/js/src/tests/test262/language/statements/class/elements/private-static-async-method-name.js
new file mode 100644
index 0000000000..de5464c427
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-static-async-method-name.js
@@ -0,0 +1,62 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-static-async-method-name.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: Private static async methods have name property properly configured (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class]
+flags: [generated]
+info: |
+ Updated Productions
+
+ ClassElement : MethodDefinition
+ 1. Return ClassElementEvaluation of MethodDefinition with arguments ! Get(homeObject, "prototype"),enumerable, and "prototype".
+
+ ClassElement : static MethodDefinition
+ 1. Return ClassElementEvaluation of MethodDefinition with arguments homeObject, enumerable and "static".
+
+ AsyncMethod : async [no LineTerminator here] ClassElementName (UniqueFormalParameters) { AsyncFunctionBody }
+ ...
+ 10. Perform ? DefineOrdinaryMethod(key, homeObject, closure, _enumerable).
+
+ ClassElement : MethodDefinition
+ ClassElement : static MethodDefinition
+ 1. Perform ? PropertyDefinitionEvaluation with parameters object and enumerable.
+ 2. Return empty.
+
+ ClassElementName : PrivateIdentifier
+ 1. Let bindingName be StringValue of PrivateIdentifier.
+ ...
+ 5. If scopeEnvRec's binding for bindingName is uninitialized,
+ a. Let field be NewPrivateName(bindingName).
+ b. Perform ! scopeEnvRec.InitializeBinding(bindingName, field).
+ 6. Otherwise,
+ a. Let field be scopeEnvRec.GetBindingValue(bindingName).
+ 7. Assert: field.[[Description]] is bindingName.
+ 8. Return field.
+
+ DefineOrdinaryMethod(key, homeObject, closure, enumerable)
+ 1. Perform SetFunctionName(closure, key).
+ 2. If key is a Private Name,
+ a. Assert: key does not have a [[Kind]] field.
+ b. Set key.[[Kind]] to "method".
+ c. Set key.[[Value]] to closure.
+ d. Set key.[[Brand]] to homeObject.
+ 3. Else,
+ a. Let desc be the PropertyDescriptor{[[Value]]: closure, [[Writable]]: true, [[Enumerable]]: enumerable, [[Configurable]]: true}.
+ b. Perform ? DefinePropertyOrThrow(homeObject, key, desc).
+
+---*/
+
+
+class C {
+ static async #method() {};
+
+ static getPrivateMethod() {
+ return this.#method;
+ }
+}
+
+assert.sameValue(C.getPrivateMethod().name, "#method");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-static-field-shadowed-by-field-on-nested-class.js b/js/src/tests/test262/language/statements/class/elements/private-static-field-shadowed-by-field-on-nested-class.js
new file mode 100644
index 0000000000..fe7060c92e
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-static-field-shadowed-by-field-on-nested-class.js
@@ -0,0 +1,91 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-static-field-shadowed-by-field-on-nested-class.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: PrivateName of private static field can be shadowed on inner classes by a private field (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class-static-fields-public, class-fields-private, class]
+flags: [generated]
+info: |
+ Updated Productions
+
+ CallExpression[Yield, Await]:
+ CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+ SuperCall[?Yield, ?Await]
+ CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+ CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+ CallExpression[?Yield, ?Await].IdentifierName
+ CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+ CallExpression[?Yield, ?Await].PrivateIdentifier
+
+ ClassTail : ClassHeritage { ClassBody }
+ ...
+ 6. Let classPrivateEnvironment be NewDeclarativeEnvironment(outerPrivateEnvironment).
+ 7. Let classPrivateEnvRec be classPrivateEnvironment's EnvironmentRecord.
+ ...
+ 15. Set the running execution context's LexicalEnvironment to classScope.
+ 16. Set the running execution context's PrivateEnvironment to classPrivateEnvironment.
+ ...
+ 33. If PrivateBoundIdentifiers of ClassBody contains a Private Name P such that P's [[Kind]] field is either "method" or "accessor" and P's [[Brand]] is F,
+ a. PrivateBrandAdd(F, F).
+ 34. For each item fieldRecord in order from staticFields,
+ a. Perform ? DefineField(F, field).
+
+ FieldDefinition : ClassElementName Initializer_opt
+ 1. Let name be the result of evaluating ClassElementName.
+ 2. ReturnIfAbrupt(name).
+ 3. If Initializer_opt is present,
+ a. Let lex be the Lexical Environment of the running execution context.
+ b. Let formalParameterList be an instance of the production FormalParameters : [empty].
+ c. Let privateScope be the PrivateEnvironment of the running execution context.
+ d. Let initializer be FunctionCreate(Method, formalParameterList, Initializer, lex, true, privateScope).
+ e. Perform MakeMethod(initializer, homeObject).
+ f. Let isAnonymousFunctionDefinition be IsAnonymousFunctionDefinition(Initializer).
+ 4. Else,
+ a. Let initializer be empty.
+ b. Let isAnonymousFunctionDeclaration be false.
+ 5. Return a Record { [[Name]]: name, [[Initializer]]: initializer, [[IsAnonymousFunctionDefinition]]: isAnonymousFunctionDefinition }.
+
+ MemberExpression : MemberExpression.PrivateIdentifier
+ 1. Let baseReference be the result of evaluating MemberExpression.
+ 2. Let baseValue be ? GetValue(baseReference).
+ 3. Let bv be ? RequireObjectCoercible(baseValue).
+ 4. Let fieldNameString be the StringValue of PrivateIdentifier.
+ 5. Return MakePrivateReference(bv, fieldNameString).
+
+ MakePrivateReference(baseValue, privateIdentifier)
+ 1. Let env be the running execution context's PrivateEnvironment.
+ 2. Let privateNameBinding be ? ResolveBinding(privateIdentifier, env).
+ 3. Let privateName be GetValue(privateNameBinding).
+ 4. Assert: privateName is a Private Name.
+ 5. Return a value of type Reference whose base value is baseValue, whose referenced name is privateName, whose strict reference flag is true.
+
+---*/
+
+
+class C {
+ static #m = 'outer class';
+
+ static fieldAccess() {
+ return this.#m;
+ }
+
+ static B = class {
+ #m = 'inner class';
+ static fieldAccess(o) {
+ return o.#m;
+ }
+ }
+}
+
+assert.sameValue(C.fieldAccess(), 'outer class');
+
+let b = new C.B();
+
+assert.sameValue(C.B.fieldAccess(b), 'inner class');
+
+assert.throws(TypeError, function() {
+ C.B.fieldAccess(C);
+}, 'accessed private field from an arbritary object');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-static-field-shadowed-by-getter-on-nested-class.js b/js/src/tests/test262/language/statements/class/elements/private-static-field-shadowed-by-getter-on-nested-class.js
new file mode 100644
index 0000000000..7e62f99a8f
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-static-field-shadowed-by-getter-on-nested-class.js
@@ -0,0 +1,92 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-static-field-shadowed-by-getter-on-nested-class.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: PrivateName of private static field can be shadowed on inner classes by a private getter (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class-static-fields-public, class-methods-private, class]
+flags: [generated]
+info: |
+ Updated Productions
+
+ CallExpression[Yield, Await]:
+ CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+ SuperCall[?Yield, ?Await]
+ CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+ CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+ CallExpression[?Yield, ?Await].IdentifierName
+ CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+ CallExpression[?Yield, ?Await].PrivateIdentifier
+
+ ClassTail : ClassHeritage { ClassBody }
+ ...
+ 6. Let classPrivateEnvironment be NewDeclarativeEnvironment(outerPrivateEnvironment).
+ 7. Let classPrivateEnvRec be classPrivateEnvironment's EnvironmentRecord.
+ ...
+ 15. Set the running execution context's LexicalEnvironment to classScope.
+ 16. Set the running execution context's PrivateEnvironment to classPrivateEnvironment.
+ ...
+ 33. If PrivateBoundIdentifiers of ClassBody contains a Private Name P such that P's [[Kind]] field is either "method" or "accessor" and P's [[Brand]] is F,
+ a. PrivateBrandAdd(F, F).
+ 34. For each item fieldRecord in order from staticFields,
+ a. Perform ? DefineField(F, field).
+
+ FieldDefinition : ClassElementName Initializer_opt
+ 1. Let name be the result of evaluating ClassElementName.
+ 2. ReturnIfAbrupt(name).
+ 3. If Initializer_opt is present,
+ a. Let lex be the Lexical Environment of the running execution context.
+ b. Let formalParameterList be an instance of the production FormalParameters : [empty].
+ c. Let privateScope be the PrivateEnvironment of the running execution context.
+ d. Let initializer be FunctionCreate(Method, formalParameterList, Initializer, lex, true, privateScope).
+ e. Perform MakeMethod(initializer, homeObject).
+ f. Let isAnonymousFunctionDefinition be IsAnonymousFunctionDefinition(Initializer).
+ 4. Else,
+ a. Let initializer be empty.
+ b. Let isAnonymousFunctionDeclaration be false.
+ 5. Return a Record { [[Name]]: name, [[Initializer]]: initializer, [[IsAnonymousFunctionDefinition]]: isAnonymousFunctionDefinition }.
+
+ MemberExpression : MemberExpression.PrivateIdentifier
+ 1. Let baseReference be the result of evaluating MemberExpression.
+ 2. Let baseValue be ? GetValue(baseReference).
+ 3. Let bv be ? RequireObjectCoercible(baseValue).
+ 4. Let fieldNameString be the StringValue of PrivateIdentifier.
+ 5. Return MakePrivateReference(bv, fieldNameString).
+
+ MakePrivateReference(baseValue, privateIdentifier)
+ 1. Let env be the running execution context's PrivateEnvironment.
+ 2. Let privateNameBinding be ? ResolveBinding(privateIdentifier, env).
+ 3. Let privateName be GetValue(privateNameBinding).
+ 4. Assert: privateName is a Private Name.
+ 5. Return a value of type Reference whose base value is baseValue, whose referenced name is privateName, whose strict reference flag is true.
+
+---*/
+
+
+class C {
+ static #m = 'outer class';
+
+ static fieldAccess() {
+ return this.#m;
+ }
+
+ static B = class {
+ get #m() { return 'inner class'; }
+
+ static access(o) {
+ return o.#m;
+ }
+ }
+}
+
+assert.sameValue(C.fieldAccess(), 'outer class');
+
+let b = new C.B();
+
+assert.sameValue(C.B.access(b), 'inner class');
+
+assert.throws(TypeError, function() {
+ C.B.access(C);
+}, 'accessed private getter from an arbritary object');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-static-field-shadowed-by-method-on-nested-class.js b/js/src/tests/test262/language/statements/class/elements/private-static-field-shadowed-by-method-on-nested-class.js
new file mode 100644
index 0000000000..a78214d76e
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-static-field-shadowed-by-method-on-nested-class.js
@@ -0,0 +1,92 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-static-field-shadowed-by-method-on-nested-class.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: PrivateName of private static field can be shadowed on inner classes by a private method (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class-static-fields-public, class-methods-private, class]
+flags: [generated]
+info: |
+ Updated Productions
+
+ CallExpression[Yield, Await]:
+ CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+ SuperCall[?Yield, ?Await]
+ CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+ CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+ CallExpression[?Yield, ?Await].IdentifierName
+ CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+ CallExpression[?Yield, ?Await].PrivateIdentifier
+
+ ClassTail : ClassHeritage { ClassBody }
+ ...
+ 6. Let classPrivateEnvironment be NewDeclarativeEnvironment(outerPrivateEnvironment).
+ 7. Let classPrivateEnvRec be classPrivateEnvironment's EnvironmentRecord.
+ ...
+ 15. Set the running execution context's LexicalEnvironment to classScope.
+ 16. Set the running execution context's PrivateEnvironment to classPrivateEnvironment.
+ ...
+ 33. If PrivateBoundIdentifiers of ClassBody contains a Private Name P such that P's [[Kind]] field is either "method" or "accessor" and P's [[Brand]] is F,
+ a. PrivateBrandAdd(F, F).
+ 34. For each item fieldRecord in order from staticFields,
+ a. Perform ? DefineField(F, field).
+
+ FieldDefinition : ClassElementName Initializer_opt
+ 1. Let name be the result of evaluating ClassElementName.
+ 2. ReturnIfAbrupt(name).
+ 3. If Initializer_opt is present,
+ a. Let lex be the Lexical Environment of the running execution context.
+ b. Let formalParameterList be an instance of the production FormalParameters : [empty].
+ c. Let privateScope be the PrivateEnvironment of the running execution context.
+ d. Let initializer be FunctionCreate(Method, formalParameterList, Initializer, lex, true, privateScope).
+ e. Perform MakeMethod(initializer, homeObject).
+ f. Let isAnonymousFunctionDefinition be IsAnonymousFunctionDefinition(Initializer).
+ 4. Else,
+ a. Let initializer be empty.
+ b. Let isAnonymousFunctionDeclaration be false.
+ 5. Return a Record { [[Name]]: name, [[Initializer]]: initializer, [[IsAnonymousFunctionDefinition]]: isAnonymousFunctionDefinition }.
+
+ MemberExpression : MemberExpression.PrivateIdentifier
+ 1. Let baseReference be the result of evaluating MemberExpression.
+ 2. Let baseValue be ? GetValue(baseReference).
+ 3. Let bv be ? RequireObjectCoercible(baseValue).
+ 4. Let fieldNameString be the StringValue of PrivateIdentifier.
+ 5. Return MakePrivateReference(bv, fieldNameString).
+
+ MakePrivateReference(baseValue, privateIdentifier)
+ 1. Let env be the running execution context's PrivateEnvironment.
+ 2. Let privateNameBinding be ? ResolveBinding(privateIdentifier, env).
+ 3. Let privateName be GetValue(privateNameBinding).
+ 4. Assert: privateName is a Private Name.
+ 5. Return a value of type Reference whose base value is baseValue, whose referenced name is privateName, whose strict reference flag is true.
+
+---*/
+
+
+class C {
+ static #m = () => 'outer class';
+
+ static fieldAccess() {
+ return this.#m();
+ }
+
+ static B = class {
+ #m() { return 'inner class'; }
+
+ static access(o) {
+ return o.#m();
+ }
+ }
+}
+
+assert.sameValue(C.fieldAccess(), 'outer class');
+
+let b = new C.B();
+
+assert.sameValue(C.B.access(b), 'inner class');
+
+assert.throws(TypeError, function() {
+ C.B.access(C);
+}, 'accessed private method from an arbritary object');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-static-field-shadowed-by-setter-on-nested-class.js b/js/src/tests/test262/language/statements/class/elements/private-static-field-shadowed-by-setter-on-nested-class.js
new file mode 100644
index 0000000000..f72c5b519e
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-static-field-shadowed-by-setter-on-nested-class.js
@@ -0,0 +1,93 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-static-field-shadowed-by-setter-on-nested-class.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: PrivateName of private static field can be shadowed on inner classes by a private setter (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class-static-fields-public, class-methods-private, class]
+flags: [generated]
+info: |
+ Updated Productions
+
+ CallExpression[Yield, Await]:
+ CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+ SuperCall[?Yield, ?Await]
+ CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+ CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+ CallExpression[?Yield, ?Await].IdentifierName
+ CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+ CallExpression[?Yield, ?Await].PrivateIdentifier
+
+ ClassTail : ClassHeritage { ClassBody }
+ ...
+ 6. Let classPrivateEnvironment be NewDeclarativeEnvironment(outerPrivateEnvironment).
+ 7. Let classPrivateEnvRec be classPrivateEnvironment's EnvironmentRecord.
+ ...
+ 15. Set the running execution context's LexicalEnvironment to classScope.
+ 16. Set the running execution context's PrivateEnvironment to classPrivateEnvironment.
+ ...
+ 33. If PrivateBoundIdentifiers of ClassBody contains a Private Name P such that P's [[Kind]] field is either "method" or "accessor" and P's [[Brand]] is F,
+ a. PrivateBrandAdd(F, F).
+ 34. For each item fieldRecord in order from staticFields,
+ a. Perform ? DefineField(F, field).
+
+ FieldDefinition : ClassElementName Initializer_opt
+ 1. Let name be the result of evaluating ClassElementName.
+ 2. ReturnIfAbrupt(name).
+ 3. If Initializer_opt is present,
+ a. Let lex be the Lexical Environment of the running execution context.
+ b. Let formalParameterList be an instance of the production FormalParameters : [empty].
+ c. Let privateScope be the PrivateEnvironment of the running execution context.
+ d. Let initializer be FunctionCreate(Method, formalParameterList, Initializer, lex, true, privateScope).
+ e. Perform MakeMethod(initializer, homeObject).
+ f. Let isAnonymousFunctionDefinition be IsAnonymousFunctionDefinition(Initializer).
+ 4. Else,
+ a. Let initializer be empty.
+ b. Let isAnonymousFunctionDeclaration be false.
+ 5. Return a Record { [[Name]]: name, [[Initializer]]: initializer, [[IsAnonymousFunctionDefinition]]: isAnonymousFunctionDefinition }.
+
+ MemberExpression : MemberExpression.PrivateIdentifier
+ 1. Let baseReference be the result of evaluating MemberExpression.
+ 2. Let baseValue be ? GetValue(baseReference).
+ 3. Let bv be ? RequireObjectCoercible(baseValue).
+ 4. Let fieldNameString be the StringValue of PrivateIdentifier.
+ 5. Return MakePrivateReference(bv, fieldNameString).
+
+ MakePrivateReference(baseValue, privateIdentifier)
+ 1. Let env be the running execution context's PrivateEnvironment.
+ 2. Let privateNameBinding be ? ResolveBinding(privateIdentifier, env).
+ 3. Let privateName be GetValue(privateNameBinding).
+ 4. Assert: privateName is a Private Name.
+ 5. Return a value of type Reference whose base value is baseValue, whose referenced name is privateName, whose strict reference flag is true.
+
+---*/
+
+
+class C {
+ static #m = 'outer class';
+
+ static fieldAccess() {
+ return this.#m;
+ }
+
+ static B = class {
+ set #m(v) { this._v = v; }
+
+ static access(o) {
+ o.#m = 'inner class';
+ }
+ }
+}
+
+assert.sameValue(C.fieldAccess(), 'outer class');
+
+let b = new C.B();
+
+C.B.access(b);
+assert.sameValue(b._v, 'inner class');
+
+assert.throws(TypeError, function() {
+ C.B.access(C);
+}, 'accessed private setter from an arbritary object');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-static-field-usage-inside-nested-class.js b/js/src/tests/test262/language/statements/class/elements/private-static-field-usage-inside-nested-class.js
new file mode 100644
index 0000000000..181a88af67
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-static-field-usage-inside-nested-class.js
@@ -0,0 +1,81 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-static-field-usage-inside-nested-class.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: PrivateName of private static field is available inside inner classes (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class-static-fields-public, class]
+flags: [generated]
+info: |
+ Updated Productions
+
+ CallExpression[Yield, Await]:
+ CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+ SuperCall[?Yield, ?Await]
+ CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+ CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+ CallExpression[?Yield, ?Await].IdentifierName
+ CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+ CallExpression[?Yield, ?Await].PrivateIdentifier
+
+ ClassTail : ClassHeritage { ClassBody }
+ ...
+ 6. Let classPrivateEnvironment be NewDeclarativeEnvironment(outerPrivateEnvironment).
+ 7. Let classPrivateEnvRec be classPrivateEnvironment's EnvironmentRecord.
+ ...
+ 15. Set the running execution context's LexicalEnvironment to classScope.
+ 16. Set the running execution context's PrivateEnvironment to classPrivateEnvironment.
+ ...
+ 33. If PrivateBoundIdentifiers of ClassBody contains a Private Name P such that P's [[Kind]] field is either "method" or "accessor" and P's [[Brand]] is F,
+ a. PrivateBrandAdd(F, F).
+ 34. For each item fieldRecord in order from staticFields,
+ a. Perform ? DefineField(F, field).
+
+ FieldDefinition : ClassElementName Initializer_opt
+ 1. Let name be the result of evaluating ClassElementName.
+ 2. ReturnIfAbrupt(name).
+ 3. If Initializer_opt is present,
+ a. Let lex be the Lexical Environment of the running execution context.
+ b. Let formalParameterList be an instance of the production FormalParameters : [empty].
+ c. Let privateScope be the PrivateEnvironment of the running execution context.
+ d. Let initializer be FunctionCreate(Method, formalParameterList, Initializer, lex, true, privateScope).
+ e. Perform MakeMethod(initializer, homeObject).
+ f. Let isAnonymousFunctionDefinition be IsAnonymousFunctionDefinition(Initializer).
+ 4. Else,
+ a. Let initializer be empty.
+ b. Let isAnonymousFunctionDeclaration be false.
+ 5. Return a Record { [[Name]]: name, [[Initializer]]: initializer, [[IsAnonymousFunctionDefinition]]: isAnonymousFunctionDefinition }.
+
+ MemberExpression : MemberExpression.PrivateIdentifier
+ 1. Let baseReference be the result of evaluating MemberExpression.
+ 2. Let baseValue be ? GetValue(baseReference).
+ 3. Let bv be ? RequireObjectCoercible(baseValue).
+ 4. Let fieldNameString be the StringValue of PrivateIdentifier.
+ 5. Return MakePrivateReference(bv, fieldNameString).
+
+ MakePrivateReference(baseValue, privateIdentifier)
+ 1. Let env be the running execution context's PrivateEnvironment.
+ 2. Let privateNameBinding be ? ResolveBinding(privateIdentifier, env).
+ 3. Let privateName be GetValue(privateNameBinding).
+ 4. Assert: privateName is a Private Name.
+ 5. Return a value of type Reference whose base value is baseValue, whose referenced name is privateName, whose strict reference flag is true.
+
+---*/
+
+
+class C {
+ static #m = 'outer class';
+
+ static B = class {
+ static fieldAccess(o) {
+ return o.#m;
+ }
+ }
+}
+
+assert.sameValue(C.B.fieldAccess(C), 'outer class');
+assert.throws(TypeError, function() {
+ C.B.methodAccess(C.B);
+}, 'accessed static private field from an arbritary object');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-static-field-visible-to-direct-eval.js b/js/src/tests/test262/language/statements/class/elements/private-static-field-visible-to-direct-eval.js
new file mode 100644
index 0000000000..68a0debf28
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-static-field-visible-to-direct-eval.js
@@ -0,0 +1,59 @@
+// Copyright (C) 2019 Caio Lima (Igalia SL). All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: Private static field is visible to direct eval code
+esid: sec-privatefieldget
+info: |
+ PrivateFieldGet (P, O)
+ 1. Assert: P is a Private Name.
+ 2. If O is not an object, throw a TypeError exception.
+ 3. If P.[[Kind]] is "field",
+ a. Let entry be PrivateFieldFind(P, O).
+ b. If entry is empty, throw a TypeError exception.
+ c. Return entry.[[PrivateFieldValue]].
+ 4. Perform ? PrivateBrandCheck(O, P).
+ 5. If P.[[Kind]] is "method",
+ a. Return P.[[Value]].
+ 6. Else,
+ a. Assert: P.[[Kind]] is "accessor".
+ b. If P does not have a [[Get]] field, throw a TypeError exception.
+ c. Let getter be P.[[Get]].
+ d. Return ? Call(getter, O).
+
+ ClassElementName : PrivateIdentifier
+ 1. Let privateIdentifier be StringValue of PrivateIdentifier.
+ 2. Let privateName be NewPrivateName(privateIdentifier).
+ 3. Let scope be the running execution context's PrivateEnvironment.
+ 4. Let scopeEnvRec be scope's EnvironmentRecord.
+ 5. Perform ! scopeEnvRec.InitializeBinding(privateIdentifier, privateName).
+ 6. Return privateName.
+
+ MakePrivateReference ( baseValue, privateIdentifier )
+ 1. Let env be the running execution context's PrivateEnvironment.
+ 2. Let privateNameBinding be ? ResolveBinding(privateIdentifier, env).
+ 3. Let privateName be GetValue(privateNameBinding).
+ 4. Assert: privateName is a Private Name.
+ 5. Return a value of type Reference whose base value is baseValue, whose referenced name is privateName, whose strict reference flag is true.
+features: [class-static-fields-private, class]
+---*/
+
+class C {
+ static #m = 44;
+
+ static getWithEval() {
+ return eval("this.#m");
+ }
+}
+
+class D {
+ static #m = 44;
+}
+
+assert.sameValue(C.getWithEval(), 44);
+
+assert.throws(TypeError, function() {
+ C.getWithEval.call(D);
+}, "invalid access to a private field");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-static-generator-method-name.js b/js/src/tests/test262/language/statements/class/elements/private-static-generator-method-name.js
new file mode 100644
index 0000000000..8fd8d86c02
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-static-generator-method-name.js
@@ -0,0 +1,62 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-static-generator-method-name.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: Private static generator methods have name property properly configured (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class]
+flags: [generated]
+info: |
+ Updated Productions
+
+ ClassElement : MethodDefinition
+ 1. Return ClassElementEvaluation of MethodDefinition with arguments ! Get(homeObject, "prototype"),enumerable, and "prototype".
+
+ ClassElement : static MethodDefinition
+ 1. Return ClassElementEvaluation of MethodDefinition with arguments homeObject, enumerable and "static".
+
+ GeneratorMethod : * ClassElementName (UniqueFormalParameters) { GeneratorBody }
+ ...
+ 12. Perform ? DefineOrdinaryMethod(key, homeObject, closure, _enumerable).
+
+ ClassElement : MethodDefinition
+ ClassElement : static MethodDefinition
+ 1. Perform ? PropertyDefinitionEvaluation with parameters object and enumerable.
+ 2. Return empty.
+
+ ClassElementName : PrivateIdentifier
+ 1. Let bindingName be StringValue of PrivateIdentifier.
+ ...
+ 5. If scopeEnvRec's binding for bindingName is uninitialized,
+ a. Let field be NewPrivateName(bindingName).
+ b. Perform ! scopeEnvRec.InitializeBinding(bindingName, field).
+ 6. Otherwise,
+ a. Let field be scopeEnvRec.GetBindingValue(bindingName).
+ 7. Assert: field.[[Description]] is bindingName.
+ 8. Return field.
+
+ DefineOrdinaryMethod(key, homeObject, closure, enumerable)
+ 1. Perform SetFunctionName(closure, key).
+ 2. If key is a Private Name,
+ a. Assert: key does not have a [[Kind]] field.
+ b. Set key.[[Kind]] to "method".
+ c. Set key.[[Value]] to closure.
+ d. Set key.[[Brand]] to homeObject.
+ 3. Else,
+ a. Let desc be the PropertyDescriptor{[[Value]]: closure, [[Writable]]: true, [[Enumerable]]: enumerable, [[Configurable]]: true}.
+ b. Perform ? DefinePropertyOrThrow(homeObject, key, desc).
+
+---*/
+
+
+class C {
+ static * #method() {};
+
+ static getPrivateMethod() {
+ return this.#method;
+ }
+}
+
+assert.sameValue(C.getPrivateMethod().name, "#method");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-static-getter-abrupt-completition.js b/js/src/tests/test262/language/statements/class/elements/private-static-getter-abrupt-completition.js
new file mode 100644
index 0000000000..fc0b9f42dc
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-static-getter-abrupt-completition.js
@@ -0,0 +1,41 @@
+// Copyright (C) 2019 Caio Lima (Igalia SL). All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: PrivateFieldGet should return an abrupt completion
+esid: sec-privatefieldget
+info: |
+ PrivateFieldGet (P, O)
+ 1. Assert: P is a Private Name.
+ 2. If O is not an object, throw a TypeError exception.
+ 3. If P.[[Kind]] is "field",
+ a. Let entry be PrivateFieldFind(P, O).
+ b. If entry is empty, throw a TypeError exception.
+ c. Return entry.[[PrivateFieldValue]].
+ 4. Perform ? PrivateBrandCheck(O, P).
+ 5. If P.[[Kind]] is "method",
+ a. Return P.[[Value]].
+ 6. Else,
+ a. Assert: P.[[Kind]] is "accessor".
+ b. If P does not have a [[Get]] field, throw a TypeError exception.
+ c. Let getter be P.[[Get]].
+ d. Return ? Call(getter, O).
+features: [class-methods-private, class]
+---*/
+
+class C {
+ get #m() {
+ throw new Test262Error();
+ }
+
+ access() {
+ this.#m;
+ }
+}
+
+let c = new C();
+assert.throws(Test262Error, function() {
+ c.access();
+}, 'private getter should have abrupt completion');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-static-getter-visible-to-direct-eval.js b/js/src/tests/test262/language/statements/class/elements/private-static-getter-visible-to-direct-eval.js
new file mode 100644
index 0000000000..180d624623
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-static-getter-visible-to-direct-eval.js
@@ -0,0 +1,63 @@
+// Copyright (C) 2019 Caio Lima (Igalia SL). All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: Private static getter is visible to direct eval code
+esid: sec-privatefieldget
+info: |
+ PrivateFieldGet (P, O)
+ 1. Assert: P is a Private Name.
+ 2. If O is not an object, throw a TypeError exception.
+ 3. If P.[[Kind]] is "field",
+ a. Let entry be PrivateFieldFind(P, O).
+ b. If entry is empty, throw a TypeError exception.
+ c. Return entry.[[PrivateFieldValue]].
+ 4. Perform ? PrivateBrandCheck(O, P).
+ 5. If P.[[Kind]] is "method",
+ a. Return P.[[Value]].
+ 6. Else,
+ a. Assert: P.[[Kind]] is "accessor".
+ b. If P does not have a [[Get]] field, throw a TypeError exception.
+ c. Let getter be P.[[Get]].
+ d. Return ? Call(getter, O).
+
+ ClassElementName : PrivateIdentifier
+ 1. Let privateIdentifier be StringValue of PrivateIdentifier.
+ 2. Let privateName be NewPrivateName(privateIdentifier).
+ 3. Let scope be the running execution context's PrivateEnvironment.
+ 4. Let scopeEnvRec be scope's EnvironmentRecord.
+ 5. Perform ! scopeEnvRec.InitializeBinding(privateIdentifier, privateName).
+ 6. Return privateName.
+
+ MakePrivateReference ( baseValue, privateIdentifier )
+ 1. Let env be the running execution context's PrivateEnvironment.
+ 2. Let privateNameBinding be ? ResolveBinding(privateIdentifier, env).
+ 3. Let privateName be GetValue(privateNameBinding).
+ 4. Assert: privateName is a Private Name.
+ 5. Return a value of type Reference whose base value is baseValue, whose referenced name is privateName, whose strict reference flag is true.
+features: [class-static-methods-private, class]
+---*/
+
+class C {
+ static get #m() {
+ return 'Test262';
+ }
+
+ static getWithEval() {
+ return eval('this.#m');
+ }
+}
+
+class D {
+ static get #m() {
+ throw new Test262Error('should never be executed');
+ }
+}
+
+assert.sameValue(C.getWithEval(), 'Test262');
+
+assert.throws(TypeError, function() {
+ C.getWithEval.call(D);
+}, 'invalid access to a static private getter');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-static-method-length.js b/js/src/tests/test262/language/statements/class/elements/private-static-method-length.js
new file mode 100644
index 0000000000..b18f48e6ba
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-static-method-length.js
@@ -0,0 +1,48 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-static-method-length.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: Private static methods have length property properly configured (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class]
+flags: [generated]
+info: |
+ Updated Productions
+
+ ClassElement : MethodDefinition
+ 1. Return ClassElementEvaluation of MethodDefinition with arguments ! Get(homeObject, "prototype"),enumerable, and "prototype".
+
+ ClassElement : static MethodDefinition
+ 1. Return ClassElementEvaluation of MethodDefinition with arguments homeObject, enumerable and "static".
+
+ MethodDefinition : ClassElementName( UniqueFormalParameters ) { FunctionBody }
+ 1. Let methodDef be DefineMethod of MethodDefinition with argument homeObject.
+ 2. ReturnIfAbrupt(methodDef).
+ 3. Perform ? DefineOrdinaryMethod(methodDef.[[Key]], homeObject, methodDef.[[Closure]], _enumerable).
+
+ ClassElement : MethodDefinition
+ ClassElement : static MethodDefinition
+ 1. Perform ? PropertyDefinitionEvaluation with parameters object and enumerable.
+ 2. Return empty.
+
+ MethodDefinition : ClassElementName (UniqueFormalParameters) { FunctionBody }
+ ...
+ 8. Let closure be FunctionCreate(kind, UniqueFormalParameters, FunctionBody, scope, privateScope, strict, prototype).
+ 9. Perform MakeMethod(closure, object).
+ 10. Return the Record{[[Key]]: propKey, [[Closure]]: closure}.
+
+---*/
+
+
+class C {
+ static #method(a, b, c) {};
+
+ static getPrivateMethod() {
+ return this.#method;
+ }
+
+}
+
+assert.sameValue(C.getPrivateMethod().length, 3);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-static-method-name.js b/js/src/tests/test262/language/statements/class/elements/private-static-method-name.js
new file mode 100644
index 0000000000..cafb88ff0d
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-static-method-name.js
@@ -0,0 +1,73 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-static-method-name.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: Private static methods have name property properly configured (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class]
+flags: [generated]
+info: |
+ Updated Productions
+
+ ClassElement : MethodDefinition
+ 1. Return ClassElementEvaluation of MethodDefinition with arguments ! Get(homeObject, "prototype"),enumerable, and "prototype".
+
+ ClassElement : static MethodDefinition
+ 1. Return ClassElementEvaluation of MethodDefinition with arguments homeObject, enumerable and "static".
+
+ MethodDefinition : ClassElementName( UniqueFormalParameters ) { FunctionBody }
+ 1. Let methodDef be DefineMethod of MethodDefinition with argument homeObject.
+ 2. ReturnIfAbrupt(methodDef).
+ 3. Perform ? DefineOrdinaryMethod(methodDef.[[Key]], homeObject, methodDef.[[Closure]], _enumerable).
+
+ ClassElement : MethodDefinition
+ ClassElement : static MethodDefinition
+ 1. Perform ? PropertyDefinitionEvaluation with parameters object and enumerable.
+ 2. Return empty.
+
+ MethodDefinition : ClassElementName (UniqueFormalParameters) { FunctionBody }
+ 1. Let propKey be the result of evaluating ClassElementName.
+ ...
+ 8. Let closure be FunctionCreate(kind, UniqueFormalParameters, FunctionBody, scope, privateScope, strict, prototype).
+ 9. Perform MakeMethod(closure, object).
+ 10. Return the Record{[[Key]]: propKey, [[Closure]]: closure}.
+
+ ClassElementName : PrivateIdentifier
+ 1. Let bindingName be StringValue of PrivateIdentifier.
+ ...
+ 5. If scopeEnvRec's binding for bindingName is uninitialized,
+ a. Let field be NewPrivateName(bindingName).
+ b. Perform ! scopeEnvRec.InitializeBinding(bindingName, field).
+ 6. Otherwise,
+ a. Let field be scopeEnvRec.GetBindingValue(bindingName).
+ 7. Assert: field.[[Description]] is bindingName.
+ 8. Return field.
+
+ DefineOrdinaryMethod(key, homeObject, closure, enumerable)
+ 1. Perform SetFunctionName(closure, key).
+ 2. If key is a Private Name,
+ a. Assert: key does not have a [[Kind]] field.
+ b. Set key.[[Kind]] to "method".
+ c. Set key.[[Value]] to closure.
+ d. Set key.[[Brand]] to homeObject.
+ 3. Else,
+ a. Let desc be the PropertyDescriptor{[[Value]]: closure, [[Writable]]: true, [[Enumerable]]: enumerable, [[Configurable]]: true}.
+ b. Perform ? DefinePropertyOrThrow(homeObject, key, desc).
+
+---*/
+
+
+class C {
+ static #method() {
+ return 'Test262';
+ };
+
+ static getPrivateMethod() {
+ return this.#method;
+ }
+
+}
+
+assert.sameValue(C.getPrivateMethod().name, "#method");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-static-method-not-writable.js b/js/src/tests/test262/language/statements/class/elements/private-static-method-not-writable.js
new file mode 100644
index 0000000000..ce0d1f9cd1
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-static-method-not-writable.js
@@ -0,0 +1,33 @@
+// Copyright (C) 2021 André Bargull. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: >
+ Throws TypeError when attempting to overwrite a private static method.
+esid: sec-privateset
+info: |
+ 7.3.30 PrivateSet ( P, O, value )
+ 1. Let entry be ! PrivateElementFind(P, O).
+ 2. If entry is empty, throw a TypeError exception.
+ 3. If entry.[[Kind]] is field, then
+ ...
+ 4. Else if entry.[[Kind]] is method, then
+ a. Throw a TypeError exception.
+ 5. ...
+
+features: [class, class-static-methods-private]
+---*/
+
+class C {
+ static #m() {}
+
+ static assign() {
+ this.#m = 0;
+ }
+}
+
+assert.throws(TypeError, function() {
+ C.assign();
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-static-method-shadowed-by-field-on-nested-class.js b/js/src/tests/test262/language/statements/class/elements/private-static-method-shadowed-by-field-on-nested-class.js
new file mode 100644
index 0000000000..53efd583e5
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-static-method-shadowed-by-field-on-nested-class.js
@@ -0,0 +1,91 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-static-method-shadowed-by-field-on-nested-class.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: PrivateName of private static method can be shadowed on inner classes by a private field (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class-static-fields-public, class-fields-private, class]
+flags: [generated]
+info: |
+ Updated Productions
+
+ CallExpression[Yield, Await]:
+ CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+ SuperCall[?Yield, ?Await]
+ CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+ CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+ CallExpression[?Yield, ?Await].IdentifierName
+ CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+ CallExpression[?Yield, ?Await].PrivateIdentifier
+
+ ClassTail : ClassHeritage { ClassBody }
+ ...
+ 6. Let classPrivateEnvironment be NewDeclarativeEnvironment(outerPrivateEnvironment).
+ 7. Let classPrivateEnvRec be classPrivateEnvironment's EnvironmentRecord.
+ ...
+ 15. Set the running execution context's LexicalEnvironment to classScope.
+ 16. Set the running execution context's PrivateEnvironment to classPrivateEnvironment.
+ ...
+ 33. If PrivateBoundIdentifiers of ClassBody contains a Private Name P such that P's [[Kind]] field is either "method" or "accessor" and P's [[Brand]] is F,
+ a. PrivateBrandAdd(F, F).
+ 34. For each item fieldRecord in order from staticFields,
+ a. Perform ? DefineField(F, field).
+
+ FieldDefinition : ClassElementName Initializer_opt
+ 1. Let name be the result of evaluating ClassElementName.
+ 2. ReturnIfAbrupt(name).
+ 3. If Initializer_opt is present,
+ a. Let lex be the Lexical Environment of the running execution context.
+ b. Let formalParameterList be an instance of the production FormalParameters : [empty].
+ c. Let privateScope be the PrivateEnvironment of the running execution context.
+ d. Let initializer be FunctionCreate(Method, formalParameterList, Initializer, lex, true, privateScope).
+ e. Perform MakeMethod(initializer, homeObject).
+ f. Let isAnonymousFunctionDefinition be IsAnonymousFunctionDefinition(Initializer).
+ 4. Else,
+ a. Let initializer be empty.
+ b. Let isAnonymousFunctionDeclaration be false.
+ 5. Return a Record { [[Name]]: name, [[Initializer]]: initializer, [[IsAnonymousFunctionDefinition]]: isAnonymousFunctionDefinition }.
+
+ MemberExpression : MemberExpression.PrivateIdentifier
+ 1. Let baseReference be the result of evaluating MemberExpression.
+ 2. Let baseValue be ? GetValue(baseReference).
+ 3. Let bv be ? RequireObjectCoercible(baseValue).
+ 4. Let fieldNameString be the StringValue of PrivateIdentifier.
+ 5. Return MakePrivateReference(bv, fieldNameString).
+
+ MakePrivateReference(baseValue, privateIdentifier)
+ 1. Let env be the running execution context's PrivateEnvironment.
+ 2. Let privateNameBinding be ? ResolveBinding(privateIdentifier, env).
+ 3. Let privateName be GetValue(privateNameBinding).
+ 4. Assert: privateName is a Private Name.
+ 5. Return a value of type Reference whose base value is baseValue, whose referenced name is privateName, whose strict reference flag is true.
+
+---*/
+
+
+class C {
+ static #m() { return 'outer class'; }
+
+ static methodAccess() {
+ return this.#m();
+ }
+
+ static B = class {
+ #m = 'inner class';
+ static fieldAccess(o) {
+ return o.#m;
+ }
+ }
+}
+
+assert.sameValue(C.methodAccess(), 'outer class');
+
+let b = new C.B();
+
+assert.sameValue(C.B.fieldAccess(b), 'inner class');
+
+assert.throws(TypeError, function() {
+ C.B.fieldAccess(C);
+}, 'accessed private field from an arbritary object');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-static-method-shadowed-by-getter-on-nested-class.js b/js/src/tests/test262/language/statements/class/elements/private-static-method-shadowed-by-getter-on-nested-class.js
new file mode 100644
index 0000000000..f7ad4de011
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-static-method-shadowed-by-getter-on-nested-class.js
@@ -0,0 +1,92 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-static-method-shadowed-by-getter-on-nested-class.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: PrivateName of private static method can be shadowed on inner classes by a private getter (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class-static-fields-public, class-methods-private, class]
+flags: [generated]
+info: |
+ Updated Productions
+
+ CallExpression[Yield, Await]:
+ CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+ SuperCall[?Yield, ?Await]
+ CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+ CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+ CallExpression[?Yield, ?Await].IdentifierName
+ CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+ CallExpression[?Yield, ?Await].PrivateIdentifier
+
+ ClassTail : ClassHeritage { ClassBody }
+ ...
+ 6. Let classPrivateEnvironment be NewDeclarativeEnvironment(outerPrivateEnvironment).
+ 7. Let classPrivateEnvRec be classPrivateEnvironment's EnvironmentRecord.
+ ...
+ 15. Set the running execution context's LexicalEnvironment to classScope.
+ 16. Set the running execution context's PrivateEnvironment to classPrivateEnvironment.
+ ...
+ 33. If PrivateBoundIdentifiers of ClassBody contains a Private Name P such that P's [[Kind]] field is either "method" or "accessor" and P's [[Brand]] is F,
+ a. PrivateBrandAdd(F, F).
+ 34. For each item fieldRecord in order from staticFields,
+ a. Perform ? DefineField(F, field).
+
+ FieldDefinition : ClassElementName Initializer_opt
+ 1. Let name be the result of evaluating ClassElementName.
+ 2. ReturnIfAbrupt(name).
+ 3. If Initializer_opt is present,
+ a. Let lex be the Lexical Environment of the running execution context.
+ b. Let formalParameterList be an instance of the production FormalParameters : [empty].
+ c. Let privateScope be the PrivateEnvironment of the running execution context.
+ d. Let initializer be FunctionCreate(Method, formalParameterList, Initializer, lex, true, privateScope).
+ e. Perform MakeMethod(initializer, homeObject).
+ f. Let isAnonymousFunctionDefinition be IsAnonymousFunctionDefinition(Initializer).
+ 4. Else,
+ a. Let initializer be empty.
+ b. Let isAnonymousFunctionDeclaration be false.
+ 5. Return a Record { [[Name]]: name, [[Initializer]]: initializer, [[IsAnonymousFunctionDefinition]]: isAnonymousFunctionDefinition }.
+
+ MemberExpression : MemberExpression.PrivateIdentifier
+ 1. Let baseReference be the result of evaluating MemberExpression.
+ 2. Let baseValue be ? GetValue(baseReference).
+ 3. Let bv be ? RequireObjectCoercible(baseValue).
+ 4. Let fieldNameString be the StringValue of PrivateIdentifier.
+ 5. Return MakePrivateReference(bv, fieldNameString).
+
+ MakePrivateReference(baseValue, privateIdentifier)
+ 1. Let env be the running execution context's PrivateEnvironment.
+ 2. Let privateNameBinding be ? ResolveBinding(privateIdentifier, env).
+ 3. Let privateName be GetValue(privateNameBinding).
+ 4. Assert: privateName is a Private Name.
+ 5. Return a value of type Reference whose base value is baseValue, whose referenced name is privateName, whose strict reference flag is true.
+
+---*/
+
+
+class C {
+ static #m() { return 'outer class'; }
+
+ static methodAccess() {
+ return this.#m();
+ }
+
+ static B = class {
+ get #m() { return 'inner class'; }
+
+ static access(o) {
+ return o.#m;
+ }
+ }
+}
+
+assert.sameValue(C.methodAccess(), 'outer class');
+
+let b = new C.B();
+
+assert.sameValue(C.B.access(b), 'inner class');
+
+assert.throws(TypeError, function() {
+ C.B.access(C);
+}, 'accessed private getter from an arbritary object');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-static-method-shadowed-by-method-on-nested-class.js b/js/src/tests/test262/language/statements/class/elements/private-static-method-shadowed-by-method-on-nested-class.js
new file mode 100644
index 0000000000..6f48d6514e
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-static-method-shadowed-by-method-on-nested-class.js
@@ -0,0 +1,92 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-static-method-shadowed-by-method-on-nested-class.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: PrivateName of private static method can be shadowed on inner classes by a private method (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class-static-fields-public, class-methods-private, class]
+flags: [generated]
+info: |
+ Updated Productions
+
+ CallExpression[Yield, Await]:
+ CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+ SuperCall[?Yield, ?Await]
+ CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+ CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+ CallExpression[?Yield, ?Await].IdentifierName
+ CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+ CallExpression[?Yield, ?Await].PrivateIdentifier
+
+ ClassTail : ClassHeritage { ClassBody }
+ ...
+ 6. Let classPrivateEnvironment be NewDeclarativeEnvironment(outerPrivateEnvironment).
+ 7. Let classPrivateEnvRec be classPrivateEnvironment's EnvironmentRecord.
+ ...
+ 15. Set the running execution context's LexicalEnvironment to classScope.
+ 16. Set the running execution context's PrivateEnvironment to classPrivateEnvironment.
+ ...
+ 33. If PrivateBoundIdentifiers of ClassBody contains a Private Name P such that P's [[Kind]] field is either "method" or "accessor" and P's [[Brand]] is F,
+ a. PrivateBrandAdd(F, F).
+ 34. For each item fieldRecord in order from staticFields,
+ a. Perform ? DefineField(F, field).
+
+ FieldDefinition : ClassElementName Initializer_opt
+ 1. Let name be the result of evaluating ClassElementName.
+ 2. ReturnIfAbrupt(name).
+ 3. If Initializer_opt is present,
+ a. Let lex be the Lexical Environment of the running execution context.
+ b. Let formalParameterList be an instance of the production FormalParameters : [empty].
+ c. Let privateScope be the PrivateEnvironment of the running execution context.
+ d. Let initializer be FunctionCreate(Method, formalParameterList, Initializer, lex, true, privateScope).
+ e. Perform MakeMethod(initializer, homeObject).
+ f. Let isAnonymousFunctionDefinition be IsAnonymousFunctionDefinition(Initializer).
+ 4. Else,
+ a. Let initializer be empty.
+ b. Let isAnonymousFunctionDeclaration be false.
+ 5. Return a Record { [[Name]]: name, [[Initializer]]: initializer, [[IsAnonymousFunctionDefinition]]: isAnonymousFunctionDefinition }.
+
+ MemberExpression : MemberExpression.PrivateIdentifier
+ 1. Let baseReference be the result of evaluating MemberExpression.
+ 2. Let baseValue be ? GetValue(baseReference).
+ 3. Let bv be ? RequireObjectCoercible(baseValue).
+ 4. Let fieldNameString be the StringValue of PrivateIdentifier.
+ 5. Return MakePrivateReference(bv, fieldNameString).
+
+ MakePrivateReference(baseValue, privateIdentifier)
+ 1. Let env be the running execution context's PrivateEnvironment.
+ 2. Let privateNameBinding be ? ResolveBinding(privateIdentifier, env).
+ 3. Let privateName be GetValue(privateNameBinding).
+ 4. Assert: privateName is a Private Name.
+ 5. Return a value of type Reference whose base value is baseValue, whose referenced name is privateName, whose strict reference flag is true.
+
+---*/
+
+
+class C {
+ static #m() { return 'outer class'; }
+
+ static methodAccess() {
+ return this.#m();
+ }
+
+ static B = class {
+ #m() { return 'inner class'; }
+
+ static access(o) {
+ return o.#m();
+ }
+ }
+}
+
+assert.sameValue(C.methodAccess(), 'outer class');
+
+let b = new C.B();
+
+assert.sameValue(C.B.access(b), 'inner class');
+
+assert.throws(TypeError, function() {
+ C.B.access(C);
+}, 'accessed private method from an arbritary object');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-static-method-shadowed-by-setter-on-nested-class.js b/js/src/tests/test262/language/statements/class/elements/private-static-method-shadowed-by-setter-on-nested-class.js
new file mode 100644
index 0000000000..47497485d2
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-static-method-shadowed-by-setter-on-nested-class.js
@@ -0,0 +1,93 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-static-method-shadowed-by-setter-on-nested-class.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: PrivateName of private static method can be shadowed on inner classes by a private setter (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class-static-fields-public, class-methods-private, class]
+flags: [generated]
+info: |
+ Updated Productions
+
+ CallExpression[Yield, Await]:
+ CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+ SuperCall[?Yield, ?Await]
+ CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+ CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+ CallExpression[?Yield, ?Await].IdentifierName
+ CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+ CallExpression[?Yield, ?Await].PrivateIdentifier
+
+ ClassTail : ClassHeritage { ClassBody }
+ ...
+ 6. Let classPrivateEnvironment be NewDeclarativeEnvironment(outerPrivateEnvironment).
+ 7. Let classPrivateEnvRec be classPrivateEnvironment's EnvironmentRecord.
+ ...
+ 15. Set the running execution context's LexicalEnvironment to classScope.
+ 16. Set the running execution context's PrivateEnvironment to classPrivateEnvironment.
+ ...
+ 33. If PrivateBoundIdentifiers of ClassBody contains a Private Name P such that P's [[Kind]] field is either "method" or "accessor" and P's [[Brand]] is F,
+ a. PrivateBrandAdd(F, F).
+ 34. For each item fieldRecord in order from staticFields,
+ a. Perform ? DefineField(F, field).
+
+ FieldDefinition : ClassElementName Initializer_opt
+ 1. Let name be the result of evaluating ClassElementName.
+ 2. ReturnIfAbrupt(name).
+ 3. If Initializer_opt is present,
+ a. Let lex be the Lexical Environment of the running execution context.
+ b. Let formalParameterList be an instance of the production FormalParameters : [empty].
+ c. Let privateScope be the PrivateEnvironment of the running execution context.
+ d. Let initializer be FunctionCreate(Method, formalParameterList, Initializer, lex, true, privateScope).
+ e. Perform MakeMethod(initializer, homeObject).
+ f. Let isAnonymousFunctionDefinition be IsAnonymousFunctionDefinition(Initializer).
+ 4. Else,
+ a. Let initializer be empty.
+ b. Let isAnonymousFunctionDeclaration be false.
+ 5. Return a Record { [[Name]]: name, [[Initializer]]: initializer, [[IsAnonymousFunctionDefinition]]: isAnonymousFunctionDefinition }.
+
+ MemberExpression : MemberExpression.PrivateIdentifier
+ 1. Let baseReference be the result of evaluating MemberExpression.
+ 2. Let baseValue be ? GetValue(baseReference).
+ 3. Let bv be ? RequireObjectCoercible(baseValue).
+ 4. Let fieldNameString be the StringValue of PrivateIdentifier.
+ 5. Return MakePrivateReference(bv, fieldNameString).
+
+ MakePrivateReference(baseValue, privateIdentifier)
+ 1. Let env be the running execution context's PrivateEnvironment.
+ 2. Let privateNameBinding be ? ResolveBinding(privateIdentifier, env).
+ 3. Let privateName be GetValue(privateNameBinding).
+ 4. Assert: privateName is a Private Name.
+ 5. Return a value of type Reference whose base value is baseValue, whose referenced name is privateName, whose strict reference flag is true.
+
+---*/
+
+
+class C {
+ static #m() { return 'outer class'; }
+
+ static methodAccess() {
+ return this.#m();
+ }
+
+ static B = class {
+ set #m(v) { this._v = v; }
+
+ static access(o) {
+ o.#m = 'inner class';
+ }
+ }
+}
+
+assert.sameValue(C.methodAccess(), 'outer class');
+
+let b = new C.B();
+
+C.B.access(b);
+assert.sameValue(b._v, 'inner class');
+
+assert.throws(TypeError, function() {
+ C.B.access(C);
+}, 'accessed private setter from an arbritary object');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-static-method-usage-inside-nested-class.js b/js/src/tests/test262/language/statements/class/elements/private-static-method-usage-inside-nested-class.js
new file mode 100644
index 0000000000..3bbf3d5462
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-static-method-usage-inside-nested-class.js
@@ -0,0 +1,83 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-static-method-usage-inside-nested-class.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: PrivateName of private static method is available inside inner classes (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class-static-fields-public, class]
+flags: [generated]
+info: |
+ Updated Productions
+
+ CallExpression[Yield, Await]:
+ CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+ SuperCall[?Yield, ?Await]
+ CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+ CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+ CallExpression[?Yield, ?Await].IdentifierName
+ CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+ CallExpression[?Yield, ?Await].PrivateIdentifier
+
+ ClassTail : ClassHeritage { ClassBody }
+ ...
+ 6. Let classPrivateEnvironment be NewDeclarativeEnvironment(outerPrivateEnvironment).
+ 7. Let classPrivateEnvRec be classPrivateEnvironment's EnvironmentRecord.
+ ...
+ 15. Set the running execution context's LexicalEnvironment to classScope.
+ 16. Set the running execution context's PrivateEnvironment to classPrivateEnvironment.
+ ...
+ 33. If PrivateBoundIdentifiers of ClassBody contains a Private Name P such that P's [[Kind]] field is either "method" or "accessor" and P's [[Brand]] is F,
+ a. PrivateBrandAdd(F, F).
+ 34. For each item fieldRecord in order from staticFields,
+ a. Perform ? DefineField(F, field).
+
+ FieldDefinition : ClassElementName Initializer_opt
+ 1. Let name be the result of evaluating ClassElementName.
+ 2. ReturnIfAbrupt(name).
+ 3. If Initializer_opt is present,
+ a. Let lex be the Lexical Environment of the running execution context.
+ b. Let formalParameterList be an instance of the production FormalParameters : [empty].
+ c. Let privateScope be the PrivateEnvironment of the running execution context.
+ d. Let initializer be FunctionCreate(Method, formalParameterList, Initializer, lex, true, privateScope).
+ e. Perform MakeMethod(initializer, homeObject).
+ f. Let isAnonymousFunctionDefinition be IsAnonymousFunctionDefinition(Initializer).
+ 4. Else,
+ a. Let initializer be empty.
+ b. Let isAnonymousFunctionDeclaration be false.
+ 5. Return a Record { [[Name]]: name, [[Initializer]]: initializer, [[IsAnonymousFunctionDefinition]]: isAnonymousFunctionDefinition }.
+
+ MemberExpression : MemberExpression.PrivateIdentifier
+ 1. Let baseReference be the result of evaluating MemberExpression.
+ 2. Let baseValue be ? GetValue(baseReference).
+ 3. Let bv be ? RequireObjectCoercible(baseValue).
+ 4. Let fieldNameString be the StringValue of PrivateIdentifier.
+ 5. Return MakePrivateReference(bv, fieldNameString).
+
+ MakePrivateReference(baseValue, privateIdentifier)
+ 1. Let env be the running execution context's PrivateEnvironment.
+ 2. Let privateNameBinding be ? ResolveBinding(privateIdentifier, env).
+ 3. Let privateName be GetValue(privateNameBinding).
+ 4. Assert: privateName is a Private Name.
+ 5. Return a value of type Reference whose base value is baseValue, whose referenced name is privateName, whose strict reference flag is true.
+
+---*/
+
+
+class C {
+ static #m() {
+ return 'outer class';
+ }
+
+ static B = class {
+ static methodAccess(o) {
+ return o.#m();
+ }
+ }
+}
+
+assert.sameValue(C.B.methodAccess(C), 'outer class');
+assert.throws(TypeError, function() {
+ C.B.methodAccess(C.B);
+}, 'accessed static private method from an arbritary object');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-static-method-visible-to-direct-eval.js b/js/src/tests/test262/language/statements/class/elements/private-static-method-visible-to-direct-eval.js
new file mode 100644
index 0000000000..01d010c80f
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-static-method-visible-to-direct-eval.js
@@ -0,0 +1,63 @@
+// Copyright (C) 2019 Caio Lima (Igalia SL). All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: Private static method is visible to direct eval code
+esid: sec-privatefieldget
+info: |
+ PrivateFieldGet (P, O)
+ 1. Assert: P is a Private Name.
+ 2. If O is not an object, throw a TypeError exception.
+ 3. If P.[[Kind]] is "field",
+ a. Let entry be PrivateFieldFind(P, O).
+ b. If entry is empty, throw a TypeError exception.
+ c. Return entry.[[PrivateFieldValue]].
+ 4. Perform ? PrivateBrandCheck(O, P).
+ 5. If P.[[Kind]] is "method",
+ a. Return P.[[Value]].
+ 6. Else,
+ a. Assert: P.[[Kind]] is "accessor".
+ b. If P does not have a [[Get]] field, throw a TypeError exception.
+ c. Let getter be P.[[Get]].
+ d. Return ? Call(getter, O).
+
+ ClassElementName : PrivateIdentifier
+ 1. Let privateIdentifier be StringValue of PrivateIdentifier.
+ 2. Let privateName be NewPrivateName(privateIdentifier).
+ 3. Let scope be the running execution context's PrivateEnvironment.
+ 4. Let scopeEnvRec be scope's EnvironmentRecord.
+ 5. Perform ! scopeEnvRec.InitializeBinding(privateIdentifier, privateName).
+ 6. Return privateName.
+
+ MakePrivateReference ( baseValue, privateIdentifier )
+ 1. Let env be the running execution context's PrivateEnvironment.
+ 2. Let privateNameBinding be ? ResolveBinding(privateIdentifier, env).
+ 3. Let privateName be GetValue(privateNameBinding).
+ 4. Assert: privateName is a Private Name.
+ 5. Return a value of type Reference whose base value is baseValue, whose referenced name is privateName, whose strict reference flag is true.
+features: [class-static-methods-private, class]
+---*/
+
+class C {
+ static #m() {
+ return "Test262";
+ }
+
+ static accessWithEval() {
+ return eval("this.#m()");
+ }
+}
+
+class D {
+ static #m() {
+ throw new Test262Error();
+ }
+}
+
+assert.sameValue(C.accessWithEval(), "Test262");
+
+assert.throws(TypeError, function() {
+ C.accessWithEval.call(D);
+}, "invalid access to a private field");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-static-setter-abrupt-completition.js b/js/src/tests/test262/language/statements/class/elements/private-static-setter-abrupt-completition.js
new file mode 100644
index 0000000000..14afc2640f
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-static-setter-abrupt-completition.js
@@ -0,0 +1,42 @@
+// Copyright (C) 2019 Caio Lima (Igalia SL). All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: PrivateFieldSet should return an abrupt completion
+esid: sec-privatefieldset
+info: |
+ PrivateFieldSet (P, O, value)
+ 1. Assert: P is a Private Name.
+ 2. If O is not an object, throw a TypeError exception.
+ 3. If P.[[Kind]] is "field",
+ a. Let entry be PrivateFieldFind(P, O).
+ b. If entry is empty, throw a TypeError exception.
+ c. Set entry.[[PrivateFieldValue]] to value.
+ d. Return.
+ 4. If P.[[Kind]] is "method", throw a TypeError exception.
+ 5. Else,
+ a. Assert: P.[[Kind]] is "accessor".
+ b. If O.[[PrivateFieldBrands]] does not contain P.[[Brand]], throw a TypeError exception.
+ c. If P does not have a [[Set]] field, throw a TypeError exception.
+ d. Let setter be P.[[Set]].
+ e. Perform ? Call(setter, O, value).
+ f. Return.
+features: [class-methods-private, class]
+---*/
+
+class C {
+ set #m(_) {
+ throw new Test262Error();
+ }
+
+ access() {
+ this.#m = 'Test262';
+ }
+}
+
+let c = new C();
+assert.throws(Test262Error, function() {
+ c.access();
+}, 'private setter should have abrupt completion');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-static-setter-visible-to-direct-eval.js b/js/src/tests/test262/language/statements/class/elements/private-static-setter-visible-to-direct-eval.js
new file mode 100644
index 0000000000..e4205b729d
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-static-setter-visible-to-direct-eval.js
@@ -0,0 +1,64 @@
+// Copyright (C) 2019 Caio Lima (Igalia SL). All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: Private static setter is visible to direct eval code
+esid: sec-privatefieldget
+info: |
+ PrivateFieldGet (P, O)
+ 1. Assert: P is a Private Name.
+ 2. If O is not an object, throw a TypeError exception.
+ 3. If P.[[Kind]] is "field",
+ a. Let entry be PrivateFieldFind(P, O).
+ b. If entry is empty, throw a TypeError exception.
+ c. Return entry.[[PrivateFieldValue]].
+ 4. Perform ? PrivateBrandCheck(O, P).
+ 5. If P.[[Kind]] is "method",
+ a. Return P.[[Value]].
+ 6. Else,
+ a. Assert: P.[[Kind]] is "accessor".
+ b. If P does not have a [[Get]] field, throw a TypeError exception.
+ c. Let getter be P.[[Get]].
+ d. Return ? Call(getter, O).
+
+ ClassElementName : PrivateIdentifier
+ 1. Let privateIdentifier be StringValue of PrivateIdentifier.
+ 2. Let privateName be NewPrivateName(privateIdentifier).
+ 3. Let scope be the running execution context's PrivateEnvironment.
+ 4. Let scopeEnvRec be scope's EnvironmentRecord.
+ 5. Perform ! scopeEnvRec.InitializeBinding(privateIdentifier, privateName).
+ 6. Return privateName.
+
+ MakePrivateReference ( baseValue, privateIdentifier )
+ 1. Let env be the running execution context's PrivateEnvironment.
+ 2. Let privateNameBinding be ? ResolveBinding(privateIdentifier, env).
+ 3. Let privateName be GetValue(privateNameBinding).
+ 4. Assert: privateName is a Private Name.
+ 5. Return a value of type Reference whose base value is baseValue, whose referenced name is privateName, whose strict reference flag is true.
+features: [class-static-methods-private, class]
+---*/
+
+class C {
+ static set #m(v) {
+ this._v = v;
+ }
+
+ static setWithEval() {
+ eval('this.#m = "Test262"');
+ }
+}
+
+class D {
+ static set #m(v) {
+ throw new Test262Error('should never be called');
+ }
+}
+
+C.setWithEval();
+assert.sameValue(C._v, 'Test262');
+
+assert.throws(TypeError, function() {
+ C.getWithEval.call(D);
+}, 'invalid access to a static private getter');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/private-ternary-init-err-contains-arguments.js b/js/src/tests/test262/language/statements/class/elements/private-ternary-init-err-contains-arguments.js
new file mode 100644
index 0000000000..3d409fceb2
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-ternary-init-err-contains-arguments.js
@@ -0,0 +1,35 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/init-err-contains-arguments.case
+// - src/class-elements/initializer-error/cls-decl-fields-private-ternary.template
+/*---
+description: Syntax error if `arguments` used in class field (private field, ternary expression)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-public, class-fields-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ FieldDefinition:
+ PropertyNameInitializeropt
+
+ - It is a Syntax Error if ContainsArguments of Initializer is true.
+
+ Static Semantics: ContainsArguments
+ IdentifierReference : Identifier
+
+ 1. If the StringValue of Identifier is "arguments", return true.
+ ...
+ For all other grammatical productions, recurse on all nonterminals. If any piece returns true, then return true. Otherwise return false.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x = false ? {} : arguments;
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/private-ternary-init-err-contains-super.js b/js/src/tests/test262/language/statements/class/elements/private-ternary-init-err-contains-super.js
new file mode 100644
index 0000000000..4f82a572ae
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-ternary-init-err-contains-super.js
@@ -0,0 +1,28 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/init-err-contains-super.case
+// - src/class-elements/initializer-error/cls-decl-fields-private-ternary.template
+/*---
+description: Syntax error if `super()` used in class field (private field, ternary expression)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-public, class-fields-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ FieldDefinition:
+ PropertyNameInitializeropt
+
+ - It is a Syntax Error if Initializer is present and Initializer Contains SuperCall is true.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x = false ? {} : super();
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/private-typeof-init-err-contains-arguments.js b/js/src/tests/test262/language/statements/class/elements/private-typeof-init-err-contains-arguments.js
new file mode 100644
index 0000000000..b2a0a1fe0e
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-typeof-init-err-contains-arguments.js
@@ -0,0 +1,35 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/init-err-contains-arguments.case
+// - src/class-elements/initializer-error/cls-decl-fields-private-typeof.template
+/*---
+description: Syntax error if `arguments` used in class field (private field, typeof expression)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-public, class-fields-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ FieldDefinition:
+ PropertyNameInitializeropt
+
+ - It is a Syntax Error if ContainsArguments of Initializer is true.
+
+ Static Semantics: ContainsArguments
+ IdentifierReference : Identifier
+
+ 1. If the StringValue of Identifier is "arguments", return true.
+ ...
+ For all other grammatical productions, recurse on all nonterminals. If any piece returns true, then return true. Otherwise return false.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x = typeof arguments;
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/private-typeof-init-err-contains-super.js b/js/src/tests/test262/language/statements/class/elements/private-typeof-init-err-contains-super.js
new file mode 100644
index 0000000000..d3ab2de187
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-typeof-init-err-contains-super.js
@@ -0,0 +1,28 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/init-err-contains-super.case
+// - src/class-elements/initializer-error/cls-decl-fields-private-typeof.template
+/*---
+description: Syntax error if `super()` used in class field (private field, typeof expression)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-public, class-fields-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ FieldDefinition:
+ PropertyNameInitializeropt
+
+ - It is a Syntax Error if Initializer is present and Initializer Contains SuperCall is true.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x = typeof super();
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/privatefield-on-proxy.js b/js/src/tests/test262/language/statements/class/elements/privatefield-on-proxy.js
new file mode 100644
index 0000000000..0fa28efac7
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/privatefield-on-proxy.js
@@ -0,0 +1,55 @@
+// Copyright (C) 2019 Caio Lima. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: Sucessyfully get private reference without using [[Get]]
+esid: sec-getvalue
+info: |
+ GetValue(V)
+ ...
+ 5. If IsPropertyReference(V), then
+ ...
+ b. If IsPrivateReference(V), then
+ i. Let env be the running execution context's PrivateNameEnvironment.
+ ii. Let field be ? ResolveBinding(GetReferencedName(V), env).
+ iii. Assert: field is a Private Name.
+ iv. Return ? PrivateFieldGet(field, base).
+ c. Return ? base.[[Get]](GetReferencedName(V), GetThisValue(V)).
+ PrivateFieldGet(P, O)
+ 1. Assert: P is a Private Name value.
+ 2. If O is not an object, throw a TypeError exception.
+ 3. Let entry be PrivateFieldFind(P, O).
+ 4. If entry is empty, throw a TypeError exception.
+ 5. Return entry.[[PrivateFieldValue]].
+includes: [compareArray.js]
+features: [class, class-fields-private, Proxy]
+---*/
+
+let arr = [];
+
+class ProxyBase {
+ constructor() {
+ return new Proxy(this, {
+ get: function (obj, prop) {
+ arr.push(prop);
+ return obj[prop];
+ }
+ });
+ }
+}
+
+class Test extends ProxyBase {
+ #f = 3;
+ method() {
+ return this.#f;
+ }
+}
+
+let t = new Test();
+let r = t.method();
+assert.sameValue(r, 3);
+
+assert.compareArray(arr, ['method']);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/privatefieldadd-typeerror.js b/js/src/tests/test262/language/statements/class/elements/privatefieldadd-typeerror.js
new file mode 100644
index 0000000000..6bd7feb092
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/privatefieldadd-typeerror.js
@@ -0,0 +1,63 @@
+// Copyright (C) 2017 Valerie Young. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: Class construction should error if attempting to add private field twice
+esid: sec-ecmascript-function-objects-construct-argumentslist-newtarget
+info: |
+ [[Construct]] ( argumentsList, newTarget)
+ ...
+ 8. If kind is "base", then
+ a. Perform OrdinaryCallBindThis(F, calleeContext, thisArgument).
+ b. Let result be InitializeInstanceFields(thisArgument, F).
+ c. If result is an abrupt completion, then
+ i. Remove calleeContext from execution context stack and restore callerContext as the running execution context.
+ ii. Return Completion(result).
+
+ InitializeInstanceFields ( O, constructor )
+ 1. Assert: Type ( O ) is Object.
+ 2. Assert: Assert constructor is an ECMAScript function object.
+ 3. Let fieldRecords be the value of constructor's [[Fields]] internal slot.
+ 4. For each item fieldRecord in order from fieldRecords,
+ a. Perform ? DefineField(O, fieldRecord).
+ 5. Return.
+
+ DefineField(receiver, fieldRecord)
+ ...
+ 8. If fieldName is a Private Name,
+ a. Perform ? PrivateFieldAdd(fieldName, receiver, initValue).
+
+ PrivateFieldAdd (P, O, value)
+ 1. Assert: P is a Private Name value.
+ 2. If O is not an object, throw a TypeError exception.
+ 3. Let entry be PrivateFieldFind(P, O).
+ 4. If entry is not empty, throw a TypeError exception.
+ ...
+
+features: [class, class-fields-private]
+---*/
+
+
+class A {
+ constructor(arg) {
+ return arg;
+ }
+}
+
+class C extends A {
+ #x;
+
+ constructor(arg) {
+ super(arg);
+ }
+}
+
+var containsprivatex = new C();
+
+assert.throws(TypeError, function() {
+ // After the super call in C's constructor, the `this` value in C will
+ // already have "#x" in it's [[PrivateFieldValues]]
+ new C(containsprivatex);
+})
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/privatefieldget-primitive-receiver.js b/js/src/tests/test262/language/statements/class/elements/privatefieldget-primitive-receiver.js
new file mode 100644
index 0000000000..2b56307e8c
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/privatefieldget-primitive-receiver.js
@@ -0,0 +1,78 @@
+// Copyright (C) 2020 Caio Lima (Igalia S.L). All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: PrivateField calls ToObject when receiver is a primitive
+esid: sec-getvalue
+info: |
+ GetValue ( V )
+ ...
+ 5. If IsPropertyReference(V), then
+ a. If HasPrimitiveBase(V), then
+ i. Assert: In this case, base will never be null or undefined.
+ ii. Let base be ToObject(base).
+ b. If IsPrivateReference(V), then
+ i. Return ? PrivateFieldGet(field, base).
+ ...
+
+ PrivateFieldGet (P, O )
+ 1. Assert: P is a Private Name value.
+ 2. If O is not an object, throw a TypeError exception.
+ 3. Let entry be PrivateFieldFind(P, O).
+ 4. If entry is empty, throw a TypeError exception.
+ 5. Return entry.[[PrivateFieldValue]].
+
+features: [class, class-fields-private, BigInt]
+---*/
+
+let count = 0;
+
+class C {
+ #p = 1;
+
+ method() {
+ count++;
+ try {
+ count++;
+ this.#p;
+ } catch (e) {
+ count++;
+ if (e instanceof TypeError) {
+ throw new Test262Error();
+ }
+ }
+ }
+}
+
+assert.throws(Test262Error, () => {
+ new C().method.call(15);
+});
+assert.sameValue(count, 3);
+
+assert.throws(Test262Error, () => {
+ new C().method.call('Test262');
+});
+assert.sameValue(count, 6);
+
+assert.throws(Test262Error, () => {
+ new C().method.call(Symbol('Test262'));
+});
+assert.sameValue(count, 9);
+
+assert.throws(Test262Error, () => {
+ new C().method.call(15n);
+});
+assert.sameValue(count, 12);
+
+assert.throws(Test262Error, () => {
+ new C().method.call(null);
+});
+assert.sameValue(count, 15);
+
+assert.throws(Test262Error, () => {
+ new C().method.call(undefined);
+});
+assert.sameValue(count, 18);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/privatefieldget-success-1.js b/js/src/tests/test262/language/statements/class/elements/privatefieldget-success-1.js
new file mode 100644
index 0000000000..c53b93740c
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/privatefieldget-success-1.js
@@ -0,0 +1,48 @@
+// Copyright (C) 2017 Valerie Young. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: Successfully access private field
+esid: sec-getvalue
+info: |
+ GetValue ( V )
+ ...
+ 5. If IsPropertyReference(V), then
+ ...
+ b. If IsPrivateReference(V), then
+ i. Let env be the running execution context's PrivateNameEnvironment.
+ ii. Let field be ? ResolveBinding(GetReferencedName(V), env).
+ iii. Assert: field is a Private Name.
+ iv. Return ? PrivateFieldGet(field, base).
+
+ PrivateFieldGet (P, O )
+ 1. Assert: P is a Private Name value.
+ 2. If O is not an object, throw a TypeError exception.
+ 3. Let entry be PrivateFieldFind(P, O).
+ 4. If entry is empty, throw a TypeError exception.
+ 5. Return entry.[[PrivateFieldValue]].
+
+features: [class, class-fields-private]
+---*/
+
+class Outer {
+ #x = 42;
+
+ innerclass() {
+ var self = this;
+
+ return class extends Outer {
+ f() {
+ return self.#x;
+ }
+ }
+ }
+}
+
+var Inner = new Outer().innerclass();
+var i = new Inner();
+var value = i.f();
+
+assert.sameValue(value, 42)
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/privatefieldget-success-2.js b/js/src/tests/test262/language/statements/class/elements/privatefieldget-success-2.js
new file mode 100644
index 0000000000..e839d3594e
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/privatefieldget-success-2.js
@@ -0,0 +1,46 @@
+// Copyright (C) 2017 Valerie Young. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: Successfully access private field
+esid: sec-getvalue
+info: |
+ GetValue ( V )
+ ...
+ 5. If IsPropertyReference(V), then
+ ...
+ b. If IsPrivateReference(V), then
+ i. Let env be the running execution context's PrivateNameEnvironment.
+ ii. Let field be ? ResolveBinding(GetReferencedName(V), env).
+ iii. Assert: field is a Private Name.
+ iv. Return ? PrivateFieldGet(field, base).
+
+ PrivateFieldGet (P, O )
+ 1. Assert: P is a Private Name value.
+ 2. If O is not an object, throw a TypeError exception.
+ 3. Let entry be PrivateFieldFind(P, O).
+ 4. If entry is empty, throw a TypeError exception.
+ 5. Return entry.[[PrivateFieldValue]].
+
+features: [class, class-fields-private]
+---*/
+
+
+class A {
+ #x = 'Avalue';
+ x() {
+ return this.#x;
+ }
+}
+class B extends A {
+ #x = 'Bvalue';
+ x() {
+ return this.#x;
+ }
+}
+
+var b = new B();
+
+assert.sameValue(b.x(), 'Bvalue')
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/privatefieldget-success-3.js b/js/src/tests/test262/language/statements/class/elements/privatefieldget-success-3.js
new file mode 100644
index 0000000000..73bcffa0cf
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/privatefieldget-success-3.js
@@ -0,0 +1,43 @@
+// Copyright (C) 2017 Valerie Young. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: Successfully access private field
+esid: sec-getvalue
+info: |
+ GetValue ( V )
+ ...
+ 5. If IsPropertyReference(V), then
+ ...
+ b. If IsPrivateReference(V), then
+ i. Let env be the running execution context's PrivateNameEnvironment.
+ ii. Let field be ? ResolveBinding(GetReferencedName(V), env).
+ iii. Assert: field is a Private Name.
+ iv. Return ? PrivateFieldGet(field, base).
+
+ PrivateFieldGet (P, O )
+ 1. Assert: P is a Private Name value.
+ 2. If O is not an object, throw a TypeError exception.
+ 3. Let entry be PrivateFieldFind(P, O).
+ 4. If entry is empty, throw a TypeError exception.
+ 5. Return entry.[[PrivateFieldValue]].
+
+features: [class, class-fields-private]
+---*/
+
+
+class A {
+ #x = 'Avalue';
+ x() {
+ return this.#x;
+ }
+}
+class B extends A {
+ #x = 'Bvalue';
+}
+
+var b = new B();
+
+assert.sameValue(b.x(), 'Avalue')
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/privatefieldget-success-4.js b/js/src/tests/test262/language/statements/class/elements/privatefieldget-success-4.js
new file mode 100644
index 0000000000..9ba095942e
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/privatefieldget-success-4.js
@@ -0,0 +1,42 @@
+// Copyright (C) 2017 Valerie Young. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: Successfully access private field
+esid: sec-getvalue
+info: |
+ GetValue ( V )
+ ...
+ 5. If IsPropertyReference(V), then
+ ...
+ b. If IsPrivateReference(V), then
+ i. Let env be the running execution context's PrivateNameEnvironment.
+ ii. Let field be ? ResolveBinding(GetReferencedName(V), env).
+ iii. Assert: field is a Private Name.
+ iv. Return ? PrivateFieldGet(field, base).
+
+ PrivateFieldGet (P, O )
+ 1. Assert: P is a Private Name value.
+ 2. If O is not an object, throw a TypeError exception.
+ 3. Let entry be PrivateFieldFind(P, O).
+ 4. If entry is empty, throw a TypeError exception.
+ 5. Return entry.[[PrivateFieldValue]].
+
+features: [class, class-fields-private]
+---*/
+
+
+class A {
+ #x = 'Avalue';
+ x() {
+ return this.#x;
+ }
+}
+class B extends A {
+}
+
+var b = new B();
+
+assert.sameValue(b.x(), 'Avalue')
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/privatefieldget-success-5.js b/js/src/tests/test262/language/statements/class/elements/privatefieldget-success-5.js
new file mode 100644
index 0000000000..3863cefd40
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/privatefieldget-success-5.js
@@ -0,0 +1,42 @@
+// Copyright (C) 2017 Valerie Young. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: Successfully access private field
+esid: sec-getvalue
+info: |
+ GetValue ( V )
+ ...
+ 5. If IsPropertyReference(V), then
+ ...
+ b. If IsPrivateReference(V), then
+ i. Let env be the running execution context's PrivateNameEnvironment.
+ ii. Let field be ? ResolveBinding(GetReferencedName(V), env).
+ iii. Assert: field is a Private Name.
+ iv. Return ? PrivateFieldGet(field, base).
+
+ PrivateFieldGet (P, O )
+ 1. Assert: P is a Private Name value.
+ 2. If O is not an object, throw a TypeError exception.
+ 3. Let entry be PrivateFieldFind(P, O).
+ 4. If entry is empty, throw a TypeError exception.
+ 5. Return entry.[[PrivateFieldValue]].
+
+features: [class, class-fields-private]
+---*/
+
+
+class C {
+ #x = 42;
+ f() {
+ return this.#x;
+ }
+}
+
+var c1 = new C();
+var c2 = new C();
+var value = c2.f.call(c1);
+
+assert.sameValue(value, 42);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/privatefieldget-typeerror-1.js b/js/src/tests/test262/language/statements/class/elements/privatefieldget-typeerror-1.js
new file mode 100644
index 0000000000..69f6e48525
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/privatefieldget-typeerror-1.js
@@ -0,0 +1,41 @@
+// Copyright (C) 2017 Valerie Young. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: Cannot access private field before the entry was added to [[PrivateFieldValues]]
+esid: sec-getvalue
+info: |
+ GetValue ( V )
+ ...
+ 5. If IsPropertyReference(V), then
+ ...
+ b. If IsPrivateReference(V), then
+ i. Let env be the running execution context's PrivateNameEnvironment.
+ ii. Let field be ? ResolveBinding(GetReferencedName(V), env).
+ iii. Assert: field is a Private Name.
+ iv. Return ? PrivateFieldGet(field, base).
+
+ PrivateFieldGet (P, O )
+ 1. Assert: P is a Private Name value.
+ 2. If O is not an object, throw a TypeError exception.
+ 3. Let entry be PrivateFieldFind(P, O).
+ 4. If entry is empty, throw a TypeError exception.
+
+ PrivateFieldFind (P, O)
+ 1. Assert: P is a Private Name value.
+ 2. Assert: O is an object with a [[PrivateFieldValues]] internal slot.
+ 3. For each element entry in O.[[PrivateFieldValues]],
+ a. If entry.[[PrivateName]] is P, return entry.
+ 4. Return empty.
+
+features: [class, class-fields-private, class-fields-public]
+---*/
+
+class C {
+ y = this.#x;
+ #x;
+}
+
+assert.throws(TypeError, function() { new C(); })
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/privatefieldget-typeerror-2.js b/js/src/tests/test262/language/statements/class/elements/privatefieldget-typeerror-2.js
new file mode 100644
index 0000000000..1a36416cfa
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/privatefieldget-typeerror-2.js
@@ -0,0 +1,57 @@
+// Copyright (C) 2017 Valerie Young. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: TypeError when referenced private field cannot be found in `this`'s [[PrivateFieldValues]]
+esid: sec-getvalue
+info: |
+ GetValue ( V )
+ ...
+ 5. If IsPropertyReference(V), then
+ ...
+ b. If IsPrivateReference(V), then
+ i. Let env be the running execution context's PrivateNameEnvironment.
+ ii. Let field be ? ResolveBinding(GetReferencedName(V), env).
+ iii. Assert: field is a Private Name.
+ iv. Return ? PrivateFieldGet(field, base).
+
+ PrivateFieldGet (P, O )
+ 1. Assert: P is a Private Name value.
+ 2. If O is not an object, throw a TypeError exception.
+ 3. Let entry be PrivateFieldFind(P, O).
+ 4. If entry is empty, throw a TypeError exception.
+
+ PrivateFieldFind (P, O)
+ 1. Assert: P is a Private Name value.
+ 2. Assert: O is an object with a [[PrivateFieldValues]] internal slot.
+ 3. For each element entry in O.[[PrivateFieldValues]],
+ a. If entry.[[PrivateName]] is P, return entry.
+ 4. Return empty.
+
+features: [class, class-fields-private]
+---*/
+
+class Outer {
+ #x = 42;
+
+ innerclass() {
+
+ // create class within in Outerclass -- the PrivateNameEnvironment binding for
+ // private field `#x` is resolvable.
+ return class {
+ f() {
+ return this.#x;
+ }
+ }
+ }
+}
+
+var Inner = new Outer().innerclass();
+var i = new Inner();
+
+assert.throws(TypeError, function() {
+ // when f() is called, the private field will not be found in Inner's `this`
+ i.f();
+})
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/privatefieldget-typeerror-3.js b/js/src/tests/test262/language/statements/class/elements/privatefieldget-typeerror-3.js
new file mode 100644
index 0000000000..979a4c263a
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/privatefieldget-typeerror-3.js
@@ -0,0 +1,55 @@
+// Copyright (C) 2017 Valerie Young. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: >
+ Referenced lexically scoped private field found in `this`'s [[PrivateFieldValues]]
+esid: sec-getvalue
+info: |
+ GetValue ( V )
+ ...
+ 5. If IsPropertyReference(V), then
+ ...
+ b. If IsPrivateReference(V), then
+ i. Let env be the running execution context's PrivateNameEnvironment.
+ ii. Let field be ? ResolveBinding(GetReferencedName(V), env).
+ iii. Assert: field is a Private Name.
+ iv. Return ? PrivateFieldGet(field, base).
+
+ PrivateFieldGet (P, O )
+ 1. Assert: P is a Private Name value.
+ 2. If O is not an object, throw a TypeError exception.
+ 3. Let entry be PrivateFieldFind(P, O).
+ 4. If entry is empty, throw a TypeError exception.
+
+ PrivateFieldFind (P, O)
+ 1. Assert: P is a Private Name value.
+ 2. Assert: O is an object with a [[PrivateFieldValues]] internal slot.
+ 3. For each element entry in O.[[PrivateFieldValues]],
+ a. If entry.[[PrivateName]] is P, return entry.
+ 4. Return empty.
+
+features: [class, class-fields-private]
+---*/
+
+class Outer {
+ #x = 42;
+
+ innerclass() {
+
+ // create class within in Outerclass -- the PrivateNameEnvironment binding for
+ // private field `#x` is resolvable.
+ return class extends Outer {
+ f() {
+ return this.#x;
+ }
+ }
+ }
+}
+
+var Inner = new Outer().innerclass();
+var i = new Inner();
+
+assert.sameValue(i.f(), 42);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/privatefieldget-typeerror-4.js b/js/src/tests/test262/language/statements/class/elements/privatefieldget-typeerror-4.js
new file mode 100644
index 0000000000..878296ac4c
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/privatefieldget-typeerror-4.js
@@ -0,0 +1,55 @@
+// Copyright (C) 2017 Valerie Young. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: TypeError when referenced private field cannot be found in `this`'s [[PrivateFieldValues]]
+esid: sec-getvalue
+info: |
+ GetValue ( V )
+ ...
+ 5. If IsPropertyReference(V), then
+ ...
+ b. If IsPrivateReference(V), then
+ i. Let env be the running execution context's PrivateNameEnvironment.
+ ii. Let field be ? ResolveBinding(GetReferencedName(V), env).
+ iii. Assert: field is a Private Name.
+ iv. Return ? PrivateFieldGet(field, base).
+
+ PrivateFieldGet (P, O )
+ 1. Assert: P is a Private Name value.
+ 2. If O is not an object, throw a TypeError exception.
+ 3. Let entry be PrivateFieldFind(P, O).
+ 4. If entry is empty, throw a TypeError exception.
+
+ PrivateFieldFind (P, O)
+ 1. Assert: P is a Private Name value.
+ 2. Assert: O is an object with a [[PrivateFieldValues]] internal slot.
+ 3. For each element entry in O.[[PrivateFieldValues]],
+ a. If entry.[[PrivateName]] is P, return entry.
+ 4. Return empty.
+
+features: [class, class-fields-private]
+---*/
+
+function classfactory() {
+ return class {
+ #x;
+ f() {
+ this.#x;
+ }
+ }
+}
+
+var C1 = classfactory();
+var C2 = classfactory();
+
+var c1 = new C1();
+var c2 = new C2();
+
+assert.throws(TypeError, function() {
+ // when f() is called in class C1, the Private Name binding for #x in C1 will
+ // not found in C2's [[PrivateNameValues]]
+ c1.f.call(c2);
+})
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/privatefieldget-typeerror-5.js b/js/src/tests/test262/language/statements/class/elements/privatefieldget-typeerror-5.js
new file mode 100644
index 0000000000..11eb32250d
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/privatefieldget-typeerror-5.js
@@ -0,0 +1,60 @@
+// Copyright (C) 2017 Valerie Young. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: TypeError when referenced private field cannot be found in `this`'s [[PrivateFieldValues]]
+esid: sec-getvalue
+info: |
+ GetValue ( V )
+ ...
+ 5. If IsPropertyReference(V), then
+ ...
+ b. If IsPrivateReference(V), then
+ i. Let env be the running execution context's PrivateNameEnvironment.
+ ii. Let field be ? ResolveBinding(GetReferencedName(V), env).
+ iii. Assert: field is a Private Name.
+ iv. Return ? PrivateFieldGet(field, base).
+
+ PrivateFieldGet (P, O )
+ 1. Assert: P is a Private Name value.
+ 2. If O is not an object, throw a TypeError exception.
+ 3. Let entry be PrivateFieldFind(P, O).
+ 4. If entry is empty, throw a TypeError exception.
+
+ PrivateFieldFind (P, O)
+ 1. Assert: P is a Private Name value.
+ 2. Assert: O is an object with a [[PrivateFieldValues]] internal slot.
+ 3. For each element entry in O.[[PrivateFieldValues]],
+ a. If entry.[[PrivateName]] is P, return entry.
+ 4. Return empty.
+
+features: [class, class-fields-private]
+---*/
+
+class Outer {
+ #x = 42;
+
+ innerclass() {
+ var self = this;
+
+ return class extends Outer {
+ #x = 'not42';
+ f() {
+ return self.#x;
+ }
+ }
+ }
+}
+
+var Inner = new Outer().innerclass();
+var i = new Inner();
+
+assert.throws(TypeError, function() {
+ // when f() is called, the entry in the PrivateNameEnironment's environment
+ // record for '#x' will contain the Inner class's Private Name for '#x'.
+ // When this Private Name is used for lookup on the `self` object, it
+ // will not be found (as the `self` object has the Outer's Private Name for #x)
+ i.f();
+})
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/privatefieldput-primitive-receiver.js b/js/src/tests/test262/language/statements/class/elements/privatefieldput-primitive-receiver.js
new file mode 100644
index 0000000000..13f25a19b4
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/privatefieldput-primitive-receiver.js
@@ -0,0 +1,78 @@
+// Copyright (C) 2020 Caio Lima (Igalia S.L). All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: PrivateField calls ToObject when receiver is a primitive
+esid: sec-putvalue
+info: |
+ PutValue ( V, W )
+ ...
+ 6. If IsPropertyReference(V), then
+ a. If HasPrimitiveBase(V), then
+ i. Assert: In this case, base will never be null or undefined.
+ ii. Let base be ToObject(base).
+ b. If IsPrivateReference(V), then
+ i. Return ? PrivateFieldSet(field, base, W).
+ ...
+
+ PrivateFieldSet (P, O, value )
+ 1. Assert: P is a Private Name.
+ 2. Assert: Type(O) is Object.
+ 3. Let entry be PrivateFieldFind(P, O).
+ 4. If entry is empty, throw a TypeError exception.
+ 5. Set entry.[[PrivateFieldValue]] to value.
+
+features: [class, class-fields-private, BigInt]
+---*/
+
+let count = 0;
+
+class C {
+ #p = 1;
+
+ method(v) {
+ count++;
+ try {
+ count++;
+ this.#p = v;
+ } catch (e) {
+ count++;
+ if (e instanceof TypeError) {
+ throw new Test262Error();
+ }
+ }
+ }
+}
+
+assert.throws(Test262Error, () => {
+ new C().method.call(15, 0);
+});
+assert.sameValue(count, 3);
+
+assert.throws(Test262Error, () => {
+ new C().method.call('Test262', 0);
+});
+assert.sameValue(count, 6);
+
+assert.throws(Test262Error, () => {
+ new C().method.call(Symbol('Test262'), 0);
+});
+assert.sameValue(count, 9);
+
+assert.throws(Test262Error, () => {
+ new C().method.call(15n, 0);
+});
+assert.sameValue(count, 12);
+
+assert.throws(Test262Error, () => {
+ new C().method.call(null, 0);
+});
+assert.sameValue(count, 15);
+
+assert.throws(Test262Error, () => {
+ new C().method.call(undefined, 0);
+});
+assert.sameValue(count, 18);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/privatefieldset-evaluation-order-1.js b/js/src/tests/test262/language/statements/class/elements/privatefieldset-evaluation-order-1.js
new file mode 100644
index 0000000000..b9d1a0944f
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/privatefieldset-evaluation-order-1.js
@@ -0,0 +1,45 @@
+// Copyright (C) 2021 André Bargull. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: >
+ Evaluation order when resolving private fields.
+esid: sec-runtime-semantics-keyeddestructuringassignmentevaluation
+info: |
+ 13.15.5.6 Runtime Semantics: KeyedDestructuringAssignmentEvaluation
+ 1. If DestructuringAssignmentTarget is neither an ObjectLiteral nor an ArrayLiteral, then
+ a. Let lref be the result of evaluating DestructuringAssignmentTarget.
+ b. ReturnIfAbrupt(lref).
+ 2. ...
+
+ 9.1.1.3.4 GetThisBinding ( )
+ 1. Assert: envRec.[[ThisBindingStatus]] is not lexical.
+ 2. If envRec.[[ThisBindingStatus]] is uninitialized, throw a ReferenceError exception.
+ 3. ...
+
+features: [class, class-fields-private]
+---*/
+
+class C extends class {} {
+ #field;
+
+ constructor() {
+ var init = () => super();
+
+ var object = {
+ get a() {
+ init();
+ }
+ };
+
+ // Accessing |this| should throw a ReferenceError before there's an attempt
+ // to invoke the getter.
+ ({a: this.#field} = object);
+ }
+}
+
+assert.throws(ReferenceError, function() {
+ new C();
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/privatefieldset-evaluation-order-2.js b/js/src/tests/test262/language/statements/class/elements/privatefieldset-evaluation-order-2.js
new file mode 100644
index 0000000000..adacf20da5
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/privatefieldset-evaluation-order-2.js
@@ -0,0 +1,38 @@
+// Copyright (C) 2021 André Bargull. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: >
+ Evaluation order when resolving private fields.
+esid: sec-runtime-semantics-keyeddestructuringassignmentevaluation
+info: |
+ 13.15.5.6 Runtime Semantics: KeyedDestructuringAssignmentEvaluation
+ 1. If DestructuringAssignmentTarget is neither an ObjectLiteral nor an ArrayLiteral, then
+ a. Let lref be the result of evaluating DestructuringAssignmentTarget.
+ b. ReturnIfAbrupt(lref).
+ 2. Let v be ? GetV(value, propertyName).
+ 3. ...
+
+features: [class, class-fields-private]
+---*/
+
+class C {
+ #field;
+
+ m() {
+ var object = {
+ get a() {
+ throw new Test262Error();
+ }
+ };
+
+ // The getter is executed before the check if the private field is present.
+ ({a: this.#field} = object);
+ }
+}
+
+assert.throws(Test262Error, function() {
+ C.prototype.m.call({});
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/privatefieldset-evaluation-order-3.js b/js/src/tests/test262/language/statements/class/elements/privatefieldset-evaluation-order-3.js
new file mode 100644
index 0000000000..8a56632f36
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/privatefieldset-evaluation-order-3.js
@@ -0,0 +1,47 @@
+// Copyright (C) 2021 André Bargull. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: >
+ Evaluation order when resolving private fields.
+esid: sec-runtime-semantics-keyeddestructuringassignmentevaluation
+info: |
+ 13.15.5.6 Runtime Semantics: KeyedDestructuringAssignmentEvaluation
+ 1. If DestructuringAssignmentTarget is neither an ObjectLiteral nor an ArrayLiteral, then
+ a. Let lref be the result of evaluating DestructuringAssignmentTarget.
+ b. ReturnIfAbrupt(lref).
+ 2. Let v be ? GetV(value, propertyName).
+ 3. ...
+
+features: [class, class-fields-private]
+---*/
+
+class Base {
+ constructor(o) {
+ return o;
+ }
+}
+
+class C extends Base {
+ #field;
+
+ m() {
+ var init = () => new C(this);
+
+ var object = {
+ get a() {
+ init();
+
+ return "pass";
+ }
+ };
+
+ ({a: this.#field} = object);
+
+ assert.sameValue(this.#field, "pass");
+ }
+}
+
+C.prototype.m.call({});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/privatefieldset-typeerror-1.js b/js/src/tests/test262/language/statements/class/elements/privatefieldset-typeerror-1.js
new file mode 100644
index 0000000000..1bcbb433ef
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/privatefieldset-typeerror-1.js
@@ -0,0 +1,41 @@
+// Copyright (C) 2017 Valerie Young. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: TypeError when setting private field before the entry was added to [[PrivateFieldValues]]
+esid: sec-putvalue
+info: |
+ PutValue ( V, W )
+ ...
+ 6. Else if IsPropertyReference(V), then
+ ...
+ b. If IsPrivateReference(V), then
+ i. Let env be the running execution context's PrivateNameEnvironment.
+ ii. Let field be ? ResolveBinding(GetReferencedName(V), env).
+ iii. Assert: field is a Private Name.
+ iv. Perform ? PrivateFieldSet(field, base, W).
+
+ PrivateFieldSet (P, O, value )
+ 1. Assert: P is a Private Name value.
+ 2. If O is not an object, throw a TypeError exception.
+ 3. Let entry be PrivateFieldFind(P, O).
+ 4. If entry is empty, throw a TypeError exception.
+
+ PrivateFieldFind (P, O)
+ 1. Assert: P is a Private Name value.
+ 2. Assert: O is an object with a [[PrivateFieldValues]] internal slot.
+ 3. For each element entry in O.[[PrivateFieldValues]],
+ a. If entry.[[PrivateName]] is P, return entry.
+ 4. Return empty.
+
+features: [class, class-fields-private, class-fields-public]
+---*/
+
+class C {
+ y = this.#x = 1;
+ #x;
+}
+
+assert.throws(TypeError, function() { new C(); })
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/privatefieldset-typeerror-10.js b/js/src/tests/test262/language/statements/class/elements/privatefieldset-typeerror-10.js
new file mode 100644
index 0000000000..4057039735
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/privatefieldset-typeerror-10.js
@@ -0,0 +1,47 @@
+// Copyright (C) 2021 André Bargull. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: >
+ TypeError when setting private field not in `this`'s [[PrivateFieldValues]]
+esid: sec-putvalue
+info: |
+ PutValue ( V, W )
+ ...
+ 6. Else if IsPropertyReference(V), then
+ ...
+ b. If IsPrivateReference(V), then
+ i. Let env be the running execution context's PrivateNameEnvironment.
+ ii. Let field be ? ResolveBinding(GetReferencedName(V), env).
+ iii. Assert: field is a Private Name.
+ iv. Perform ? PrivateFieldSet(field, base, W).
+
+ PrivateFieldSet (P, O, value )
+ 1. Assert: P is a Private Name value.
+ 2. If O is not an object, throw a TypeError exception.
+ 3. Let entry be PrivateFieldFind(P, O).
+ 4. If entry is empty, throw a TypeError exception.
+
+ PrivateFieldFind (P, O)
+ 1. Assert: P is a Private Name value.
+ 2. Assert: O is an object with a [[PrivateFieldValues]] internal slot.
+ 3. For each element entry in O.[[PrivateFieldValues]],
+ a. If entry.[[PrivateName]] is P, return entry.
+ 4. Return empty.
+
+features: [class, class-fields-private]
+---*/
+
+class C {
+ #field;
+
+ m() {
+ [...this.#field] = [];
+ }
+}
+
+assert.throws(TypeError, function() {
+ C.prototype.m.call({});
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/privatefieldset-typeerror-11.js b/js/src/tests/test262/language/statements/class/elements/privatefieldset-typeerror-11.js
new file mode 100644
index 0000000000..2ce9e2b796
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/privatefieldset-typeerror-11.js
@@ -0,0 +1,47 @@
+// Copyright (C) 2021 André Bargull. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: >
+ TypeError when setting private field not in `this`'s [[PrivateFieldValues]]
+esid: sec-putvalue
+info: |
+ PutValue ( V, W )
+ ...
+ 6. Else if IsPropertyReference(V), then
+ ...
+ b. If IsPrivateReference(V), then
+ i. Let env be the running execution context's PrivateNameEnvironment.
+ ii. Let field be ? ResolveBinding(GetReferencedName(V), env).
+ iii. Assert: field is a Private Name.
+ iv. Perform ? PrivateFieldSet(field, base, W).
+
+ PrivateFieldSet (P, O, value )
+ 1. Assert: P is a Private Name value.
+ 2. If O is not an object, throw a TypeError exception.
+ 3. Let entry be PrivateFieldFind(P, O).
+ 4. If entry is empty, throw a TypeError exception.
+
+ PrivateFieldFind (P, O)
+ 1. Assert: P is a Private Name value.
+ 2. Assert: O is an object with a [[PrivateFieldValues]] internal slot.
+ 3. For each element entry in O.[[PrivateFieldValues]],
+ a. If entry.[[PrivateName]] is P, return entry.
+ 4. Return empty.
+
+features: [class, class-fields-private]
+---*/
+
+class C {
+ #field;
+
+ m() {
+ ({...this.#field} = {});
+ }
+}
+
+assert.throws(TypeError, function() {
+ C.prototype.m.call({});
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/privatefieldset-typeerror-2.js b/js/src/tests/test262/language/statements/class/elements/privatefieldset-typeerror-2.js
new file mode 100644
index 0000000000..f1e389ef3e
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/privatefieldset-typeerror-2.js
@@ -0,0 +1,57 @@
+// Copyright (C) 2017 Valerie Young. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: TypeError when setting private field not in `this`'s [[PrivateFieldValues]]
+esid: sec-putvalue
+info: |
+ PutValue ( V, W )
+ ...
+ 6. Else if IsPropertyReference(V), then
+ ...
+ b. If IsPrivateReference(V), then
+ i. Let env be the running execution context's PrivateNameEnvironment.
+ ii. Let field be ? ResolveBinding(GetReferencedName(V), env).
+ iii. Assert: field is a Private Name.
+ iv. Perform ? PrivateFieldSet(field, base, W).
+
+ PrivateFieldSet (P, O, value )
+ 1. Assert: P is a Private Name value.
+ 2. If O is not an object, throw a TypeError exception.
+ 3. Let entry be PrivateFieldFind(P, O).
+ 4. If entry is empty, throw a TypeError exception.
+
+ PrivateFieldFind (P, O)
+ 1. Assert: P is a Private Name value.
+ 2. Assert: O is an object with a [[PrivateFieldValues]] internal slot.
+ 3. For each element entry in O.[[PrivateFieldValues]],
+ a. If entry.[[PrivateName]] is P, return entry.
+ 4. Return empty.
+
+features: [class, class-fields-private]
+---*/
+
+class Outer {
+ #x = 42;
+
+ innerclass() {
+
+ // create class within in Outerclass -- the PrivateNameEnvironment binding for
+ // private field `#x` is resolvable.
+ return class {
+ f() {
+ this.#x = 1;
+ }
+ }
+ }
+}
+
+var Inner = new Outer().innerclass();
+var i = new Inner();
+
+assert.throws(TypeError, function() {
+ // when f() is called, the private field will not be found in Inner's `this`
+ i.f();
+})
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/privatefieldset-typeerror-3.js b/js/src/tests/test262/language/statements/class/elements/privatefieldset-typeerror-3.js
new file mode 100644
index 0000000000..600c76567e
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/privatefieldset-typeerror-3.js
@@ -0,0 +1,66 @@
+// Copyright (C) 2017 Valerie Young. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: >
+ Referenced lexically scoped private field found in `this`'s [[PrivateFieldValues]]
+esid: sec-putvalue
+info: |
+ PutValue ( V, W )
+ ...
+ 6. Else if IsPropertyReference(V), then
+ ...
+ b. If IsPrivateReference(V), then
+ i. Let env be the running execution context's PrivateNameEnvironment.
+ ii. Let field be ? ResolveBinding(GetReferencedName(V), env).
+ iii. Assert: field is a Private Name.
+ iv. Perform ? PrivateFieldSet(field, base, W).
+
+ PrivateFieldSet (P, O, value )
+ 1. Assert: P is a Private Name value.
+ 2. If O is not an object, throw a TypeError exception.
+ 3. Let entry be PrivateFieldFind(P, O).
+ 4. If entry is empty, throw a TypeError exception.
+
+ PrivateFieldFind (P, O)
+ 1. Assert: P is a Private Name value.
+ 2. Assert: O is an object with a [[PrivateFieldValues]] internal slot.
+ 3. For each element entry in O.[[PrivateFieldValues]],
+ a. If entry.[[PrivateName]] is P, return entry.
+ 4. Return empty.
+
+features: [class, class-fields-private]
+---*/
+
+class Outer {
+ #x = 42;
+
+ innerclass() {
+
+ // create class within in Outerclass -- the PrivateNameEnvironment binding for
+ // private field `#x` is resolvable.
+ return class extends Outer {
+ f() {
+ this.#x = 1;
+ }
+ }
+ }
+
+ value() {
+ return this.#x;
+ }
+}
+
+var outer = new Outer();
+var Inner = outer.innerclass();
+var i = new Inner();
+
+assert.sameValue(outer.value(), 42);
+assert.sameValue(i.value(), 42);
+
+i.f();
+
+assert.sameValue(outer.value(), 42, "value is set on inner class instance only");
+assert.sameValue(i.value(), 1, "value is set from inner class instance");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/privatefieldset-typeerror-4.js b/js/src/tests/test262/language/statements/class/elements/privatefieldset-typeerror-4.js
new file mode 100644
index 0000000000..5041bf15df
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/privatefieldset-typeerror-4.js
@@ -0,0 +1,55 @@
+// Copyright (C) 2017 Valerie Young. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: TypeError when setting private field not in `this`'s [[PrivateFieldValues]]
+esid: sec-putvalue
+info: |
+ PutValue ( V, W )
+ ...
+ 6. Else if IsPropertyReference(V), then
+ ...
+ b. If IsPrivateReference(V), then
+ i. Let env be the running execution context's PrivateNameEnvironment.
+ ii. Let field be ? ResolveBinding(GetReferencedName(V), env).
+ iii. Assert: field is a Private Name.
+ iv. Perform ? PrivateFieldSet(field, base, W).
+
+ PrivateFieldSet (P, O, value )
+ 1. Assert: P is a Private Name value.
+ 2. If O is not an object, throw a TypeError exception.
+ 3. Let entry be PrivateFieldFind(P, O).
+ 4. If entry is empty, throw a TypeError exception.
+
+ PrivateFieldFind (P, O)
+ 1. Assert: P is a Private Name value.
+ 2. Assert: O is an object with a [[PrivateFieldValues]] internal slot.
+ 3. For each element entry in O.[[PrivateFieldValues]],
+ a. If entry.[[PrivateName]] is P, return entry.
+ 4. Return empty.
+
+features: [class, class-fields-private]
+---*/
+
+function classfactory() {
+ return class {
+ #x;
+ f() {
+ this.#x = 1;
+ }
+ }
+}
+
+var C1 = classfactory();
+var C2 = classfactory();
+
+var c1 = new C1();
+var c2 = new C2();
+
+assert.throws(TypeError, function() {
+ // when f() is called in class C1, the Private Name binding for #x in C1 will
+ // not found in C2's [[PrivateNameValues]]
+ c1.f.call(c2);
+})
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/privatefieldset-typeerror-5.js b/js/src/tests/test262/language/statements/class/elements/privatefieldset-typeerror-5.js
new file mode 100644
index 0000000000..17d27ecbf4
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/privatefieldset-typeerror-5.js
@@ -0,0 +1,61 @@
+// Copyright (C) 2017 Valerie Young. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: TypeError when setting private field not in `this`'s [[PrivateFieldValues]]
+esid: sec-putvalue
+info: |
+ PutValue ( V, W )
+ ...
+ 6. Else if IsPropertyReference(V), then
+ ...
+ b. If IsPrivateReference(V), then
+ i. Let env be the running execution context's PrivateNameEnvironment.
+ ii. Let field be ? ResolveBinding(GetReferencedName(V), env).
+ iii. Assert: field is a Private Name.
+ iv. Perform ? PrivateFieldSet(field, base, W).
+
+ PrivateFieldSet (P, O, value )
+ 1. Assert: P is a Private Name value.
+ 2. If O is not an object, throw a TypeError exception.
+ 3. Let entry be PrivateFieldFind(P, O).
+ 4. If entry is empty, throw a TypeError exception.
+
+ PrivateFieldFind (P, O)
+ 1. Assert: P is a Private Name value.
+ 2. Assert: O is an object with a [[PrivateFieldValues]] internal slot.
+ 3. For each element entry in O.[[PrivateFieldValues]],
+ a. If entry.[[PrivateName]] is P, return entry.
+ 4. Return empty.
+
+features: [class, class-fields-private]
+---*/
+
+
+class Outer {
+ #x = 42;
+
+ innerclass() {
+ var self = this;
+
+ return class extends Outer {
+ #x = 'not42';
+ f() {
+ self.#x = 1;
+ }
+ }
+ }
+}
+
+var Inner = new Outer().innerclass();
+var i = new Inner();
+
+assert.throws(TypeError, function() {
+ // when f() is called, the entry in the PrivateNameEnironment's environment
+ // record for '#x' will contain the Inner class's Private Name for '#x'.
+ // When this Private Name is used for lookup on the `self` object, it
+ // will not be found (as the `self` object has the Outer's Private Name for #x)
+ i.f();
+})
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/privatefieldset-typeerror-6.js b/js/src/tests/test262/language/statements/class/elements/privatefieldset-typeerror-6.js
new file mode 100644
index 0000000000..49d531ee7c
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/privatefieldset-typeerror-6.js
@@ -0,0 +1,47 @@
+// Copyright (C) 2021 André Bargull. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: >
+ TypeError when setting private field not in `this`'s [[PrivateFieldValues]]
+esid: sec-putvalue
+info: |
+ PutValue ( V, W )
+ ...
+ 6. Else if IsPropertyReference(V), then
+ ...
+ b. If IsPrivateReference(V), then
+ i. Let env be the running execution context's PrivateNameEnvironment.
+ ii. Let field be ? ResolveBinding(GetReferencedName(V), env).
+ iii. Assert: field is a Private Name.
+ iv. Perform ? PrivateFieldSet(field, base, W).
+
+ PrivateFieldSet (P, O, value )
+ 1. Assert: P is a Private Name value.
+ 2. If O is not an object, throw a TypeError exception.
+ 3. Let entry be PrivateFieldFind(P, O).
+ 4. If entry is empty, throw a TypeError exception.
+
+ PrivateFieldFind (P, O)
+ 1. Assert: P is a Private Name value.
+ 2. Assert: O is an object with a [[PrivateFieldValues]] internal slot.
+ 3. For each element entry in O.[[PrivateFieldValues]],
+ a. If entry.[[PrivateName]] is P, return entry.
+ 4. Return empty.
+
+features: [class, class-fields-private]
+---*/
+
+class C {
+ #field;
+
+ m() {
+ for (this.#field of [1]) ;
+ }
+}
+
+assert.throws(TypeError, function() {
+ C.prototype.m.call({});
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/privatefieldset-typeerror-7.js b/js/src/tests/test262/language/statements/class/elements/privatefieldset-typeerror-7.js
new file mode 100644
index 0000000000..e2c0921bb6
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/privatefieldset-typeerror-7.js
@@ -0,0 +1,47 @@
+// Copyright (C) 2021 André Bargull. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: >
+ TypeError when setting private field not in `this`'s [[PrivateFieldValues]]
+esid: sec-putvalue
+info: |
+ PutValue ( V, W )
+ ...
+ 6. Else if IsPropertyReference(V), then
+ ...
+ b. If IsPrivateReference(V), then
+ i. Let env be the running execution context's PrivateNameEnvironment.
+ ii. Let field be ? ResolveBinding(GetReferencedName(V), env).
+ iii. Assert: field is a Private Name.
+ iv. Perform ? PrivateFieldSet(field, base, W).
+
+ PrivateFieldSet (P, O, value )
+ 1. Assert: P is a Private Name value.
+ 2. If O is not an object, throw a TypeError exception.
+ 3. Let entry be PrivateFieldFind(P, O).
+ 4. If entry is empty, throw a TypeError exception.
+
+ PrivateFieldFind (P, O)
+ 1. Assert: P is a Private Name value.
+ 2. Assert: O is an object with a [[PrivateFieldValues]] internal slot.
+ 3. For each element entry in O.[[PrivateFieldValues]],
+ a. If entry.[[PrivateName]] is P, return entry.
+ 4. Return empty.
+
+features: [class, class-fields-private]
+---*/
+
+class C {
+ #field;
+
+ m() {
+ for (this.#field in {a: 0}) ;
+ }
+}
+
+assert.throws(TypeError, function() {
+ C.prototype.m.call({});
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/privatefieldset-typeerror-8.js b/js/src/tests/test262/language/statements/class/elements/privatefieldset-typeerror-8.js
new file mode 100644
index 0000000000..309e31663d
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/privatefieldset-typeerror-8.js
@@ -0,0 +1,47 @@
+// Copyright (C) 2021 André Bargull. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: >
+ TypeError when setting private field not in `this`'s [[PrivateFieldValues]]
+esid: sec-putvalue
+info: |
+ PutValue ( V, W )
+ ...
+ 6. Else if IsPropertyReference(V), then
+ ...
+ b. If IsPrivateReference(V), then
+ i. Let env be the running execution context's PrivateNameEnvironment.
+ ii. Let field be ? ResolveBinding(GetReferencedName(V), env).
+ iii. Assert: field is a Private Name.
+ iv. Perform ? PrivateFieldSet(field, base, W).
+
+ PrivateFieldSet (P, O, value )
+ 1. Assert: P is a Private Name value.
+ 2. If O is not an object, throw a TypeError exception.
+ 3. Let entry be PrivateFieldFind(P, O).
+ 4. If entry is empty, throw a TypeError exception.
+
+ PrivateFieldFind (P, O)
+ 1. Assert: P is a Private Name value.
+ 2. Assert: O is an object with a [[PrivateFieldValues]] internal slot.
+ 3. For each element entry in O.[[PrivateFieldValues]],
+ a. If entry.[[PrivateName]] is P, return entry.
+ 4. Return empty.
+
+features: [class, class-fields-private]
+---*/
+
+class C {
+ #field;
+
+ m() {
+ [this.#field] = [1];
+ }
+}
+
+assert.throws(TypeError, function() {
+ C.prototype.m.call({});
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/privatefieldset-typeerror-9.js b/js/src/tests/test262/language/statements/class/elements/privatefieldset-typeerror-9.js
new file mode 100644
index 0000000000..b39c3fc6a8
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/privatefieldset-typeerror-9.js
@@ -0,0 +1,47 @@
+// Copyright (C) 2021 André Bargull. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: >
+ TypeError when setting private field not in `this`'s [[PrivateFieldValues]]
+esid: sec-putvalue
+info: |
+ PutValue ( V, W )
+ ...
+ 6. Else if IsPropertyReference(V), then
+ ...
+ b. If IsPrivateReference(V), then
+ i. Let env be the running execution context's PrivateNameEnvironment.
+ ii. Let field be ? ResolveBinding(GetReferencedName(V), env).
+ iii. Assert: field is a Private Name.
+ iv. Perform ? PrivateFieldSet(field, base, W).
+
+ PrivateFieldSet (P, O, value )
+ 1. Assert: P is a Private Name value.
+ 2. If O is not an object, throw a TypeError exception.
+ 3. Let entry be PrivateFieldFind(P, O).
+ 4. If entry is empty, throw a TypeError exception.
+
+ PrivateFieldFind (P, O)
+ 1. Assert: P is a Private Name value.
+ 2. Assert: O is an object with a [[PrivateFieldValues]] internal slot.
+ 3. For each element entry in O.[[PrivateFieldValues]],
+ a. If entry.[[PrivateName]] is P, return entry.
+ 4. Return empty.
+
+features: [class, class-fields-private]
+---*/
+
+class C {
+ #field;
+
+ m() {
+ ({a: this.#field} = {a: 0});
+ }
+}
+
+assert.throws(TypeError, function() {
+ C.prototype.m.call({});
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/privategetter-on-proxy.js b/js/src/tests/test262/language/statements/class/elements/privategetter-on-proxy.js
new file mode 100644
index 0000000000..4ea77939f1
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/privategetter-on-proxy.js
@@ -0,0 +1,61 @@
+// Copyright (C) 2019 Caio Lima. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: Successfully access private getter on Proxy objects without using [[Get]]
+esid: sec-getvalue
+info: |
+ GetValue(V)
+ ...
+ 5. If IsPropertyReference(V), then
+ ...
+ b. If IsPrivateReference(V), then
+ i. Let env be the running execution context's PrivateNameEnvironment.
+ ii. Let field be ? ResolveBinding(GetReferencedName(V), env).
+ iii. Assert: field is a Private Name.
+ iv. Return ? PrivateFieldGet(field, base).
+ c. Return ? base.[[Get]](GetReferencedName(V), GetThisValue(V)).
+ PrivateFieldGet(P, O)
+ ...
+ 4. Perform ? PrivateBrandCheck(O, P).
+ 5. If P.[[Kind]] is "method",
+ ...
+ 6. Else,
+ a. Assert: P.[[Kind]] is "accessor".
+ b. If P does not have a [[Get]] field, throw a TypeError exception.
+ c. Let getter be P.[[Get]].
+ d. Return ? Call(getter, O).
+includes: [compareArray.js]
+features: [class, class-methods-private, Proxy]
+---*/
+
+let arr = [];
+
+class ProxyBase {
+ constructor() {
+ return new Proxy(this, {
+ get: function (obj, prop) {
+ arr.push(prop);
+ return obj[prop];
+ }
+ });
+ }
+}
+
+class Test extends ProxyBase {
+ get #f() {
+ return 3;
+ }
+ method() {
+ return this.#f;
+ }
+}
+
+let t = new Test();
+let r = t.method();
+assert.sameValue(r, 3);
+
+assert.compareArray(arr, ['method']);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/privatemethods-on-proxy.js b/js/src/tests/test262/language/statements/class/elements/privatemethods-on-proxy.js
new file mode 100644
index 0000000000..d6aaabba64
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/privatemethods-on-proxy.js
@@ -0,0 +1,57 @@
+// Copyright (C) 2019 Caio Lima. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: Successfully access private method on Proxy objects without using [[Get]]
+esid: sec-getvalue
+info: |
+ GetValue(V)
+ ...
+ 5. If IsPropertyReference(V), then
+ ...
+ b. If IsPrivateReference(V), then
+ i. Let env be the running execution context's PrivateNameEnvironment.
+ ii. Let field be ? ResolveBinding(GetReferencedName(V), env).
+ iii. Assert: field is a Private Name.
+ iv. Return ? PrivateFieldGet(field, base).
+ c. Return ? base.[[Get]](GetReferencedName(V), GetThisValue(V)).
+ PrivateFieldGet(P, O)
+ ...
+ 4. Perform ? PrivateBrandCheck(O, P).
+ 5. If P.[[Kind]] is "method",
+ a. Return P.[[Value]].
+ ...
+includes: [compareArray.js]
+features: [class, class-methods-private, Proxy]
+---*/
+
+let arr = [];
+
+class ProxyBase {
+ constructor() {
+ return new Proxy(this, {
+ get: function (obj, prop) {
+ arr.push(prop);
+ return obj[prop];
+ }
+ });
+ }
+}
+
+class Test extends ProxyBase {
+ #f() {
+ return 3;
+ }
+ method() {
+ return this.#f();
+ }
+}
+
+let t = new Test();
+let r = t.method();
+assert.sameValue(r, 3);
+
+assert.compareArray(arr, ['method']);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/privatename-not-valid-earlyerr-script-1.js b/js/src/tests/test262/language/statements/class/elements/privatename-not-valid-earlyerr-script-1.js
new file mode 100644
index 0000000000..9e13a856da
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/privatename-not-valid-earlyerr-script-1.js
@@ -0,0 +1,25 @@
+// |reftest| error:SyntaxError
+// Copyright (C) 2017 Valerie Young. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-scripts-static-semantics-early-errors
+description: Early error when referencing privatename in constructor without being declared in class fields
+info: |
+ Static Semantics: Early Errors
+ ScriptBody : StatementList
+
+ It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List as an argument is false unless the source code is eval code that is being processed by a direct eval.
+
+features: [class, class-fields-private]
+negative:
+ phase: parse
+ type: SyntaxError
+---*/
+
+$DONOTEVALUATE();
+
+class C {
+ constructor() {
+ this.#x;
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/privatename-not-valid-earlyerr-script-2.js b/js/src/tests/test262/language/statements/class/elements/privatename-not-valid-earlyerr-script-2.js
new file mode 100644
index 0000000000..415cd95d52
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/privatename-not-valid-earlyerr-script-2.js
@@ -0,0 +1,25 @@
+// |reftest| error:SyntaxError
+// Copyright (C) 2017 Valerie Young. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-scripts-static-semantics-early-errors
+description: Early error when referencing privatename in function in class without declaring in field
+info: |
+ Static Semantics: Early Errors
+ ScriptBody : StatementList
+
+ It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List as an argument is false unless the source code is eval code that is being processed by a direct eval.
+
+features: [class, class-fields-private]
+negative:
+ phase: parse
+ type: SyntaxError
+---*/
+
+$DONOTEVALUATE();
+
+class C {
+ f() {
+ this.#x;
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/privatename-not-valid-earlyerr-script-3.js b/js/src/tests/test262/language/statements/class/elements/privatename-not-valid-earlyerr-script-3.js
new file mode 100644
index 0000000000..4eef9588c7
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/privatename-not-valid-earlyerr-script-3.js
@@ -0,0 +1,23 @@
+// |reftest| error:SyntaxError
+// Copyright (C) 2017 Valerie Young. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-scripts-static-semantics-early-errors
+description: Early error when referencing privatename that has not been declared in class.
+info: |
+ Static Semantics: Early Errors
+ ScriptBody : StatementList
+
+ It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List as an argument is false unless the source code is eval code that is being processed by a direct eval.
+
+features: [class, class-fields-private, class-fields-public]
+negative:
+ phase: parse
+ type: SyntaxError
+---*/
+
+$DONOTEVALUATE();
+
+class C {
+ y = this.#x;
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/privatename-not-valid-earlyerr-script-4.js b/js/src/tests/test262/language/statements/class/elements/privatename-not-valid-earlyerr-script-4.js
new file mode 100644
index 0000000000..6057d7051a
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/privatename-not-valid-earlyerr-script-4.js
@@ -0,0 +1,28 @@
+// |reftest| error:SyntaxError
+// Copyright (C) 2017 Valerie Young. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-scripts-static-semantics-early-errors
+description: Early error when referencing privatename that has not been declared in class.
+info: |
+ Static Semantics: Early Errors
+ ScriptBody : StatementList
+
+ It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List as an argument is false unless the source code is eval code that is being processed by a direct eval.
+
+features: [class, class-fields-private]
+negative:
+ phase: parse
+ type: SyntaxError
+---*/
+
+$DONOTEVALUATE();
+
+class C {
+ f() {
+ this.#x;
+ class D extends C {
+ #x;
+ }
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/privatename-not-valid-earlyerr-script-5.js b/js/src/tests/test262/language/statements/class/elements/privatename-not-valid-earlyerr-script-5.js
new file mode 100644
index 0000000000..2c0120fc1e
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/privatename-not-valid-earlyerr-script-5.js
@@ -0,0 +1,25 @@
+// |reftest| error:SyntaxError
+// Copyright (C) 2017 Valerie Young. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-scripts-static-semantics-early-errors
+description: Early error when referencing privatename outside of class
+info: |
+ Static Semantics: Early Errors
+ ScriptBody : StatementList
+
+ It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List as an argument is false unless the source code is eval code that is being processed by a direct eval.
+
+features: [class, class-fields-private]
+negative:
+ phase: parse
+ type: SyntaxError
+---*/
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+}
+
+new C().#x;
diff --git a/js/src/tests/test262/language/statements/class/elements/privatename-not-valid-earlyerr-script-6.js b/js/src/tests/test262/language/statements/class/elements/privatename-not-valid-earlyerr-script-6.js
new file mode 100644
index 0000000000..833606797f
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/privatename-not-valid-earlyerr-script-6.js
@@ -0,0 +1,23 @@
+// |reftest| error:SyntaxError
+// Copyright (C) 2017 Valerie Young. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-scripts-static-semantics-early-errors
+description: Early error when referencing privatename outside of class.
+info: |
+ Static Semantics: Early Errors
+ ScriptBody : StatementList
+
+ It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List as an argument is false unless the source code is eval code that is being processed by a direct eval.
+
+features: [class, class-fields-private]
+negative:
+ phase: parse
+ type: SyntaxError
+---*/
+
+$DONOTEVALUATE();
+
+class C {}
+
+new C().#x;
diff --git a/js/src/tests/test262/language/statements/class/elements/privatename-not-valid-earlyerr-script-7.js b/js/src/tests/test262/language/statements/class/elements/privatename-not-valid-earlyerr-script-7.js
new file mode 100644
index 0000000000..3b9aededd1
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/privatename-not-valid-earlyerr-script-7.js
@@ -0,0 +1,23 @@
+// |reftest| error:SyntaxError
+// Copyright (C) 2017 Valerie Young. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-scripts-static-semantics-early-errors
+description: Early error when referencing privatename on object, outside of class.
+info: |
+ Static Semantics: Early Errors
+ ScriptBody : StatementList
+
+ It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List as an argument is false unless the source code is eval code that is being processed by a direct eval.
+
+features: [class, class-fields-private]
+negative:
+ phase: parse
+ type: SyntaxError
+---*/
+
+$DONOTEVALUATE();
+
+obj = {};
+
+obj.#x;
diff --git a/js/src/tests/test262/language/statements/class/elements/privatename-not-valid-earlyerr-script-8.js b/js/src/tests/test262/language/statements/class/elements/privatename-not-valid-earlyerr-script-8.js
new file mode 100644
index 0000000000..8b76cafa0f
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/privatename-not-valid-earlyerr-script-8.js
@@ -0,0 +1,23 @@
+// |reftest| error:SyntaxError
+// Copyright (C) 2017 Valerie Young. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-scripts-static-semantics-early-errors
+description: Early error when referencing privatename on object, outside of class.
+info: |
+ Static Semantics: Early Errors
+ ScriptBody : StatementList
+
+ It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List as an argument is false unless the source code is eval code that is being processed by a direct eval.
+
+features: [class, class-fields-private]
+negative:
+ phase: parse
+ type: SyntaxError
+---*/
+
+$DONOTEVALUATE();
+
+function f() {
+ this.#x;
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/privatename-not-valid-eval-earlyerr-1.js b/js/src/tests/test262/language/statements/class/elements/privatename-not-valid-eval-earlyerr-1.js
new file mode 100644
index 0000000000..64623554fb
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/privatename-not-valid-eval-earlyerr-1.js
@@ -0,0 +1,29 @@
+// Copyright (C) 2017 Valerie Young. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-scripts-static-semantics-early-errors
+description: Early error when referencing privatename in constructor without being declared in class fields
+info: |
+ Static Semantics: Early Errors
+ ScriptBody : StatementList
+
+ It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List as an argument is false unless the source code is eval code that is being processed by a direct eval.
+
+features: [class, class-fields-private]
+---*/
+
+var executed = false;
+
+class C {
+ constructor() {
+ eval("executed = true; this.#x;");
+ }
+}
+
+assert.throws(SyntaxError, function() {
+ new C();
+});
+
+assert.sameValue(executed, false);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/privatename-not-valid-eval-earlyerr-2.js b/js/src/tests/test262/language/statements/class/elements/privatename-not-valid-eval-earlyerr-2.js
new file mode 100644
index 0000000000..b3502625b7
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/privatename-not-valid-eval-earlyerr-2.js
@@ -0,0 +1,29 @@
+// Copyright (C) 2017 Valerie Young. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-scripts-static-semantics-early-errors
+description: Early error when referencing privatename in function in class without declaring in field
+info: |
+ Static Semantics: Early Errors
+ ScriptBody : StatementList
+
+ It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List as an argument is false unless the source code is eval code that is being processed by a direct eval.
+
+features: [class, class-fields-private]
+---*/
+
+var executed = false;
+
+class C {
+ f() {
+ eval("executed = true; this.#x;");
+ }
+}
+
+assert.throws(SyntaxError, function() {
+ new C().f();
+});
+
+assert.sameValue(executed, false);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/privatename-not-valid-eval-earlyerr-3.js b/js/src/tests/test262/language/statements/class/elements/privatename-not-valid-eval-earlyerr-3.js
new file mode 100644
index 0000000000..1275505b59
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/privatename-not-valid-eval-earlyerr-3.js
@@ -0,0 +1,27 @@
+// Copyright (C) 2017 Valerie Young. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-scripts-static-semantics-early-errors
+description: Early error when referencing privatename that has not been declared in class.
+info: |
+ Static Semantics: Early Errors
+ ScriptBody : StatementList
+
+ It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List as an argument is false unless the source code is eval code that is being processed by a direct eval.
+
+features: [class, class-fields-private, class-fields-public]
+---*/
+
+var executed = false;
+
+class C {
+ y = eval("executed = true; this.#x;")
+}
+
+assert.throws(SyntaxError, function() {
+ new C();
+});
+
+assert.sameValue(executed, false);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/privatename-not-valid-eval-earlyerr-4.js b/js/src/tests/test262/language/statements/class/elements/privatename-not-valid-eval-earlyerr-4.js
new file mode 100644
index 0000000000..af441ae724
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/privatename-not-valid-eval-earlyerr-4.js
@@ -0,0 +1,32 @@
+// Copyright (C) 2017 Valerie Young. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-scripts-static-semantics-early-errors
+description: Early error when referencing privatename that has not been declared in class.
+info: |
+ Static Semantics: Early Errors
+ ScriptBody : StatementList
+
+ It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List as an argument is false unless the source code is eval code that is being processed by a direct eval.
+
+features: [class, class-fields-private]
+---*/
+
+var executed = false;
+
+class C {
+ f() {
+ eval("executed = true; this.#x;");
+ class D extends C {
+ #x;
+ }
+ }
+}
+
+assert.throws(SyntaxError, function() {
+ new C().f();
+});
+
+assert.sameValue(executed, false);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/privatename-not-valid-eval-earlyerr-5.js b/js/src/tests/test262/language/statements/class/elements/privatename-not-valid-eval-earlyerr-5.js
new file mode 100644
index 0000000000..ed05abfd60
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/privatename-not-valid-eval-earlyerr-5.js
@@ -0,0 +1,27 @@
+// Copyright (C) 2017 Valerie Young. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-scripts-static-semantics-early-errors
+description: Early error when referencing privatename outside of class
+info: |
+ Static Semantics: Early Errors
+ ScriptBody : StatementList
+
+ It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List as an argument is false unless the source code is eval code that is being processed by a direct eval.
+
+features: [class, class-fields-private]
+---*/
+
+var executed = false;
+
+class C {
+ #x;
+}
+
+assert.throws(SyntaxError, function() {
+ eval("executed = true; new C().#x");
+});
+
+assert.sameValue(executed, false);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/privatename-not-valid-eval-earlyerr-6.js b/js/src/tests/test262/language/statements/class/elements/privatename-not-valid-eval-earlyerr-6.js
new file mode 100644
index 0000000000..54fa2cdc03
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/privatename-not-valid-eval-earlyerr-6.js
@@ -0,0 +1,24 @@
+// Copyright (C) 2017 Valerie Young. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-scripts-static-semantics-early-errors
+description: Early error when referencing privatename outside of class.
+info: |
+ Static Semantics: Early Errors
+ ScriptBody : StatementList
+
+ It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List as an argument is false unless the source code is eval code that is being processed by a direct eval.
+
+features: [class, class-fields-private]
+---*/
+
+var executed = false;
+class C {}
+
+assert.throws(SyntaxError, function() {
+ eval("executed = true; new C().#x");
+});
+
+assert.sameValue(executed, false);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/privatename-not-valid-eval-earlyerr-7.js b/js/src/tests/test262/language/statements/class/elements/privatename-not-valid-eval-earlyerr-7.js
new file mode 100644
index 0000000000..879bcf646f
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/privatename-not-valid-eval-earlyerr-7.js
@@ -0,0 +1,24 @@
+// Copyright (C) 2017 Valerie Young. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-scripts-static-semantics-early-errors
+description: Early error when referencing privatename on object, outside of class.
+info: |
+ Static Semantics: Early Errors
+ ScriptBody : StatementList
+
+ It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List as an argument is false unless the source code is eval code that is being processed by a direct eval.
+
+features: [class-fields-private]
+---*/
+
+var executed = false;
+var obj = {};
+
+assert.throws(SyntaxError, function() {
+ eval("executed = true; obj.#x;");
+});
+
+assert.sameValue(executed, false);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/privatename-not-valid-eval-earlyerr-8.js b/js/src/tests/test262/language/statements/class/elements/privatename-not-valid-eval-earlyerr-8.js
new file mode 100644
index 0000000000..bb89e9ea39
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/privatename-not-valid-eval-earlyerr-8.js
@@ -0,0 +1,28 @@
+// Copyright (C) 2017 Valerie Young. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-scripts-static-semantics-early-errors
+description: Early error when referencing privatename on object, outside of class.
+info: |
+ Static Semantics: Early Errors
+ ScriptBody : StatementList
+
+ It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List as an argument is false unless the source code is eval code that is being processed by a direct eval.
+
+features: [class-fields-private]
+---*/
+
+var executed = false;
+
+function f() {
+ eval("executed = true; this.#x;");
+}
+
+assert.throws(SyntaxError, function() {
+ f();
+});
+
+assert.sameValue(executed, false);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/privatename-valid-no-earlyerr.js b/js/src/tests/test262/language/statements/class/elements/privatename-valid-no-earlyerr.js
new file mode 100644
index 0000000000..4a63961a6b
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/privatename-valid-no-earlyerr.js
@@ -0,0 +1,46 @@
+// Copyright (C) 2017 Valerie Young. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-all-private-names-valid
+description: Referencing privatename in class within class does not error.
+info: |
+ Static Semantics: AllPrivateNamesValid
+
+ AllPrivateNamesValid is an abstract operation which takes names as an argument.
+
+ MemberExpression : MemberExpression . PrivateName
+ 1. If StringValue of PrivateName is in names, return true.
+ 2. Return false.
+
+ CallExpression : CallExpression . PrivateName
+ 1. If StringValue of PrivateName is in names, return true.
+ 2. Return false.
+
+ ClassBody : ClassElementList
+ 1. Let newNames be the concatenation of names with PrivateBoundNames of ClassBody.
+ 2. Return AllPrivateNamesValid of ClassElementList with the argument newNames.
+
+ For all other grammatical productions, recurse on subexpressions/substatements, passing in the names of the caller. If all pieces return true, then return true. If any returns false, return false.
+
+features: [class, class-fields-private]
+---*/
+
+class outer {
+ #x = 42;
+
+ f() {
+ var self = this;
+ return class inner {
+ g() {
+ return self.#x;
+ }
+ }
+ }
+}
+
+var innerclass = new outer().f();
+var test = new innerclass().g();
+
+assert.sameValue(test, 42);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/prod-private-getter-before-super-return-in-constructor.js b/js/src/tests/test262/language/statements/class/elements/prod-private-getter-before-super-return-in-constructor.js
new file mode 100644
index 0000000000..00e7377707
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/prod-private-getter-before-super-return-in-constructor.js
@@ -0,0 +1,48 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/prod-private-getter-before-super-return-in-constructor.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: Private getters are installed "when super returns" and no earlier (call in constructor) (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-methods-private, class]
+flags: [generated]
+info: |
+ SuperCall: super Arguments
+ 1. Let newTarget be GetNewTarget().
+ 2. If newTarget is undefined, throw a ReferenceError exception.
+ 3. Let func be ? GetSuperConstructor().
+ 4. Let argList be ArgumentListEvaluation of Arguments.
+ 5. ReturnIfAbrupt(argList).
+ 6. Let result be ? Construct(func, argList, newTarget).
+ 7. Let thisER be GetThisEnvironment( ).
+ 8. Let F be thisER.[[FunctionObject]].
+ 9. Assert: F is an ECMAScript function object.
+ 10. Perform ? InitializeInstanceElements(result, F).
+
+ EDITOR'S NOTE:
+ Private fields are added to the object one by one, interspersed with
+ evaluation of the initializers, following the construction of the
+ receiver. These semantics allow for a later initializer to refer to
+ a previous private field.
+
+---*/
+
+
+class C {
+ constructor() {
+ this.f();
+ }
+
+}
+
+class D extends C {
+ f() { this.#m; }
+ get #m() { return 42; }
+}
+
+assert(D.prototype.hasOwnProperty('f'));
+assert.throws(TypeError, function() {
+ var d = new D();
+}, 'private getters are not installed before super returns');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/prod-private-getter-before-super-return-in-field-initializer.js b/js/src/tests/test262/language/statements/class/elements/prod-private-getter-before-super-return-in-field-initializer.js
new file mode 100644
index 0000000000..65725972ca
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/prod-private-getter-before-super-return-in-field-initializer.js
@@ -0,0 +1,46 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/prod-private-getter-before-super-return-in-field-initializer.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: Private getters are installed "when super returns" and no earlier (call in field initializer) (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-public, class]
+flags: [generated]
+info: |
+ SuperCall: super Arguments
+ 1. Let newTarget be GetNewTarget().
+ 2. If newTarget is undefined, throw a ReferenceError exception.
+ 3. Let func be ? GetSuperConstructor().
+ 4. Let argList be ArgumentListEvaluation of Arguments.
+ 5. ReturnIfAbrupt(argList).
+ 6. Let result be ? Construct(func, argList, newTarget).
+ 7. Let thisER be GetThisEnvironment( ).
+ 8. Let F be thisER.[[FunctionObject]].
+ 9. Assert: F is an ECMAScript function object.
+ 10. Perform ? InitializeInstanceElements(result, F).
+
+ EDITOR'S NOTE:
+ Private fields are added to the object one by one, interspersed with
+ evaluation of the initializers, following the construction of the
+ receiver. These semantics allow for a later initializer to refer to
+ a previous private field.
+
+---*/
+
+
+class C {
+ f = this.g();
+
+}
+
+class D extends C {
+ g() { this.#m; }
+ get #m() { return 42; }
+}
+
+assert(D.prototype.hasOwnProperty('g'));
+assert.throws(TypeError, function() {
+ var d = new D();
+}, 'private getters are not installed before super returns');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/prod-private-method-before-super-return-in-constructor.js b/js/src/tests/test262/language/statements/class/elements/prod-private-method-before-super-return-in-constructor.js
new file mode 100644
index 0000000000..b3d9c28436
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/prod-private-method-before-super-return-in-constructor.js
@@ -0,0 +1,48 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/prod-private-method-before-super-return-in-constructor.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: Private methods are installed "when super returns" and no earlier (call in constructor) (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-methods-private, class]
+flags: [generated]
+info: |
+ SuperCall: super Arguments
+ 1. Let newTarget be GetNewTarget().
+ 2. If newTarget is undefined, throw a ReferenceError exception.
+ 3. Let func be ? GetSuperConstructor().
+ 4. Let argList be ArgumentListEvaluation of Arguments.
+ 5. ReturnIfAbrupt(argList).
+ 6. Let result be ? Construct(func, argList, newTarget).
+ 7. Let thisER be GetThisEnvironment( ).
+ 8. Let F be thisER.[[FunctionObject]].
+ 9. Assert: F is an ECMAScript function object.
+ 10. Perform ? InitializeInstanceElements(result, F).
+
+ EDITOR'S NOTE:
+ Private fields are added to the object one by one, interspersed with
+ evaluation of the initializers, following the construction of the
+ receiver. These semantics allow for a later initializer to refer to
+ a previous private field.
+
+---*/
+
+
+class C {
+ constructor() {
+ this.f();
+ }
+
+}
+
+class D extends C {
+ f() { this.#m(); }
+ #m() { return 42; }
+}
+
+assert(D.prototype.hasOwnProperty('f'));
+assert.throws(TypeError, function() {
+ var d = new D();
+}, 'private methods are not installed before super returns');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/prod-private-method-before-super-return-in-field-initializer.js b/js/src/tests/test262/language/statements/class/elements/prod-private-method-before-super-return-in-field-initializer.js
new file mode 100644
index 0000000000..18bd4f8a82
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/prod-private-method-before-super-return-in-field-initializer.js
@@ -0,0 +1,46 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/prod-private-method-before-super-return-in-field-initializer.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: Private methods are installed "when super returns" and no earlier (call in field initializer) (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-public, class]
+flags: [generated]
+info: |
+ SuperCall: super Arguments
+ 1. Let newTarget be GetNewTarget().
+ 2. If newTarget is undefined, throw a ReferenceError exception.
+ 3. Let func be ? GetSuperConstructor().
+ 4. Let argList be ArgumentListEvaluation of Arguments.
+ 5. ReturnIfAbrupt(argList).
+ 6. Let result be ? Construct(func, argList, newTarget).
+ 7. Let thisER be GetThisEnvironment( ).
+ 8. Let F be thisER.[[FunctionObject]].
+ 9. Assert: F is an ECMAScript function object.
+ 10. Perform ? InitializeInstanceElements(result, F).
+
+ EDITOR'S NOTE:
+ Private fields are added to the object one by one, interspersed with
+ evaluation of the initializers, following the construction of the
+ receiver. These semantics allow for a later initializer to refer to
+ a previous private field.
+
+---*/
+
+
+class C {
+ f = this.g();
+
+}
+
+class D extends C {
+ g() { this.#m(); }
+ #m() { return 42; }
+}
+
+assert(D.prototype.hasOwnProperty('g'));
+assert.throws(TypeError, function() {
+ var d = new D();
+}, 'private methods are not installed before super returns');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/prod-private-setter-before-super-return-in-constructor.js b/js/src/tests/test262/language/statements/class/elements/prod-private-setter-before-super-return-in-constructor.js
new file mode 100644
index 0000000000..9ff167a991
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/prod-private-setter-before-super-return-in-constructor.js
@@ -0,0 +1,48 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/prod-private-setter-before-super-return-in-constructor.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: Private setters are installed "when super returns" and no earlier (call in constructor) (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-methods-private, class]
+flags: [generated]
+info: |
+ SuperCall: super Arguments
+ 1. Let newTarget be GetNewTarget().
+ 2. If newTarget is undefined, throw a ReferenceError exception.
+ 3. Let func be ? GetSuperConstructor().
+ 4. Let argList be ArgumentListEvaluation of Arguments.
+ 5. ReturnIfAbrupt(argList).
+ 6. Let result be ? Construct(func, argList, newTarget).
+ 7. Let thisER be GetThisEnvironment( ).
+ 8. Let F be thisER.[[FunctionObject]].
+ 9. Assert: F is an ECMAScript function object.
+ 10. Perform ? InitializeInstanceElements(result, F).
+
+ EDITOR'S NOTE:
+ Private fields are added to the object one by one, interspersed with
+ evaluation of the initializers, following the construction of the
+ receiver. These semantics allow for a later initializer to refer to
+ a previous private field.
+
+---*/
+
+
+class C {
+ constructor() {
+ this.f();
+ }
+
+}
+
+class D extends C {
+ f() { this.#m = 42; }
+ set #m(val) {}
+}
+
+assert(D.prototype.hasOwnProperty('f'));
+assert.throws(TypeError, function() {
+ var d = new D();
+}, 'private setters are not installed before super returns');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/prod-private-setter-before-super-return-in-field-initializer.js b/js/src/tests/test262/language/statements/class/elements/prod-private-setter-before-super-return-in-field-initializer.js
new file mode 100644
index 0000000000..514e777881
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/prod-private-setter-before-super-return-in-field-initializer.js
@@ -0,0 +1,46 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/prod-private-setter-before-super-return-in-field-initializer.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: Private settters are installed "when super returns" and no earlier (call in field initializer) (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-public, class]
+flags: [generated]
+info: |
+ SuperCall: super Arguments
+ 1. Let newTarget be GetNewTarget().
+ 2. If newTarget is undefined, throw a ReferenceError exception.
+ 3. Let func be ? GetSuperConstructor().
+ 4. Let argList be ArgumentListEvaluation of Arguments.
+ 5. ReturnIfAbrupt(argList).
+ 6. Let result be ? Construct(func, argList, newTarget).
+ 7. Let thisER be GetThisEnvironment( ).
+ 8. Let F be thisER.[[FunctionObject]].
+ 9. Assert: F is an ECMAScript function object.
+ 10. Perform ? InitializeInstanceElements(result, F).
+
+ EDITOR'S NOTE:
+ Private fields are added to the object one by one, interspersed with
+ evaluation of the initializers, following the construction of the
+ receiver. These semantics allow for a later initializer to refer to
+ a previous private field.
+
+---*/
+
+
+class C {
+ f = this.g();
+
+}
+
+class D extends C {
+ g() { this.#m = 42; }
+ set #m(val) {}
+}
+
+assert(D.prototype.hasOwnProperty('g'));
+assert.throws(TypeError, function() {
+ var d = new D();
+}, 'private setters are not installed before super returns');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/public-class-field-initialization-is-visible-to-proxy.js b/js/src/tests/test262/language/statements/class/elements/public-class-field-initialization-is-visible-to-proxy.js
new file mode 100644
index 0000000000..47d1459d11
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/public-class-field-initialization-is-visible-to-proxy.js
@@ -0,0 +1,33 @@
+// Copyright (C) 2019 Caio Lima. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: Public class field initialization calls [[DefineOwnProperty]] and can be observed by Proxies
+esid: sec-define-field
+info: |
+ DefineField(receiver, fieldRecord)
+ ...
+ 8. If fieldName is a Private Name,
+ a. Perform ? PrivateFieldAdd(fieldName, receiver, initValue).
+ 9. Else,
+ a. Assert: IsPropertyKey(fieldName) is true.
+ b. Perform ? CreateDataPropertyOrThrow(receiver, fieldName, initValue).
+ 10. Return.
+features: [class, class-fields-public]
+---*/
+
+function ProxyBase() {
+ return new Proxy(this, {
+ defineProperty: function (target, key, descriptor) {
+ throw new Test262Error();
+ }
+ });
+}
+
+class Base extends ProxyBase {
+ f = "Test262";
+}
+
+assert.throws(Test262Error, () => { new Base(); });
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/public-class-field-initialization-on-super-class-with-setter.js b/js/src/tests/test262/language/statements/class/elements/public-class-field-initialization-on-super-class-with-setter.js
new file mode 100644
index 0000000000..ead5887638
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/public-class-field-initialization-on-super-class-with-setter.js
@@ -0,0 +1,39 @@
+// Copyright (C) 2019 Caio Lima. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: Public class field initialization calls [[DefineOwnProperty]] and don't execute super's getter
+esid: sec-define-field
+info: |
+ DefineField(receiver, fieldRecord)
+ ...
+ 8. If fieldName is a Private Name,
+ a. Perform ? PrivateFieldAdd(fieldName, receiver, initValue).
+ 9. Else,
+ a. Assert: IsPropertyKey(fieldName) is true.
+ b. Perform ? CreateDataPropertyOrThrow(receiver, fieldName, initValue).
+ 10. Return.
+includes: [propertyHelper.js]
+features: [class, class-fields-public]
+---*/
+
+class Super {
+ set f(v) {
+ throw new Test262Error();
+ }
+}
+
+class Base extends Super {
+ f = "Test262";
+}
+
+let o = new Base();
+
+verifyProperty(o, "f", {
+ value: "Test262",
+ enumerable: true,
+ writable: true,
+ configurable: true,
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/redeclaration-symbol.js b/js/src/tests/test262/language/statements/class/elements/redeclaration-symbol.js
new file mode 100644
index 0000000000..84fcf66da1
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/redeclaration-symbol.js
@@ -0,0 +1,63 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/redeclaration-symbol.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: Redeclaration of public fields with the same name (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-fields-public, class]
+flags: [generated]
+includes: [propertyHelper.js, compareArray.js]
+info: |
+ 2.13.2 Runtime Semantics: ClassDefinitionEvaluation
+
+ ...
+ 30. Set the value of F's [[Fields]] internal slot to fieldRecords.
+ ...
+
+ 2.14 [[Construct]] ( argumentsList, newTarget)
+
+ ...
+ 8. If kind is "base", then
+ ...
+ b. Let result be InitializeInstanceFields(thisArgument, F).
+ ...
+
+ 2.9 InitializeInstanceFields ( O, constructor )
+
+ 3. Let fieldRecords be the value of constructor's [[Fields]] internal slot.
+ 4. For each item fieldRecord in order from fieldRecords,
+ a. If fieldRecord.[[static]] is false, then
+ i. Perform ? DefineField(O, fieldRecord).
+
+---*/
+var x = [];
+var y = Symbol();
+
+
+class C {
+ [y] = (x.push("a"), "old_value");
+ [y] = (x.push("b"), "same_value");
+ [y] = (x.push("c"), "same_value");
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, y),
+ "y does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, y),
+ "y does not appear as an own property on C constructor"
+);
+
+verifyProperty(c, y, {
+ value: "same_value",
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert.compareArray(x, ["a", "b", "c"]);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/redeclaration.js b/js/src/tests/test262/language/statements/class/elements/redeclaration.js
new file mode 100644
index 0000000000..adefc1b2ac
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/redeclaration.js
@@ -0,0 +1,63 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/redeclaration.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: Redeclaration of public fields with the same name (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-fields-public, computed-property-names, class]
+flags: [generated]
+includes: [propertyHelper.js, compareArray.js]
+info: |
+ 2.13.2 Runtime Semantics: ClassDefinitionEvaluation
+
+ ...
+ 30. Set the value of F's [[Fields]] internal slot to fieldRecords.
+ ...
+
+ 2.14 [[Construct]] ( argumentsList, newTarget)
+
+ ...
+ 8. If kind is "base", then
+ ...
+ b. Let result be InitializeInstanceFields(thisArgument, F).
+ ...
+
+ 2.9 InitializeInstanceFields ( O, constructor )
+
+ 3. Let fieldRecords be the value of constructor's [[Fields]] internal slot.
+ 4. For each item fieldRecord in order from fieldRecords,
+ a. If fieldRecord.[[static]] is false, then
+ i. Perform ? DefineField(O, fieldRecord).
+
+---*/
+var x = [];
+
+
+class C {
+ y = (x.push("a"), "old_value");
+ ["y"] = (x.push("b"), "another_value");
+ "y" = (x.push("c"), "same_value");
+ y = (x.push("d"), "same_value");
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "y"),
+ "y does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "y"),
+ "y does not appear as an own property on C constructor"
+);
+
+verifyProperty(c, "y", {
+ value: "same_value",
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert.compareArray(x, ["a", "b", "c", "d"]);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/regular-definitions-computed-names.js b/js/src/tests/test262/language/statements/class/elements/regular-definitions-computed-names.js
new file mode 100644
index 0000000000..804d5547d6
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/regular-definitions-computed-names.js
@@ -0,0 +1,94 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/computed-names.case
+// - src/class-elements/productions/cls-decl-regular-definitions.template
+/*---
+description: Computed property names (regular fields defintion)
+esid: prod-FieldDefinition
+features: [class-fields-public, computed-property-names, class]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement:
+ ...
+ FieldDefinition ;
+
+ FieldDefinition:
+ ClassElementName Initializer_opt
+
+ ClassElementName:
+ PropertyName
+
+---*/
+var x = "b";
+
+
+
+class C {
+ [x] = 42; [10] = "meep"; ["not initialized"]
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "b"),
+ "b doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "b"),
+ "b doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "b", {
+ value: 42,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "x"),
+ "x doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "x"),
+ "x doesn't appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "x"),
+ "x doesn't appear as an own property on C instance"
+);
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "10"),
+ "10 doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "10"),
+ "10 doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "10", {
+ value: "meep",
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "not initialized"),
+ "'not initialized' doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "not initialized"),
+ "'not initialized' doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "not initialized", {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/regular-definitions-computed-symbol-names.js b/js/src/tests/test262/language/statements/class/elements/regular-definitions-computed-symbol-names.js
new file mode 100644
index 0000000000..4c92e0626f
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/regular-definitions-computed-symbol-names.js
@@ -0,0 +1,92 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/computed-symbol-names.case
+// - src/class-elements/productions/cls-decl-regular-definitions.template
+/*---
+description: Computed property symbol names (regular fields defintion)
+esid: prod-FieldDefinition
+features: [class-fields-public, Symbol, computed-property-names, class]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement:
+ ...
+ FieldDefinition ;
+
+ FieldDefinition:
+ ClassElementName Initializer_opt
+
+ ClassElementName:
+ PropertyName
+
+---*/
+var x = Symbol();
+var y = Symbol();
+
+
+
+class C {
+ [x]; [y] = 42
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, x),
+ "Symbol x doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, x),
+ "Symbol x doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, x, {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, y),
+ "Symbol y doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, y),
+ "Symbol y doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, y, {
+ value: 42,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "x"),
+ "x doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "x"),
+ "x doesn't appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "x"),
+ "x doesn't appear as an own property on C instance"
+);
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "y"),
+ "y doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "y"),
+ "y doesn't appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "y"),
+ "y doesn't appear as an own property on C instance"
+);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/regular-definitions-grammar-privatename-identifier-semantics-stringvalue.js b/js/src/tests/test262/language/statements/class/elements/regular-definitions-grammar-privatename-identifier-semantics-stringvalue.js
new file mode 100644
index 0000000000..80fa60ad31
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/regular-definitions-grammar-privatename-identifier-semantics-stringvalue.js
@@ -0,0 +1,95 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-privatename-identifier-semantics-stringvalue.case
+// - src/class-elements/productions/cls-decl-regular-definitions.template
+/*---
+description: PrivateName Static Semantics, StringValue (regular fields defintion)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public]
+flags: [generated]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+
+ 1. Return the String value consisting of the sequence of code
+ units corresponding to PrivateName. In determining the sequence
+ any occurrences of \ UnicodeEscapeSequence are first replaced
+ with the code point represented by the UnicodeEscapeSequence
+ and then the code points of the entire PrivateName are converted
+ to code units by UTF16Encoding (10.1.1) each code point.
+
+---*/
+
+
+class C {
+ #\u{6F};
+ #\u2118;
+ #ZW_\u200C_NJ;
+ #ZW_\u200D_J;
+ o(value) {
+ this.#o = value;
+ return this.#o;
+ }
+ ℘(value) {
+ this.#℘ = value;
+ return this.#℘;
+ }
+ ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS METHOD
+ this.#ZW_‌_NJ = value;
+ return this.#ZW_‌_NJ;
+ }
+ ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS METHOD
+ this.#ZW_‍_J = value;
+ return this.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.o(1), 1);
+assert.sameValue(c.℘(1), 1);
+assert.sameValue(c.ZW_‌_NJ(1), 1);
+assert.sameValue(c.ZW_‍_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/regular-definitions-literal-names-asi.js b/js/src/tests/test262/language/statements/class/elements/regular-definitions-literal-names-asi.js
new file mode 100644
index 0000000000..c3e40e0527
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/regular-definitions-literal-names-asi.js
@@ -0,0 +1,64 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/literal-names-asi.case
+// - src/class-elements/productions/cls-decl-regular-definitions.template
+/*---
+description: Literal property names with ASI (regular fields defintion)
+esid: prod-FieldDefinition
+features: [class-fields-public, class]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement:
+ ...
+ FieldDefinition ;
+
+ FieldDefinition:
+ ClassElementName Initializer_opt
+
+ ClassElementName:
+ PropertyName
+
+---*/
+
+
+class C {
+ a
+ b = 42;
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "a"),
+ "a doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "a"),
+ "a doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "a", {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "b"),
+ "b doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "b"),
+ "b doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "b", {
+ value: 42,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/regular-definitions-literal-names.js b/js/src/tests/test262/language/statements/class/elements/regular-definitions-literal-names.js
new file mode 100644
index 0000000000..26d73e8e17
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/regular-definitions-literal-names.js
@@ -0,0 +1,83 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/literal-names.case
+// - src/class-elements/productions/cls-decl-regular-definitions.template
+/*---
+description: Literal property names (regular fields defintion)
+esid: prod-FieldDefinition
+features: [class-fields-public, class]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement:
+ ...
+ FieldDefinition ;
+
+ FieldDefinition:
+ ClassElementName Initializer_opt
+
+ ClassElementName:
+ PropertyName
+
+---*/
+const fn = function() {}
+
+
+
+class C {
+ a; b = 42;
+ c = fn
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "a"),
+ "a doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "a"),
+ "a doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "a", {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "b"),
+ "b doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "b"),
+ "b doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "b", {
+ value: 42,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "c"),
+ "c doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "c"),
+ "c doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "c", {
+ value: fn,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/regular-definitions-private-field-usage.js b/js/src/tests/test262/language/statements/class/elements/regular-definitions-private-field-usage.js
new file mode 100644
index 0000000000..d8383f1c25
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/regular-definitions-private-field-usage.js
@@ -0,0 +1,35 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-field-usage.case
+// - src/class-elements/productions/cls-decl-regular-definitions.template
+/*---
+description: PrivateName CallExpression usage (private field) (regular fields defintion)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public]
+flags: [generated]
+info: |
+ Updated Productions
+
+ CallExpression[Yield, Await]:
+ CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+ SuperCall[?Yield, ?Await]
+ CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+ CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+ CallExpression[?Yield, ?Await].IdentifierName
+ CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+ CallExpression[?Yield, ?Await].PrivateName
+
+---*/
+
+
+class C {
+ #m = 'test262';
+ method() {
+ return this.#m;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.method(), 'test262');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/regular-definitions-private-method-getter-usage.js b/js/src/tests/test262/language/statements/class/elements/regular-definitions-private-method-getter-usage.js
new file mode 100644
index 0000000000..e193a0f685
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/regular-definitions-private-method-getter-usage.js
@@ -0,0 +1,35 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-method-getter-usage.case
+// - src/class-elements/productions/cls-decl-regular-definitions.template
+/*---
+description: PrivateName CallExpression usage (Accesor get method) (regular fields defintion)
+esid: prod-FieldDefinition
+features: [class-methods-private, class, class-fields-public]
+flags: [generated]
+info: |
+ Updated Productions
+
+ CallExpression[Yield, Await]:
+ CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+ SuperCall[?Yield, ?Await]
+ CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+ CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+ CallExpression[?Yield, ?Await].IdentifierName
+ CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+ CallExpression[?Yield, ?Await].PrivateName
+
+---*/
+
+
+class C {
+ get #m() { return 'test262'; }
+ method() {
+ return this.#m;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.method(), 'test262');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/regular-definitions-private-method-usage.js b/js/src/tests/test262/language/statements/class/elements/regular-definitions-private-method-usage.js
new file mode 100644
index 0000000000..414c3f0fbe
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/regular-definitions-private-method-usage.js
@@ -0,0 +1,35 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-method-usage.case
+// - src/class-elements/productions/cls-decl-regular-definitions.template
+/*---
+description: PrivateName CallExpression usage (private method) (regular fields defintion)
+esid: prod-FieldDefinition
+features: [class-methods-private, class, class-fields-public]
+flags: [generated]
+info: |
+ Updated Productions
+
+ CallExpression[Yield, Await]:
+ CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+ SuperCall[?Yield, ?Await]
+ CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+ CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+ CallExpression[?Yield, ?Await].IdentifierName
+ CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+ CallExpression[?Yield, ?Await].PrivateName
+
+---*/
+
+
+class C {
+ #m() { return 'test262'; }
+ method() {
+ return this.#m();
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.method(), 'test262');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/regular-definitions-private-names.js b/js/src/tests/test262/language/statements/class/elements/regular-definitions-private-names.js
new file mode 100644
index 0000000000..e0033fde71
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/regular-definitions-private-names.js
@@ -0,0 +1,57 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-names.case
+// - src/class-elements/productions/cls-decl-regular-definitions.template
+/*---
+description: private names (regular fields defintion)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public]
+flags: [generated]
+info: |
+ ClassElement :
+ ...
+ FieldDefinition ;
+
+ FieldDefinition :
+ ClassElementName Initializer_opt
+
+ ClassElementName :
+ PrivateName
+
+ PrivateName :
+ # IdentifierName
+
+---*/
+
+
+class C {
+ #x; #y
+ x() {
+ this.#x = 42;
+ return this.#x;
+ }
+ y() {
+ this.#y = 43;
+ return this.#y;
+ }
+}
+
+var c = new C();
+
+// Test the private fields do not appear as properties before set to value
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#x"), "test 1");
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 2");
+assert(!Object.prototype.hasOwnProperty.call(c, "#x"), "test 3");
+
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#y"), "test 4");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 5");
+assert(!Object.prototype.hasOwnProperty.call(c, "#y"), "test 6");
+
+// Test if private fields can be sucessfully accessed and set to value
+assert.sameValue(c.x(), 42, "test 7");
+assert.sameValue(c.y(), 43, "test 8");
+
+// Test the private fields do not appear as properties before after set to value
+assert(!Object.prototype.hasOwnProperty.call(c, "#x"), "test 9");
+assert(!Object.prototype.hasOwnProperty.call(c, "#y"), "test 10");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-field-identifier-initializer.js b/js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-field-identifier-initializer.js
new file mode 100644
index 0000000000..90d7c9c884
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-field-identifier-initializer.js
@@ -0,0 +1,73 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-field-identifier-initializer.case
+// - src/class-elements/productions/cls-decl-regular-definitions.template
+/*---
+description: Valid FieldDefinition (regular fields defintion)
+esid: prod-FieldDefinition
+features: [class-fields-public, class]
+flags: [generated]
+info: |
+ ClassElement :
+ ...
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+
+ PropertyName :
+ LiteralPropertyName
+ ComputedPropertyName
+
+ LiteralPropertyName :
+ IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ $ = 1; _ = 1; \u{6F} = 1; \u2118 = 1; ZW_\u200C_NJ = 1; ZW_\u200D_J = 1
+
+}
+
+var c = new C();
+
+assert.sameValue(c.$, 1);
+assert.sameValue(c._, 1);
+assert.sameValue(c.\u{6F}, 1);
+assert.sameValue(c.\u2118, 1);
+assert.sameValue(c.ZW_\u200C_NJ, 1);
+assert.sameValue(c.ZW_\u200D_J, 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-field-identifier.js b/js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-field-identifier.js
new file mode 100644
index 0000000000..9c1eeb88c8
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-field-identifier.js
@@ -0,0 +1,80 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-field-identifier.case
+// - src/class-elements/productions/cls-decl-regular-definitions.template
+/*---
+description: Valid FieldDefinition (regular fields defintion)
+esid: prod-FieldDefinition
+features: [class-fields-public, class]
+flags: [generated]
+info: |
+ ClassElement :
+ ...
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+
+ PropertyName :
+ LiteralPropertyName
+ ComputedPropertyName
+
+ LiteralPropertyName :
+ IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ $; _; \u{6F}; \u2118; ZW_\u200C_NJ; ZW_\u200D_J
+
+}
+
+var c = new C();
+
+c.$ = 1;
+c._ = 1;
+c.\u{6F} = 1;
+c.\u2118 = 1;
+c.ZW_\u200C_NJ = 1;
+c.ZW_\u200D_J = 1;
+
+assert.sameValue(c.$, 1);
+assert.sameValue(c._, 1);
+assert.sameValue(c.\u{6F}, 1);
+assert.sameValue(c.\u2118, 1);
+assert.sameValue(c.ZW_\u200C_NJ, 1);
+assert.sameValue(c.ZW_\u200D_J, 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-private-getter-alt.js b/js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-private-getter-alt.js
new file mode 100644
index 0000000000..7a74aa71d6
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-private-getter-alt.js
@@ -0,0 +1,114 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-getter-alt.case
+// - src/class-elements/productions/cls-decl-regular-definitions.template
+/*---
+description: Valid PrivateName as private getter (regular fields defintion)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public]
+flags: [generated]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ...
+ get ClassElementName ( ){ FunctionBody }
+ ...
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ #$_; #__; #\u{6F}_; #℘_; #ZW_‌_NJ_; #ZW_‍_J_;
+ get #$() {
+ return this.#$_;
+ }
+ get #_() {
+ return this.#__;
+ }
+ get #\u{6F}() {
+ return this.#\u{6F}_;
+ }
+ get #℘() {
+ return this.#℘_;
+ }
+ get #ZW_‌_NJ() {
+ return this.#ZW_‌_NJ_;
+ }
+ get #ZW_‍_J() {
+ return this.#ZW_‍_J_;
+ }
+
+ $(value) {
+ this.#$_ = value;
+ return this.#$;
+ }
+ _(value) {
+ this.#__ = value;
+ return this.#_;
+ }
+ \u{6F}(value) {
+ this.#\u{6F}_ = value;
+ return this.#\u{6F};
+ }
+ ℘(value) {
+ this.#℘_ = value;
+ return this.#℘;
+ }
+ ZW_‌_NJ(value) {
+ this.#ZW_‌_NJ_ = value;
+ return this.#ZW_‌_NJ;
+ }
+ ZW_‍_J(value) {
+ this.#ZW_‍_J_ = value;
+ return this.#ZW_‍_J;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.℘(1), 1);
+assert.sameValue(c.ZW_‌_NJ(1), 1);
+assert.sameValue(c.ZW_‍_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-private-getter.js b/js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-private-getter.js
new file mode 100644
index 0000000000..64370e9bea
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-private-getter.js
@@ -0,0 +1,114 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-getter.case
+// - src/class-elements/productions/cls-decl-regular-definitions.template
+/*---
+description: Valid PrivateName as private getter (regular fields defintion)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public]
+flags: [generated]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ...
+ get ClassElementName ( ){ FunctionBody }
+ ...
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ #$_; #__; #\u{6F}_; #\u2118_; #ZW_\u200C_NJ_; #ZW_\u200D_J_;
+ get #$() {
+ return this.#$_;
+ }
+ get #_() {
+ return this.#__;
+ }
+ get #\u{6F}() {
+ return this.#\u{6F}_;
+ }
+ get #\u2118() {
+ return this.#\u2118_;
+ }
+ get #ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ_;
+ }
+ get #ZW_\u200D_J() {
+ return this.#ZW_\u200D_J_;
+ }
+
+ $(value) {
+ this.#$_ = value;
+ return this.#$;
+ }
+ _(value) {
+ this.#__ = value;
+ return this.#_;
+ }
+ \u{6F}(value) {
+ this.#\u{6F}_ = value;
+ return this.#\u{6F};
+ }
+ \u2118(value) {
+ this.#\u2118_ = value;
+ return this.#\u2118;
+ }
+ ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ_ = value;
+ return this.#ZW_\u200C_NJ;
+ }
+ ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J_ = value;
+ return this.#ZW_\u200D_J;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.\u2118(1), 1);
+assert.sameValue(c.ZW_\u200C_NJ(1), 1);
+assert.sameValue(c.ZW_\u200D_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-private-method-alt.js b/js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-private-method-alt.js
new file mode 100644
index 0000000000..ca1d7342d2
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-private-method-alt.js
@@ -0,0 +1,113 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-method-alt.case
+// - src/class-elements/productions/cls-decl-regular-definitions.template
+/*---
+description: Valid PrivateName as private method (regular fields defintion)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public]
+flags: [generated]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ClassElementName ( UniqueFormalParameters ) { FunctionBody }
+ ...
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ #$_; #__; #\u{6F}_; #℘_; #ZW_‌_NJ_; #ZW_‍_J_;
+ #$() {
+ return this.#$_;
+ }
+ #_() {
+ return this.#__;
+ }
+ #\u{6F}() {
+ return this.#\u{6F}_;
+ }
+ #℘() {
+ return this.#℘_;
+ }
+ #ZW_‌_NJ() {
+ return this.#ZW_‌_NJ_;
+ }
+ #ZW_‍_J() {
+ return this.#ZW_‍_J_;
+ }
+
+ $(value) {
+ this.#$_ = value;
+ return this.#$();
+ }
+ _(value) {
+ this.#__ = value;
+ return this.#_();
+ }
+ \u{6F}(value) {
+ this.#\u{6F}_ = value;
+ return this.#\u{6F}();
+ }
+ ℘(value) {
+ this.#℘_ = value;
+ return this.#℘();
+ }
+ ZW_‌_NJ(value) {
+ this.#ZW_‌_NJ_ = value;
+ return this.#ZW_‌_NJ();
+ }
+ ZW_‍_J(value) {
+ this.#ZW_‍_J_ = value;
+ return this.#ZW_‍_J();
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.℘(1), 1);
+assert.sameValue(c.ZW_‌_NJ(1), 1);
+assert.sameValue(c.ZW_‍_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-private-method.js b/js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-private-method.js
new file mode 100644
index 0000000000..9ab249e21a
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-private-method.js
@@ -0,0 +1,113 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-method.case
+// - src/class-elements/productions/cls-decl-regular-definitions.template
+/*---
+description: Valid PrivateName as private method (regular fields defintion)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public]
+flags: [generated]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ClassElementName ( UniqueFormalParameters ) { FunctionBody }
+ ...
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ #$_; #__; #\u{6F}_; #\u2118_; #ZW_\u200C_NJ_; #ZW_\u200D_J_;
+ #$() {
+ return this.#$_;
+ }
+ #_() {
+ return this.#__;
+ }
+ #\u{6F}() {
+ return this.#\u{6F}_;
+ }
+ #\u2118() {
+ return this.#\u2118_;
+ }
+ #ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ_;
+ }
+ #ZW_\u200D_J() {
+ return this.#ZW_\u200D_J_;
+ }
+
+ $(value) {
+ this.#$_ = value;
+ return this.#$();
+ }
+ _(value) {
+ this.#__ = value;
+ return this.#_();
+ }
+ \u{6F}(value) {
+ this.#\u{6F}_ = value;
+ return this.#\u{6F}();
+ }
+ \u2118(value) {
+ this.#\u2118_ = value;
+ return this.#\u2118();
+ }
+ ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ_ = value;
+ return this.#ZW_\u200C_NJ();
+ }
+ ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J_ = value;
+ return this.#ZW_\u200D_J();
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.\u2118(1), 1);
+assert.sameValue(c.ZW_\u200C_NJ(1), 1);
+assert.sameValue(c.ZW_\u200D_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-private-setter-alt.js b/js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-private-setter-alt.js
new file mode 100644
index 0000000000..84e201cc46
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-private-setter-alt.js
@@ -0,0 +1,113 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-setter-alt.case
+// - src/class-elements/productions/cls-decl-regular-definitions.template
+/*---
+description: Valid PrivateName as private setter (regular fields defintion)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public]
+flags: [generated]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ...
+ set ClassElementName ( PropertySetParameterList ) { FunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ #$_; #__; #\u{6F}_; #℘_; #ZW_‌_NJ_; #ZW_‍_J_;
+ set #$(value) {
+ this.#$_ = value;
+ }
+ set #_(value) {
+ this.#__ = value;
+ }
+ set #\u{6F}(value) {
+ this.#\u{6F}_ = value;
+ }
+ set #℘(value) {
+ this.#℘_ = value;
+ }
+ set #ZW_‌_NJ(value) {
+ this.#ZW_‌_NJ_ = value;
+ }
+ set #ZW_‍_J(value) {
+ this.#ZW_‍_J_ = value;
+ }
+
+ $(value) {
+ this.#$ = value;
+ return this.#$_;
+ }
+ _(value) {
+ this.#_ = value;
+ return this.#__;
+ }
+ \u{6F}(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F}_;
+ }
+ ℘(value) {
+ this.#℘ = value;
+ return this.#℘_;
+ }
+ ZW_‌_NJ(value) {
+ this.#ZW_‌_NJ = value;
+ return this.#ZW_‌_NJ_;
+ }
+ ZW_‍_J(value) {
+ this.#ZW_‍_J = value;
+ return this.#ZW_‍_J_;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.℘(1), 1);
+assert.sameValue(c.ZW_‌_NJ(1), 1);
+assert.sameValue(c.ZW_‍_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-private-setter.js b/js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-private-setter.js
new file mode 100644
index 0000000000..9a5ccb9b66
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-private-setter.js
@@ -0,0 +1,113 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-setter.case
+// - src/class-elements/productions/cls-decl-regular-definitions.template
+/*---
+description: Valid PrivateName as private setter (regular fields defintion)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public]
+flags: [generated]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ...
+ set ClassElementName ( PropertySetParameterList ) { FunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ #$_; #__; #\u{6F}_; #\u2118_; #ZW_\u200C_NJ_; #ZW_\u200D_J_;
+ set #$(value) {
+ this.#$_ = value;
+ }
+ set #_(value) {
+ this.#__ = value;
+ }
+ set #\u{6F}(value) {
+ this.#\u{6F}_ = value;
+ }
+ set #\u2118(value) {
+ this.#\u2118_ = value;
+ }
+ set #ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ_ = value;
+ }
+ set #ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J_ = value;
+ }
+
+ $(value) {
+ this.#$ = value;
+ return this.#$_;
+ }
+ _(value) {
+ this.#_ = value;
+ return this.#__;
+ }
+ \u{6F}(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F}_;
+ }
+ \u2118(value) {
+ this.#\u2118 = value;
+ return this.#\u2118_;
+ }
+ ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ = value;
+ return this.#ZW_\u200C_NJ_;
+ }
+ ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J = value;
+ return this.#ZW_\u200D_J_;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.\u2118(1), 1);
+assert.sameValue(c.ZW_\u200C_NJ(1), 1);
+assert.sameValue(c.ZW_\u200D_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-privatename-identifier-alt.js
new file mode 100644
index 0000000000..ded06a1333
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-privatename-identifier-alt.js
@@ -0,0 +1,95 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-regular-definitions.template
+/*---
+description: Valid PrivateName (regular fields defintion)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public]
+flags: [generated]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ #$; #_; #\u{6F}; #℘; #ZW_‌_NJ; #ZW_‍_J
+ $(value) {
+ this.#$ = value;
+ return this.#$;
+ }
+ _(value) {
+ this.#_ = value;
+ return this.#_;
+ }
+ \u{6F}(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F};
+ }
+ ℘(value) {
+ this.#℘ = value;
+ return this.#℘;
+ }
+ ZW_‌_NJ(value) {
+ this.#ZW_‌_NJ = value;
+ return this.#ZW_‌_NJ;
+ }
+ ZW_‍_J(value) {
+ this.#ZW_‍_J = value;
+ return this.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.℘(1), 1);
+assert.sameValue(c.ZW_‌_NJ(1), 1);
+assert.sameValue(c.ZW_‍_J(1), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-privatename-identifier-initializer-alt.js b/js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-privatename-identifier-initializer-alt.js
new file mode 100644
index 0000000000..217f88f14d
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-privatename-identifier-initializer-alt.js
@@ -0,0 +1,89 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-privatename-identifier-initializer-alt.case
+// - src/class-elements/productions/cls-decl-regular-definitions.template
+/*---
+description: Valid PrivateName (regular fields defintion)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public]
+flags: [generated]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ #$ = 1; #_ = 1; #\u{6F} = 1; #℘ = 1; #ZW_‌_NJ = 1; #ZW_‍_J = 1
+ $() {
+ return this.#$;
+ }
+ _() {
+ return this.#_;
+ }
+ \u{6F}() {
+ return this.#\u{6F};
+ }
+ ℘() {
+ return this.#℘;
+ }
+ ZW_‌_NJ() {
+ return this.#ZW_‌_NJ;
+ }
+ ZW_‍_J() {
+ return this.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.$(), 1);
+assert.sameValue(c._(), 1);
+assert.sameValue(c.\u{6F}(), 1);
+assert.sameValue(c.℘(), 1);
+assert.sameValue(c.ZW_‌_NJ(), 1);
+assert.sameValue(c.ZW_‍_J(), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-privatename-identifier-initializer.js b/js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-privatename-identifier-initializer.js
new file mode 100644
index 0000000000..14e266a2f6
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-privatename-identifier-initializer.js
@@ -0,0 +1,89 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-privatename-identifier-initializer.case
+// - src/class-elements/productions/cls-decl-regular-definitions.template
+/*---
+description: Valid PrivateName (regular fields defintion)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public]
+flags: [generated]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ #$ = 1; #_ = 1; #\u{6F} = 1; #\u2118 = 1; #ZW_\u200C_NJ = 1; #ZW_\u200D_J = 1
+ $() {
+ return this.#$;
+ }
+ _() {
+ return this.#_;
+ }
+ \u{6F}() {
+ return this.#\u{6F};
+ }
+ \u2118() {
+ return this.#\u2118;
+ }
+ ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ;
+ }
+ ZW_\u200D_J() {
+ return this.#ZW_\u200D_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.$(), 1);
+assert.sameValue(c._(), 1);
+assert.sameValue(c.\u{6F}(), 1);
+assert.sameValue(c.\u2118(), 1);
+assert.sameValue(c.ZW_\u200C_NJ(), 1);
+assert.sameValue(c.ZW_\u200D_J(), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-privatename-identifier.js
new file mode 100644
index 0000000000..4dfebd2c24
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-privatename-identifier.js
@@ -0,0 +1,95 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-regular-definitions.template
+/*---
+description: Valid PrivateName (regular fields defintion)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public]
+flags: [generated]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ #$; #_; #\u{6F}; #\u2118; #ZW_\u200C_NJ; #ZW_\u200D_J
+ $(value) {
+ this.#$ = value;
+ return this.#$;
+ }
+ _(value) {
+ this.#_ = value;
+ return this.#_;
+ }
+ \u{6F}(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F};
+ }
+ \u2118(value) {
+ this.#\u2118 = value;
+ return this.#\u2118;
+ }
+ ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ = value;
+ return this.#ZW_\u200C_NJ;
+ }
+ ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J = value;
+ return this.#ZW_\u200D_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.\u2118(1), 1);
+assert.sameValue(c.ZW_\u200C_NJ(1), 1);
+assert.sameValue(c.ZW_\u200D_J(1), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-static-async-generator-method-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-static-async-generator-method-privatename-identifier-alt.js
new file mode 100644
index 0000000000..77d38c6e02
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-static-async-generator-method-privatename-identifier-alt.js
@@ -0,0 +1,120 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-async-generator-method-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-regular-definitions.template
+/*---
+description: Valid Static AsyncGeneratorMethod PrivateName (regular fields defintion)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public]
+flags: [generated, async]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static async * #$(value) {
+ yield * await value;
+ }
+ static async * #_(value) {
+ yield * await value;
+ }
+ static async * #o(value) {
+ yield * await value;
+ }
+ static async * #℘(value) {
+ yield * await value;
+ }
+ static async * #ZW_‌_NJ(value) {
+ yield * await value;
+ }
+ static async * #ZW_‍_J(value) {
+ yield * await value;
+ }
+ static get $() {
+ return this.#$;
+ }
+ static get _() {
+ return this.#_;
+ }
+ static get o() {
+ return this.#o;
+ }
+ static get ℘() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#℘;
+ }
+ static get ZW_‌_NJ() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‌_NJ;
+ }
+ static get ZW_‍_J() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‍_J;
+ }
+
+}
+
+var c = new C();
+
+Promise.all([
+ C.$([1]).next(),
+ C._([1]).next(),
+ C.o([1]).next(),
+ C.℘([1]).next(), // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.ZW_‌_NJ([1]).next(), // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.ZW_‍_J([1]).next(), // DO NOT CHANGE THE NAME OF THIS FIELD
+]).then(results => {
+
+ assert.sameValue(results[0].value, 1);
+ assert.sameValue(results[1].value, 1);
+ assert.sameValue(results[2].value, 1);
+ assert.sameValue(results[3].value, 1);
+ assert.sameValue(results[4].value, 1);
+ assert.sameValue(results[5].value, 1);
+
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-static-async-generator-method-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-static-async-generator-method-privatename-identifier.js
new file mode 100644
index 0000000000..7950268e1a
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-static-async-generator-method-privatename-identifier.js
@@ -0,0 +1,121 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-async-generator-method-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-regular-definitions.template
+/*---
+description: Valid Static AsyncGeneratorMethod PrivateName (regular fields defintion)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public]
+flags: [generated, async]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static async * #$(value) {
+ yield * await value;
+ }
+ static async * #_(value) {
+ yield * await value;
+ }
+ static async * #\u{6F}(value) {
+ yield * await value;
+ }
+ static async * #\u2118(value) {
+ yield * await value;
+ }
+ static async * #ZW_\u200C_NJ(value) {
+ yield * await value;
+ }
+ static async * #ZW_\u200D_J(value) {
+ yield * await value;
+ }
+ static get $() {
+ return this.#$;
+ }
+ static get _() {
+ return this.#_;
+ }
+ static get \u{6F}() {
+ return this.#\u{6F};
+ }
+ static get \u2118() {
+ return this.#\u2118;
+ }
+ static get ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ;
+ }
+ static get ZW_\u200D_J() {
+ return this.#ZW_\u200D_J;
+ }
+
+}
+
+var c = new C();
+
+Promise.all([
+ C.$([1]).next(),
+ C._([1]).next(),
+ C.\u{6F}([1]).next(),
+ C.\u2118([1]).next(),
+ C.ZW_\u200C_NJ([1]).next(),
+ C.ZW_\u200D_J([1]).next(),
+]).then(results => {
+
+ assert.sameValue(results[0].value, 1);
+ assert.sameValue(results[1].value, 1);
+ assert.sameValue(results[2].value, 1);
+ assert.sameValue(results[3].value, 1);
+ assert.sameValue(results[4].value, 1);
+ assert.sameValue(results[5].value, 1);
+
+}).then($DONE, $DONE);
+
diff --git a/js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-static-async-method-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-static-async-method-privatename-identifier-alt.js
new file mode 100644
index 0000000000..2f28b5eafe
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-static-async-method-privatename-identifier-alt.js
@@ -0,0 +1,120 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-async-method-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-regular-definitions.template
+/*---
+description: Valid Static AsyncMethod PrivateName (regular fields defintion)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public]
+flags: [generated, async]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ AsyncMethod
+
+ AsyncMethod :
+ async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static async #$(value) {
+ return await value;
+ }
+ static async #_(value) {
+ return await value;
+ }
+ static async #o(value) {
+ return await value;
+ }
+ static async #℘(value) {
+ return await value;
+ }
+ static async #ZW_‌_NJ(value) {
+ return await value;
+ }
+ static async #ZW_‍_J(value) {
+ return await value;
+ }
+ static async $(value) {
+ return await this.#$(value);
+ }
+ static async _(value) {
+ return await this.#_(value);
+ }
+ static async o(value) {
+ return await this.#o(value);
+ }
+ static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return await this.#℘(value);
+ }
+ static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return await this.#ZW_‌_NJ(value);
+ }
+ static async ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return await this.#ZW_‍_J(value);
+ }
+
+}
+
+var c = new C();
+
+Promise.all([
+ C.$(1),
+ C._(1),
+ C.o(1),
+ C.℘(1), // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.ZW_‌_NJ(1), // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.ZW_‍_J(1), // DO NOT CHANGE THE NAME OF THIS FIELD
+]).then(results => {
+
+ assert.sameValue(results[0], 1);
+ assert.sameValue(results[1], 1);
+ assert.sameValue(results[2], 1);
+ assert.sameValue(results[3], 1);
+ assert.sameValue(results[4], 1);
+ assert.sameValue(results[5], 1);
+
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-static-async-method-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-static-async-method-privatename-identifier.js
new file mode 100644
index 0000000000..509ef00256
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-static-async-method-privatename-identifier.js
@@ -0,0 +1,121 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-async-method-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-regular-definitions.template
+/*---
+description: Valid Static AsyncMethod PrivateName (regular fields defintion)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public]
+flags: [generated, async]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ AsyncMethod
+
+ AsyncMethod :
+ async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static async #$(value) {
+ return await value;
+ }
+ static async #_(value) {
+ return await value;
+ }
+ static async #\u{6F}(value) {
+ return await value;
+ }
+ static async #\u2118(value) {
+ return await value;
+ }
+ static async #ZW_\u200C_NJ(value) {
+ return await value;
+ }
+ static async #ZW_\u200D_J(value) {
+ return await value;
+ }
+ static async $(value) {
+ return await this.#$(value);
+ }
+ static async _(value) {
+ return await this.#_(value);
+ }
+ static async \u{6F}(value) {
+ return await this.#\u{6F}(value);
+ }
+ static async \u2118(value) {
+ return await this.#\u2118(value);
+ }
+ static async ZW_\u200C_NJ(value) {
+ return await this.#ZW_\u200C_NJ(value);
+ }
+ static async ZW_\u200D_J(value) {
+ return await this.#ZW_\u200D_J(value);
+ }
+
+}
+
+var c = new C();
+
+Promise.all([
+ C.$(1),
+ C._(1),
+ C.\u{6F}(1),
+ C.\u2118(1),
+ C.ZW_\u200C_NJ(1),
+ C.ZW_\u200D_J(1),
+]).then(results => {
+
+ assert.sameValue(results[0], 1);
+ assert.sameValue(results[1], 1);
+ assert.sameValue(results[2], 1);
+ assert.sameValue(results[3], 1);
+ assert.sameValue(results[4], 1);
+ assert.sameValue(results[5], 1);
+
+}).then($DONE, $DONE);
+
diff --git a/js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-static-generator-method-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-static-generator-method-privatename-identifier-alt.js
new file mode 100644
index 0000000000..2aa0d02e57
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-static-generator-method-privatename-identifier-alt.js
@@ -0,0 +1,110 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-generator-method-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-regular-definitions.template
+/*---
+description: Valid Static GeneratorMethod PrivateName (regular fields defintion)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public]
+flags: [generated]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ GeneratorMethod
+
+ GeneratorMethod :
+ * ClassElementName ( UniqueFormalParameters ){ GeneratorBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static * #$(value) {
+ yield * value;
+ }
+ static * #_(value) {
+ yield * value;
+ }
+ static * #o(value) {
+ yield * value;
+ }
+ static * #℘(value) {
+ yield * value;
+ }
+ static * #ZW_‌_NJ(value) {
+ yield * value;
+ }
+ static * #ZW_‍_J(value) {
+ yield * value;
+ }
+ static get $() {
+ return this.#$;
+ }
+ static get _() {
+ return this.#_;
+ }
+ static get o() {
+ return this.#o;
+ }
+ static get ℘() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#℘;
+ }
+ static get ZW_‌_NJ() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‌_NJ;
+ }
+ static get ZW_‍_J() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‍_J;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(C.$([1]).next().value, 1);
+assert.sameValue(C._([1]).next().value, 1);
+assert.sameValue(C.o([1]).next().value, 1);
+assert.sameValue(C.℘([1]).next().value, 1);
+assert.sameValue(C.ZW_‌_NJ([1]).next().value, 1);
+assert.sameValue(C.ZW_‍_J([1]).next().value, 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-static-generator-method-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-static-generator-method-privatename-identifier.js
new file mode 100644
index 0000000000..001428d143
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-static-generator-method-privatename-identifier.js
@@ -0,0 +1,111 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-generator-method-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-regular-definitions.template
+/*---
+description: Valid Static GeneratorMethod PrivateName (regular fields defintion)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public]
+flags: [generated]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ GeneratorMethod
+
+ GeneratorMethod :
+ * ClassElementName ( UniqueFormalParameters ){ GeneratorBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static * #$(value) {
+ yield * value;
+ }
+ static * #_(value) {
+ yield * value;
+ }
+ static * #\u{6F}(value) {
+ yield * value;
+ }
+ static * #\u2118(value) {
+ yield * value;
+ }
+ static * #ZW_\u200C_NJ(value) {
+ yield * value;
+ }
+ static * #ZW_\u200D_J(value) {
+ yield * value;
+ }
+ static get $() {
+ return this.#$;
+ }
+ static get _() {
+ return this.#_;
+ }
+ static get \u{6F}() {
+ return this.#\u{6F};
+ }
+ static get \u2118() {
+ return this.#\u2118;
+ }
+ static get ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ;
+ }
+ static get ZW_\u200D_J() {
+ return this.#ZW_\u200D_J;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(C.$([1]).next().value, 1);
+assert.sameValue(C._([1]).next().value, 1);
+assert.sameValue(C.\u{6F}([1]).next().value, 1);
+assert.sameValue(C.\u2118([1]).next().value, 1);
+assert.sameValue(C.ZW_\u200C_NJ([1]).next().value, 1);
+assert.sameValue(C.ZW_\u200D_J([1]).next().value, 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-static-method-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-static-method-privatename-identifier-alt.js
new file mode 100644
index 0000000000..ea4e64890b
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-static-method-privatename-identifier-alt.js
@@ -0,0 +1,108 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-method-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-regular-definitions.template
+/*---
+description: Valid Static Method PrivateName (regular fields defintion)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public]
+flags: [generated]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ ClassElementName ( UniqueFormalParameters ){ FunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static #$(value) {
+ return value;
+ }
+ static #_(value) {
+ return value;
+ }
+ static #o(value) {
+ return value;
+ }
+ static #℘(value) {
+ return value;
+ }
+ static #ZW_‌_NJ(value) {
+ return value;
+ }
+ static #ZW_‍_J(value) {
+ return value;
+ }
+ static $(value) {
+ return this.#$(value);
+ }
+ static _(value) {
+ return this.#_(value);
+ }
+ static o(value) {
+ return this.#o(value);
+ }
+ static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#℘(value);
+ }
+ static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‌_NJ(value);
+ }
+ static ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‍_J(value);
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(C.$(1), 1);
+assert.sameValue(C._(1), 1);
+assert.sameValue(C.o(1), 1);
+assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+assert.sameValue(C.ZW_‌_NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+assert.sameValue(C.ZW_‍_J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-static-method-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-static-method-privatename-identifier.js
new file mode 100644
index 0000000000..9af7fea9a5
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-static-method-privatename-identifier.js
@@ -0,0 +1,108 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-method-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-regular-definitions.template
+/*---
+description: Valid Static Method PrivateName (regular fields defintion)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public]
+flags: [generated]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ ClassElementName ( UniqueFormalParameters ){ FunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static #$(value) {
+ return value;
+ }
+ static #_(value) {
+ return value;
+ }
+ static #\u{6F}(value) {
+ return value;
+ }
+ static #\u2118(value) {
+ return value;
+ }
+ static #ZW_\u200C_NJ(value) {
+ return value;
+ }
+ static #ZW_\u200D_J(value) {
+ return value;
+ }
+ static $(value) {
+ return this.#$(value);
+ }
+ static _(value) {
+ return this.#_(value);
+ }
+ static \u{6F}(value) {
+ return this.#\u{6F}(value);
+ }
+ static \u2118(value) {
+ return this.#\u2118(value);
+ }
+ static ZW_\u200C_NJ(value) {
+ return this.#ZW_\u200C_NJ(value);
+ }
+ static ZW_\u200D_J(value) {
+ return this.#ZW_\u200D_J(value);
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(C.$(1), 1);
+assert.sameValue(C._(1), 1);
+assert.sameValue(C.\u{6F}(1), 1);
+assert.sameValue(C.\u2118(1), 1);
+assert.sameValue(C.ZW_\u200C_NJ(1), 1);
+assert.sameValue(C.ZW_\u200D_J(1), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-static-privatename-identifier-alt-by-classname.js b/js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-static-privatename-identifier-alt-by-classname.js
new file mode 100644
index 0000000000..0635aee73e
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-static-privatename-identifier-alt-by-classname.js
@@ -0,0 +1,96 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-alt-by-classname.case
+// - src/class-elements/productions/cls-decl-regular-definitions.template
+/*---
+description: Valid Static PrivateName (regular fields defintion)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public]
+flags: [generated]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_‍_J
+ static $(value) {
+ C.#$ = value;
+ return C.#$;
+ }
+ static _(value) {
+ C.#_ = value;
+ return C.#_;
+ }
+ static o(value) {
+ C.#\u{6F} = value;
+ return C.#\u{6F};
+ }
+ static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.#℘ = value;
+ return C.#℘;
+ }
+ static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.#ZW_‌_NJ = value;
+ return C.#ZW_‌_NJ;
+ }
+ static ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.#ZW_‍_J = value;
+ return C.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(C.$(1), 1);
+assert.sameValue(C._(1), 1);
+assert.sameValue(C.o(1), 1);
+assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+assert.sameValue(C.ZW_‌_NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+assert.sameValue(C.ZW_‍_J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-static-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-static-privatename-identifier-alt.js
new file mode 100644
index 0000000000..954d8585db
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-static-privatename-identifier-alt.js
@@ -0,0 +1,96 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-regular-definitions.template
+/*---
+description: Valid Static PrivateName (regular fields defintion)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public]
+flags: [generated]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_‍_J
+ static $(value) {
+ this.#$ = value;
+ return this.#$;
+ }
+ static _(value) {
+ this.#_ = value;
+ return this.#_;
+ }
+ static o(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F};
+ }
+ static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ this.#℘ = value;
+ return this.#℘;
+ }
+ static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ this.#ZW_‌_NJ = value;
+ return this.#ZW_‌_NJ;
+ }
+ static ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ this.#ZW_‍_J = value;
+ return this.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(C.$(1), 1);
+assert.sameValue(C._(1), 1);
+assert.sameValue(C.o(1), 1);
+assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+assert.sameValue(C.ZW_‌_NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+assert.sameValue(C.ZW_‍_J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-static-privatename-identifier-by-classname.js b/js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-static-privatename-identifier-by-classname.js
new file mode 100644
index 0000000000..1d89459791
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-static-privatename-identifier-by-classname.js
@@ -0,0 +1,96 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-by-classname.case
+// - src/class-elements/productions/cls-decl-regular-definitions.template
+/*---
+description: Valid Static PrivateName (regular fields defintion)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public]
+flags: [generated]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J
+ static $(value) {
+ C.#$ = value;
+ return C.#$;
+ }
+ static _(value) {
+ C.#_ = value;
+ return C.#_;
+ }
+ static \u{6F}(value) {
+ C.#\u{6F} = value;
+ return C.#\u{6F};
+ }
+ static \u2118(value) {
+ C.#\u2118 = value;
+ return C.#\u2118;
+ }
+ static ZW_\u200C_NJ(value) {
+ C.#ZW_\u200C_NJ = value;
+ return C.#ZW_\u200C_NJ;
+ }
+ static ZW_\u200D_J(value) {
+ C.#ZW_\u200D_J = value;
+ return C.#ZW_\u200D_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(C.$(1), 1);
+assert.sameValue(C._(1), 1);
+assert.sameValue(C.\u{6F}(1), 1);
+assert.sameValue(C.\u2118(1), 1);
+assert.sameValue(C.ZW_\u200C_NJ(1), 1);
+assert.sameValue(C.ZW_\u200D_J(1), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-static-privatename-identifier-initializer-alt-by-classname.js b/js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-static-privatename-identifier-initializer-alt-by-classname.js
new file mode 100644
index 0000000000..eaa4c940db
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-static-privatename-identifier-initializer-alt-by-classname.js
@@ -0,0 +1,90 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-initializer-alt-by-classname.case
+// - src/class-elements/productions/cls-decl-regular-definitions.template
+/*---
+description: Valid Static PrivateName (regular fields defintion)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public]
+flags: [generated]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_‍_J = 1
+ static $() {
+ return C.#$;
+ }
+ static _() {
+ return C.#_;
+ }
+ static \u{6F}() {
+ return C.#\u{6F};
+ }
+ static ℘() {
+ return C.#℘;
+ }
+ static ZW_‌_NJ() {
+ return C.#ZW_‌_NJ;
+ }
+ static ZW_‍_J() {
+ return C.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(C.$(), 1);
+assert.sameValue(C._(), 1);
+assert.sameValue(C.\u{6F}(), 1);
+assert.sameValue(C.℘(), 1);
+assert.sameValue(C.ZW_‌_NJ(), 1);
+assert.sameValue(C.ZW_‍_J(), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-static-privatename-identifier-initializer-alt.js b/js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-static-privatename-identifier-initializer-alt.js
new file mode 100644
index 0000000000..f735e6dfc2
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-static-privatename-identifier-initializer-alt.js
@@ -0,0 +1,90 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-initializer-alt.case
+// - src/class-elements/productions/cls-decl-regular-definitions.template
+/*---
+description: Valid Static PrivateName (regular fields defintion)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public]
+flags: [generated]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_‍_J = 1
+ static $() {
+ return this.#$;
+ }
+ static _() {
+ return this.#_;
+ }
+ static \u{6F}() {
+ return this.#\u{6F};
+ }
+ static ℘() {
+ return this.#℘;
+ }
+ static ZW_‌_NJ() {
+ return this.#ZW_‌_NJ;
+ }
+ static ZW_‍_J() {
+ return this.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(C.$(), 1);
+assert.sameValue(C._(), 1);
+assert.sameValue(C.\u{6F}(), 1);
+assert.sameValue(C.℘(), 1);
+assert.sameValue(C.ZW_‌_NJ(), 1);
+assert.sameValue(C.ZW_‍_J(), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-static-privatename-identifier-initializer.js b/js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-static-privatename-identifier-initializer.js
new file mode 100644
index 0000000000..d75bea949f
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-static-privatename-identifier-initializer.js
@@ -0,0 +1,90 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-initializer.case
+// - src/class-elements/productions/cls-decl-regular-definitions.template
+/*---
+description: Valid Static PrivateName (regular fields defintion)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public]
+flags: [generated]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #\u2118 = 1; static #ZW_\u200C_NJ = 1; static #ZW_\u200D_J = 1
+ static $() {
+ return this.#$;
+ }
+ static _() {
+ return this.#_;
+ }
+ static \u{6F}() {
+ return this.#\u{6F};
+ }
+ static \u2118() {
+ return this.#\u2118;
+ }
+ static ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ;
+ }
+ static ZW_\u200D_J() {
+ return this.#ZW_\u200D_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(C.$(), 1);
+assert.sameValue(C._(), 1);
+assert.sameValue(C.\u{6F}(), 1);
+assert.sameValue(C.\u2118(), 1);
+assert.sameValue(C.ZW_\u200C_NJ(), 1);
+assert.sameValue(C.ZW_\u200D_J(), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-static-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-static-privatename-identifier.js
new file mode 100644
index 0000000000..92e2e032a9
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-static-privatename-identifier.js
@@ -0,0 +1,96 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-regular-definitions.template
+/*---
+description: Valid Static PrivateName (regular fields defintion)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public]
+flags: [generated]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J
+ static $(value) {
+ this.#$ = value;
+ return this.#$;
+ }
+ static _(value) {
+ this.#_ = value;
+ return this.#_;
+ }
+ static \u{6F}(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F};
+ }
+ static \u2118(value) {
+ this.#\u2118 = value;
+ return this.#\u2118;
+ }
+ static ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ = value;
+ return this.#ZW_\u200C_NJ;
+ }
+ static ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J = value;
+ return this.#ZW_\u200D_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(C.$(1), 1);
+assert.sameValue(C._(1), 1);
+assert.sameValue(C.\u{6F}(1), 1);
+assert.sameValue(C.\u2118(1), 1);
+assert.sameValue(C.ZW_\u200C_NJ(1), 1);
+assert.sameValue(C.ZW_\u200D_J(1), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/regular-definitions-static-private-fields.js b/js/src/tests/test262/language/statements/class/elements/regular-definitions-static-private-fields.js
new file mode 100644
index 0000000000..acb79ba75a
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/regular-definitions-static-private-fields.js
@@ -0,0 +1,57 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/static-private-fields.case
+// - src/class-elements/productions/cls-decl-regular-definitions.template
+/*---
+description: static private fields (regular fields defintion)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public]
+flags: [generated]
+info: |
+ ClassElement :
+ ...
+ static FieldDefinition ;
+
+ FieldDefinition :
+ ClassElementName Initializer_opt
+
+ ClassElementName :
+ PrivateName
+
+ PrivateName :
+ # IdentifierName
+
+---*/
+
+
+class C {
+ static #x; static #y
+ static x() {
+ this.#x = 42;
+ return this.#x;
+ }
+ static y() {
+ this.#y = 43;
+ return this.#y;
+ }
+}
+
+var c = new C();
+
+// Test the private fields do not appear as properties before set to value
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#x"), "test 1");
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 2");
+assert(!Object.prototype.hasOwnProperty.call(c, "#x"), "test 3");
+
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#y"), "test 4");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 5");
+assert(!Object.prototype.hasOwnProperty.call(c, "#y"), "test 6");
+
+// Test if private fields can be sucessfully accessed and set to value
+assert.sameValue(C.x(), 42, "test 7");
+assert.sameValue(C.y(), 43, "test 8");
+
+// Test the private fields do not appear as properties before after set to value
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 9");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 10");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/regular-definitions-static-private-methods-with-fields.js b/js/src/tests/test262/language/statements/class/elements/regular-definitions-static-private-methods-with-fields.js
new file mode 100644
index 0000000000..f09d69a8e5
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/regular-definitions-static-private-methods-with-fields.js
@@ -0,0 +1,74 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/static-private-methods-with-fields.case
+// - src/class-elements/productions/cls-decl-regular-definitions.template
+/*---
+description: static private methods with fields (regular fields defintion)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class-static-fields-private, class, class-fields-public]
+flags: [generated]
+info: |
+ ClassElement :
+ ...
+ static FieldDefinition ;
+
+ FieldDefinition :
+ ClassElementName Initializer_opt
+
+ ClassElementName :
+ PrivateName
+
+ PrivateName :
+ # IdentifierName
+
+---*/
+
+
+class C {
+ static #xVal; static #yVal
+ static #x(value) {
+ this.#xVal = value;
+ return this.#xVal;
+ }
+ static #y(value) {
+ this.#yVal = value;
+ return this.#yVal;
+ }
+ static x() {
+ return this.#x(42);
+ }
+ static y() {
+ return this.#y(43);
+ }
+}
+
+var c = new C();
+
+// Test the private methods do not appear as properties before set to value
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#x"), "test 1");
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 2");
+assert(!Object.prototype.hasOwnProperty.call(c, "#x"), "test 3");
+
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#y"), "test 4");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 5");
+assert(!Object.prototype.hasOwnProperty.call(c, "#y"), "test 6");
+
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#xVal"), "test 7");
+assert(!Object.prototype.hasOwnProperty.call(C, "#xVal"), "test 8");
+assert(!Object.prototype.hasOwnProperty.call(c, "#xVal"), "test 9");
+
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#yVal"), "test 10");
+assert(!Object.prototype.hasOwnProperty.call(C, "#yVal"), "test 11");
+assert(!Object.prototype.hasOwnProperty.call(c, "#yVal"), "test 12");
+
+// Test if private fields can be sucessfully accessed and set to value
+assert.sameValue(C.x(), 42, "test 13");
+assert.sameValue(C.y(), 43, "test 14");
+
+// Test the private fields do not appear as properties before after set to value
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 15");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 16");
+
+assert(!Object.prototype.hasOwnProperty.call(C, "#xVal"), "test 17");
+assert(!Object.prototype.hasOwnProperty.call(C, "#yVal"), "test 18");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/regular-definitions-static-private-methods.js b/js/src/tests/test262/language/statements/class/elements/regular-definitions-static-private-methods.js
new file mode 100644
index 0000000000..a3a431ebad
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/regular-definitions-static-private-methods.js
@@ -0,0 +1,61 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/static-private-methods.case
+// - src/class-elements/productions/cls-decl-regular-definitions.template
+/*---
+description: static private methods (regular fields defintion)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public]
+flags: [generated]
+info: |
+ ClassElement :
+ ...
+ static FieldDefinition ;
+
+ FieldDefinition :
+ ClassElementName Initializer_opt
+
+ ClassElementName :
+ PrivateName
+
+ PrivateName :
+ # IdentifierName
+
+---*/
+
+
+class C {
+
+ static #x(value) {
+ return value / 2;
+ }
+ static #y(value) {
+ return value * 2;
+ }
+ static x() {
+ return this.#x(84);
+ }
+ static y() {
+ return this.#y(43);
+ }
+}
+
+var c = new C();
+
+// Test the private methods do not appear as properties before set to value
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#x"), "test 1");
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 2");
+assert(!Object.prototype.hasOwnProperty.call(c, "#x"), "test 3");
+
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#y"), "test 4");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 5");
+assert(!Object.prototype.hasOwnProperty.call(c, "#y"), "test 6");
+
+// Test if private fields can be sucessfully accessed and set to value
+assert.sameValue(C.x(), 42, "test 7");
+assert.sameValue(C.y(), 86, "test 8");
+
+// Test the private fields do not appear as properties before after set to value
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 9");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 10");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/regular-definitions-string-literal-names.js b/js/src/tests/test262/language/statements/class/elements/regular-definitions-string-literal-names.js
new file mode 100644
index 0000000000..225e14ff86
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/regular-definitions-string-literal-names.js
@@ -0,0 +1,96 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/string-literal-names.case
+// - src/class-elements/productions/cls-decl-regular-definitions.template
+/*---
+description: String literal names (regular fields defintion)
+esid: prod-FieldDefinition
+features: [class-fields-public, class]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement:
+ ...
+ FieldDefinition ;
+
+ FieldDefinition:
+ ClassElementName Initializer_opt
+
+ ClassElementName:
+ PropertyName
+
+---*/
+
+
+class C {
+ 'a'; "b"; 'c' = 39;
+ "d" = 42
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "a"),
+ "a does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "a"),
+ "a does not appear as an own property on C constructor"
+);
+
+verifyProperty(c, "a", {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "b"),
+ "b does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "b"),
+ "b does not appear as an own property on C constructor"
+);
+
+verifyProperty(c, "b", {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "c"),
+ "c does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "c"),
+ "c does not appear as an own property on C constructor"
+);
+
+verifyProperty(c, "c", {
+ value: 39,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "d"),
+ "d does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "d"),
+ "d does not appear as an own property on C constructor"
+);
+
+verifyProperty(c, "d", {
+ value: 42,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-computed-names.js b/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-computed-names.js
new file mode 100644
index 0000000000..972f1370c5
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-computed-names.js
@@ -0,0 +1,120 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/computed-names.case
+// - src/class-elements/productions/cls-decl-after-same-line-async-gen.template
+/*---
+description: Computed property names (field definitions after an async generator in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-public, computed-property-names, class, async-iteration]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement:
+ ...
+ FieldDefinition ;
+
+ FieldDefinition:
+ ClassElementName Initializer_opt
+
+ ClassElementName:
+ PropertyName
+
+---*/
+var x = "b";
+
+
+
+class C {
+ async *m() { return 42; } [x] = 42; [10] = "meep"; ["not initialized"];
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+c.m().next().then(function(v) {
+ assert.sameValue(v.value, 42);
+ assert.sameValue(v.done, true);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "b"),
+ "b doesn't appear as an own property on C prototype"
+ );
+ assert(
+ !Object.prototype.hasOwnProperty.call(C, "b"),
+ "b doesn't appear as an own property on C constructor"
+ );
+
+ verifyProperty(c, "b", {
+ value: 42,
+ enumerable: true,
+ writable: true,
+ configurable: true
+ });
+
+ assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "x"),
+ "x doesn't appear as an own property on C prototype"
+ );
+ assert(
+ !Object.prototype.hasOwnProperty.call(C, "x"),
+ "x doesn't appear as an own property on C constructor"
+ );
+ assert(
+ !Object.prototype.hasOwnProperty.call(c, "x"),
+ "x doesn't appear as an own property on C instance"
+ );
+
+ assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "10"),
+ "10 doesn't appear as an own property on C prototype"
+ );
+ assert(
+ !Object.prototype.hasOwnProperty.call(C, "10"),
+ "10 doesn't appear as an own property on C constructor"
+ );
+
+ verifyProperty(c, "10", {
+ value: "meep",
+ enumerable: true,
+ writable: true,
+ configurable: true
+ });
+
+ assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "not initialized"),
+ "'not initialized' doesn't appear as an own property on C prototype"
+ );
+ assert(
+ !Object.prototype.hasOwnProperty.call(C, "not initialized"),
+ "'not initialized' doesn't appear as an own property on C constructor"
+ );
+
+ verifyProperty(c, "not initialized", {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+ });
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-computed-symbol-names.js b/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-computed-symbol-names.js
new file mode 100644
index 0000000000..9c37193020
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-computed-symbol-names.js
@@ -0,0 +1,118 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/computed-symbol-names.case
+// - src/class-elements/productions/cls-decl-after-same-line-async-gen.template
+/*---
+description: Computed property symbol names (field definitions after an async generator in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-public, Symbol, computed-property-names, class, async-iteration]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement:
+ ...
+ FieldDefinition ;
+
+ FieldDefinition:
+ ClassElementName Initializer_opt
+
+ ClassElementName:
+ PropertyName
+
+---*/
+var x = Symbol();
+var y = Symbol();
+
+
+
+class C {
+ async *m() { return 42; } [x]; [y] = 42;
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+c.m().next().then(function(v) {
+ assert.sameValue(v.value, 42);
+ assert.sameValue(v.done, true);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, x),
+ "Symbol x doesn't appear as an own property on C prototype"
+ );
+ assert(
+ !Object.prototype.hasOwnProperty.call(C, x),
+ "Symbol x doesn't appear as an own property on C constructor"
+ );
+
+ verifyProperty(c, x, {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+ });
+
+ assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, y),
+ "Symbol y doesn't appear as an own property on C prototype"
+ );
+ assert(
+ !Object.prototype.hasOwnProperty.call(C, y),
+ "Symbol y doesn't appear as an own property on C constructor"
+ );
+
+ verifyProperty(c, y, {
+ value: 42,
+ enumerable: true,
+ writable: true,
+ configurable: true
+ });
+
+ assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "x"),
+ "x doesn't appear as an own property on C prototype"
+ );
+ assert(
+ !Object.prototype.hasOwnProperty.call(C, "x"),
+ "x doesn't appear as an own property on C constructor"
+ );
+ assert(
+ !Object.prototype.hasOwnProperty.call(c, "x"),
+ "x doesn't appear as an own property on C instance"
+ );
+
+ assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "y"),
+ "y doesn't appear as an own property on C prototype"
+ );
+ assert(
+ !Object.prototype.hasOwnProperty.call(C, "y"),
+ "y doesn't appear as an own property on C constructor"
+ );
+ assert(
+ !Object.prototype.hasOwnProperty.call(c, "y"),
+ "y doesn't appear as an own property on C instance"
+ );
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-grammar-privatename-identifier-semantics-stringvalue.js b/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-grammar-privatename-identifier-semantics-stringvalue.js
new file mode 100644
index 0000000000..bf90ea927e
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-grammar-privatename-identifier-semantics-stringvalue.js
@@ -0,0 +1,122 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-privatename-identifier-semantics-stringvalue.case
+// - src/class-elements/productions/cls-decl-after-same-line-async-gen.template
+/*---
+description: PrivateName Static Semantics, StringValue (field definitions after an async generator in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public, async-iteration]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+
+ 1. Return the String value consisting of the sequence of code
+ units corresponding to PrivateName. In determining the sequence
+ any occurrences of \ UnicodeEscapeSequence are first replaced
+ with the code point represented by the UnicodeEscapeSequence
+ and then the code points of the entire PrivateName are converted
+ to code units by UTF16Encoding (10.1.1) each code point.
+
+---*/
+
+
+class C {
+ async *m() { return 42; } #\u{6F};
+ #\u2118;
+ #ZW_\u200C_NJ;
+ #ZW_\u200D_J;;
+ o(value) {
+ this.#o = value;
+ return this.#o;
+ }
+ ℘(value) {
+ this.#℘ = value;
+ return this.#℘;
+ }
+ ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS METHOD
+ this.#ZW_‌_NJ = value;
+ return this.#ZW_‌_NJ;
+ }
+ ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS METHOD
+ this.#ZW_‍_J = value;
+ return this.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+c.m().next().then(function(v) {
+ assert.sameValue(v.value, 42);
+ assert.sameValue(v.done, true);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(c.o(1), 1);
+ assert.sameValue(c.℘(1), 1);
+ assert.sameValue(c.ZW_‌_NJ(1), 1);
+ assert.sameValue(c.ZW_‍_J(1), 1);
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-literal-names-asi.js b/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-literal-names-asi.js
new file mode 100644
index 0000000000..25edbf3dce
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-literal-names-asi.js
@@ -0,0 +1,90 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/literal-names-asi.case
+// - src/class-elements/productions/cls-decl-after-same-line-async-gen.template
+/*---
+description: Literal property names with ASI (field definitions after an async generator in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-public, class, async-iteration]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement:
+ ...
+ FieldDefinition ;
+
+ FieldDefinition:
+ ClassElementName Initializer_opt
+
+ ClassElementName:
+ PropertyName
+
+---*/
+
+
+class C {
+ async *m() { return 42; } a
+ b = 42;;
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+c.m().next().then(function(v) {
+ assert.sameValue(v.value, 42);
+ assert.sameValue(v.done, true);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "a"),
+ "a doesn't appear as an own property on C prototype"
+ );
+ assert(
+ !Object.prototype.hasOwnProperty.call(C, "a"),
+ "a doesn't appear as an own property on C constructor"
+ );
+
+ verifyProperty(c, "a", {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+ });
+
+ assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "b"),
+ "b doesn't appear as an own property on C prototype"
+ );
+ assert(
+ !Object.prototype.hasOwnProperty.call(C, "b"),
+ "b doesn't appear as an own property on C constructor"
+ );
+
+ verifyProperty(c, "b", {
+ value: 42,
+ enumerable: true,
+ writable: true,
+ configurable: true
+ });
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-literal-names.js b/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-literal-names.js
new file mode 100644
index 0000000000..8ed11bb12f
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-literal-names.js
@@ -0,0 +1,109 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/literal-names.case
+// - src/class-elements/productions/cls-decl-after-same-line-async-gen.template
+/*---
+description: Literal property names (field definitions after an async generator in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-public, class, async-iteration]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement:
+ ...
+ FieldDefinition ;
+
+ FieldDefinition:
+ ClassElementName Initializer_opt
+
+ ClassElementName:
+ PropertyName
+
+---*/
+const fn = function() {}
+
+
+
+class C {
+ async *m() { return 42; } a; b = 42;
+ c = fn;
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+c.m().next().then(function(v) {
+ assert.sameValue(v.value, 42);
+ assert.sameValue(v.done, true);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "a"),
+ "a doesn't appear as an own property on C prototype"
+ );
+ assert(
+ !Object.prototype.hasOwnProperty.call(C, "a"),
+ "a doesn't appear as an own property on C constructor"
+ );
+
+ verifyProperty(c, "a", {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+ });
+
+ assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "b"),
+ "b doesn't appear as an own property on C prototype"
+ );
+ assert(
+ !Object.prototype.hasOwnProperty.call(C, "b"),
+ "b doesn't appear as an own property on C constructor"
+ );
+
+ verifyProperty(c, "b", {
+ value: 42,
+ enumerable: true,
+ writable: true,
+ configurable: true
+ });
+
+ assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "c"),
+ "c doesn't appear as an own property on C prototype"
+ );
+ assert(
+ !Object.prototype.hasOwnProperty.call(C, "c"),
+ "c doesn't appear as an own property on C constructor"
+ );
+
+ verifyProperty(c, "c", {
+ value: fn,
+ enumerable: true,
+ writable: true,
+ configurable: true
+ });
+
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-private-field-usage.js b/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-private-field-usage.js
new file mode 100644
index 0000000000..636bfeba55
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-private-field-usage.js
@@ -0,0 +1,62 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-field-usage.case
+// - src/class-elements/productions/cls-decl-after-same-line-async-gen.template
+/*---
+description: PrivateName CallExpression usage (private field) (field definitions after an async generator in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public, async-iteration]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ Updated Productions
+
+ CallExpression[Yield, Await]:
+ CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+ SuperCall[?Yield, ?Await]
+ CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+ CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+ CallExpression[?Yield, ?Await].IdentifierName
+ CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+ CallExpression[?Yield, ?Await].PrivateName
+
+---*/
+
+
+class C {
+ async *m() { return 42; } #m = 'test262';;
+ method() {
+ return this.#m;
+ }
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+c.m().next().then(function(v) {
+ assert.sameValue(v.value, 42);
+ assert.sameValue(v.done, true);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(c.method(), 'test262');
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-private-method-getter-usage.js b/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-private-method-getter-usage.js
new file mode 100644
index 0000000000..664a70addb
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-private-method-getter-usage.js
@@ -0,0 +1,62 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-method-getter-usage.case
+// - src/class-elements/productions/cls-decl-after-same-line-async-gen.template
+/*---
+description: PrivateName CallExpression usage (Accesor get method) (field definitions after an async generator in the same line)
+esid: prod-FieldDefinition
+features: [class-methods-private, class, class-fields-public, async-iteration]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ Updated Productions
+
+ CallExpression[Yield, Await]:
+ CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+ SuperCall[?Yield, ?Await]
+ CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+ CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+ CallExpression[?Yield, ?Await].IdentifierName
+ CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+ CallExpression[?Yield, ?Await].PrivateName
+
+---*/
+
+
+class C {
+ async *m() { return 42; } get #m() { return 'test262'; };
+ method() {
+ return this.#m;
+ }
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+c.m().next().then(function(v) {
+ assert.sameValue(v.value, 42);
+ assert.sameValue(v.done, true);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(c.method(), 'test262');
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-private-method-usage.js b/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-private-method-usage.js
new file mode 100644
index 0000000000..5195b40603
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-private-method-usage.js
@@ -0,0 +1,62 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-method-usage.case
+// - src/class-elements/productions/cls-decl-after-same-line-async-gen.template
+/*---
+description: PrivateName CallExpression usage (private method) (field definitions after an async generator in the same line)
+esid: prod-FieldDefinition
+features: [class-methods-private, class, class-fields-public, async-iteration]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ Updated Productions
+
+ CallExpression[Yield, Await]:
+ CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+ SuperCall[?Yield, ?Await]
+ CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+ CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+ CallExpression[?Yield, ?Await].IdentifierName
+ CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+ CallExpression[?Yield, ?Await].PrivateName
+
+---*/
+
+
+class C {
+ async *m() { return 42; } #m() { return 'test262'; };
+ method() {
+ return this.#m();
+ }
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+c.m().next().then(function(v) {
+ assert.sameValue(v.value, 42);
+ assert.sameValue(v.done, true);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(c.method(), 'test262');
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-private-names.js b/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-private-names.js
new file mode 100644
index 0000000000..5ad4376496
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-private-names.js
@@ -0,0 +1,84 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-names.case
+// - src/class-elements/productions/cls-decl-after-same-line-async-gen.template
+/*---
+description: private names (field definitions after an async generator in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public, async-iteration]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ FieldDefinition ;
+
+ FieldDefinition :
+ ClassElementName Initializer_opt
+
+ ClassElementName :
+ PrivateName
+
+ PrivateName :
+ # IdentifierName
+
+---*/
+
+
+class C {
+ async *m() { return 42; } #x; #y;
+ x() {
+ this.#x = 42;
+ return this.#x;
+ }
+ y() {
+ this.#y = 43;
+ return this.#y;
+ }
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+c.m().next().then(function(v) {
+ assert.sameValue(v.value, 42);
+ assert.sameValue(v.done, true);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ // Test the private fields do not appear as properties before set to value
+ assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#x"), "test 1");
+ assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 2");
+ assert(!Object.prototype.hasOwnProperty.call(c, "#x"), "test 3");
+
+ assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#y"), "test 4");
+ assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 5");
+ assert(!Object.prototype.hasOwnProperty.call(c, "#y"), "test 6");
+
+ // Test if private fields can be sucessfully accessed and set to value
+ assert.sameValue(c.x(), 42, "test 7");
+ assert.sameValue(c.y(), 43, "test 8");
+
+ // Test the private fields do not appear as properties before after set to value
+ assert(!Object.prototype.hasOwnProperty.call(c, "#x"), "test 9");
+ assert(!Object.prototype.hasOwnProperty.call(c, "#y"), "test 10");
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-field-identifier-initializer.js b/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-field-identifier-initializer.js
new file mode 100644
index 0000000000..e25f83ab69
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-field-identifier-initializer.js
@@ -0,0 +1,100 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-field-identifier-initializer.case
+// - src/class-elements/productions/cls-decl-after-same-line-async-gen.template
+/*---
+description: Valid FieldDefinition (field definitions after an async generator in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-public, class, async-iteration]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+
+ PropertyName :
+ LiteralPropertyName
+ ComputedPropertyName
+
+ LiteralPropertyName :
+ IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ async *m() { return 42; } $ = 1; _ = 1; \u{6F} = 1; \u2118 = 1; ZW_\u200C_NJ = 1; ZW_\u200D_J = 1;
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+c.m().next().then(function(v) {
+ assert.sameValue(v.value, 42);
+ assert.sameValue(v.done, true);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(c.$, 1);
+ assert.sameValue(c._, 1);
+ assert.sameValue(c.\u{6F}, 1);
+ assert.sameValue(c.\u2118, 1);
+ assert.sameValue(c.ZW_\u200C_NJ, 1);
+ assert.sameValue(c.ZW_\u200D_J, 1);
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-field-identifier.js b/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-field-identifier.js
new file mode 100644
index 0000000000..a82d9db938
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-field-identifier.js
@@ -0,0 +1,107 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-field-identifier.case
+// - src/class-elements/productions/cls-decl-after-same-line-async-gen.template
+/*---
+description: Valid FieldDefinition (field definitions after an async generator in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-public, class, async-iteration]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+
+ PropertyName :
+ LiteralPropertyName
+ ComputedPropertyName
+
+ LiteralPropertyName :
+ IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ async *m() { return 42; } $; _; \u{6F}; \u2118; ZW_\u200C_NJ; ZW_\u200D_J;
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+c.m().next().then(function(v) {
+ assert.sameValue(v.value, 42);
+ assert.sameValue(v.done, true);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ c.$ = 1;
+ c._ = 1;
+ c.\u{6F} = 1;
+ c.\u2118 = 1;
+ c.ZW_\u200C_NJ = 1;
+ c.ZW_\u200D_J = 1;
+
+ assert.sameValue(c.$, 1);
+ assert.sameValue(c._, 1);
+ assert.sameValue(c.\u{6F}, 1);
+ assert.sameValue(c.\u2118, 1);
+ assert.sameValue(c.ZW_\u200C_NJ, 1);
+ assert.sameValue(c.ZW_\u200D_J, 1);
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-private-getter-alt.js b/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-private-getter-alt.js
new file mode 100644
index 0000000000..e4fe4a9217
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-private-getter-alt.js
@@ -0,0 +1,141 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-getter-alt.case
+// - src/class-elements/productions/cls-decl-after-same-line-async-gen.template
+/*---
+description: Valid PrivateName as private getter (field definitions after an async generator in the same line)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public, async-iteration]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ...
+ get ClassElementName ( ){ FunctionBody }
+ ...
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ async *m() { return 42; } #$_; #__; #\u{6F}_; #℘_; #ZW_‌_NJ_; #ZW_‍_J_;
+ get #$() {
+ return this.#$_;
+ }
+ get #_() {
+ return this.#__;
+ }
+ get #\u{6F}() {
+ return this.#\u{6F}_;
+ }
+ get #℘() {
+ return this.#℘_;
+ }
+ get #ZW_‌_NJ() {
+ return this.#ZW_‌_NJ_;
+ }
+ get #ZW_‍_J() {
+ return this.#ZW_‍_J_;
+ }
+;
+ $(value) {
+ this.#$_ = value;
+ return this.#$;
+ }
+ _(value) {
+ this.#__ = value;
+ return this.#_;
+ }
+ \u{6F}(value) {
+ this.#\u{6F}_ = value;
+ return this.#\u{6F};
+ }
+ ℘(value) {
+ this.#℘_ = value;
+ return this.#℘;
+ }
+ ZW_‌_NJ(value) {
+ this.#ZW_‌_NJ_ = value;
+ return this.#ZW_‌_NJ;
+ }
+ ZW_‍_J(value) {
+ this.#ZW_‍_J_ = value;
+ return this.#ZW_‍_J;
+ }
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+c.m().next().then(function(v) {
+ assert.sameValue(v.value, 42);
+ assert.sameValue(v.done, true);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(c.$(1), 1);
+ assert.sameValue(c._(1), 1);
+ assert.sameValue(c.\u{6F}(1), 1);
+ assert.sameValue(c.℘(1), 1);
+ assert.sameValue(c.ZW_‌_NJ(1), 1);
+ assert.sameValue(c.ZW_‍_J(1), 1);
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-private-getter.js b/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-private-getter.js
new file mode 100644
index 0000000000..cbd190d896
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-private-getter.js
@@ -0,0 +1,141 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-getter.case
+// - src/class-elements/productions/cls-decl-after-same-line-async-gen.template
+/*---
+description: Valid PrivateName as private getter (field definitions after an async generator in the same line)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public, async-iteration]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ...
+ get ClassElementName ( ){ FunctionBody }
+ ...
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ async *m() { return 42; } #$_; #__; #\u{6F}_; #\u2118_; #ZW_\u200C_NJ_; #ZW_\u200D_J_;
+ get #$() {
+ return this.#$_;
+ }
+ get #_() {
+ return this.#__;
+ }
+ get #\u{6F}() {
+ return this.#\u{6F}_;
+ }
+ get #\u2118() {
+ return this.#\u2118_;
+ }
+ get #ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ_;
+ }
+ get #ZW_\u200D_J() {
+ return this.#ZW_\u200D_J_;
+ }
+;
+ $(value) {
+ this.#$_ = value;
+ return this.#$;
+ }
+ _(value) {
+ this.#__ = value;
+ return this.#_;
+ }
+ \u{6F}(value) {
+ this.#\u{6F}_ = value;
+ return this.#\u{6F};
+ }
+ \u2118(value) {
+ this.#\u2118_ = value;
+ return this.#\u2118;
+ }
+ ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ_ = value;
+ return this.#ZW_\u200C_NJ;
+ }
+ ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J_ = value;
+ return this.#ZW_\u200D_J;
+ }
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+c.m().next().then(function(v) {
+ assert.sameValue(v.value, 42);
+ assert.sameValue(v.done, true);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(c.$(1), 1);
+ assert.sameValue(c._(1), 1);
+ assert.sameValue(c.\u{6F}(1), 1);
+ assert.sameValue(c.\u2118(1), 1);
+ assert.sameValue(c.ZW_\u200C_NJ(1), 1);
+ assert.sameValue(c.ZW_\u200D_J(1), 1);
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-private-method-alt.js b/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-private-method-alt.js
new file mode 100644
index 0000000000..c167ec0e40
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-private-method-alt.js
@@ -0,0 +1,140 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-method-alt.case
+// - src/class-elements/productions/cls-decl-after-same-line-async-gen.template
+/*---
+description: Valid PrivateName as private method (field definitions after an async generator in the same line)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public, async-iteration]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ClassElementName ( UniqueFormalParameters ) { FunctionBody }
+ ...
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ async *m() { return 42; } #$_; #__; #\u{6F}_; #℘_; #ZW_‌_NJ_; #ZW_‍_J_;
+ #$() {
+ return this.#$_;
+ }
+ #_() {
+ return this.#__;
+ }
+ #\u{6F}() {
+ return this.#\u{6F}_;
+ }
+ #℘() {
+ return this.#℘_;
+ }
+ #ZW_‌_NJ() {
+ return this.#ZW_‌_NJ_;
+ }
+ #ZW_‍_J() {
+ return this.#ZW_‍_J_;
+ }
+;
+ $(value) {
+ this.#$_ = value;
+ return this.#$();
+ }
+ _(value) {
+ this.#__ = value;
+ return this.#_();
+ }
+ \u{6F}(value) {
+ this.#\u{6F}_ = value;
+ return this.#\u{6F}();
+ }
+ ℘(value) {
+ this.#℘_ = value;
+ return this.#℘();
+ }
+ ZW_‌_NJ(value) {
+ this.#ZW_‌_NJ_ = value;
+ return this.#ZW_‌_NJ();
+ }
+ ZW_‍_J(value) {
+ this.#ZW_‍_J_ = value;
+ return this.#ZW_‍_J();
+ }
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+c.m().next().then(function(v) {
+ assert.sameValue(v.value, 42);
+ assert.sameValue(v.done, true);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(c.$(1), 1);
+ assert.sameValue(c._(1), 1);
+ assert.sameValue(c.\u{6F}(1), 1);
+ assert.sameValue(c.℘(1), 1);
+ assert.sameValue(c.ZW_‌_NJ(1), 1);
+ assert.sameValue(c.ZW_‍_J(1), 1);
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-private-method.js b/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-private-method.js
new file mode 100644
index 0000000000..01c26b751d
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-private-method.js
@@ -0,0 +1,140 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-method.case
+// - src/class-elements/productions/cls-decl-after-same-line-async-gen.template
+/*---
+description: Valid PrivateName as private method (field definitions after an async generator in the same line)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public, async-iteration]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ClassElementName ( UniqueFormalParameters ) { FunctionBody }
+ ...
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ async *m() { return 42; } #$_; #__; #\u{6F}_; #\u2118_; #ZW_\u200C_NJ_; #ZW_\u200D_J_;
+ #$() {
+ return this.#$_;
+ }
+ #_() {
+ return this.#__;
+ }
+ #\u{6F}() {
+ return this.#\u{6F}_;
+ }
+ #\u2118() {
+ return this.#\u2118_;
+ }
+ #ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ_;
+ }
+ #ZW_\u200D_J() {
+ return this.#ZW_\u200D_J_;
+ }
+;
+ $(value) {
+ this.#$_ = value;
+ return this.#$();
+ }
+ _(value) {
+ this.#__ = value;
+ return this.#_();
+ }
+ \u{6F}(value) {
+ this.#\u{6F}_ = value;
+ return this.#\u{6F}();
+ }
+ \u2118(value) {
+ this.#\u2118_ = value;
+ return this.#\u2118();
+ }
+ ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ_ = value;
+ return this.#ZW_\u200C_NJ();
+ }
+ ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J_ = value;
+ return this.#ZW_\u200D_J();
+ }
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+c.m().next().then(function(v) {
+ assert.sameValue(v.value, 42);
+ assert.sameValue(v.done, true);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(c.$(1), 1);
+ assert.sameValue(c._(1), 1);
+ assert.sameValue(c.\u{6F}(1), 1);
+ assert.sameValue(c.\u2118(1), 1);
+ assert.sameValue(c.ZW_\u200C_NJ(1), 1);
+ assert.sameValue(c.ZW_\u200D_J(1), 1);
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-private-setter-alt.js b/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-private-setter-alt.js
new file mode 100644
index 0000000000..f74c1c7df2
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-private-setter-alt.js
@@ -0,0 +1,140 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-setter-alt.case
+// - src/class-elements/productions/cls-decl-after-same-line-async-gen.template
+/*---
+description: Valid PrivateName as private setter (field definitions after an async generator in the same line)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public, async-iteration]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ...
+ set ClassElementName ( PropertySetParameterList ) { FunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ async *m() { return 42; } #$_; #__; #\u{6F}_; #℘_; #ZW_‌_NJ_; #ZW_‍_J_;
+ set #$(value) {
+ this.#$_ = value;
+ }
+ set #_(value) {
+ this.#__ = value;
+ }
+ set #\u{6F}(value) {
+ this.#\u{6F}_ = value;
+ }
+ set #℘(value) {
+ this.#℘_ = value;
+ }
+ set #ZW_‌_NJ(value) {
+ this.#ZW_‌_NJ_ = value;
+ }
+ set #ZW_‍_J(value) {
+ this.#ZW_‍_J_ = value;
+ }
+;
+ $(value) {
+ this.#$ = value;
+ return this.#$_;
+ }
+ _(value) {
+ this.#_ = value;
+ return this.#__;
+ }
+ \u{6F}(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F}_;
+ }
+ ℘(value) {
+ this.#℘ = value;
+ return this.#℘_;
+ }
+ ZW_‌_NJ(value) {
+ this.#ZW_‌_NJ = value;
+ return this.#ZW_‌_NJ_;
+ }
+ ZW_‍_J(value) {
+ this.#ZW_‍_J = value;
+ return this.#ZW_‍_J_;
+ }
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+c.m().next().then(function(v) {
+ assert.sameValue(v.value, 42);
+ assert.sameValue(v.done, true);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(c.$(1), 1);
+ assert.sameValue(c._(1), 1);
+ assert.sameValue(c.\u{6F}(1), 1);
+ assert.sameValue(c.℘(1), 1);
+ assert.sameValue(c.ZW_‌_NJ(1), 1);
+ assert.sameValue(c.ZW_‍_J(1), 1);
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-private-setter.js b/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-private-setter.js
new file mode 100644
index 0000000000..a8f4b7a0ef
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-private-setter.js
@@ -0,0 +1,140 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-setter.case
+// - src/class-elements/productions/cls-decl-after-same-line-async-gen.template
+/*---
+description: Valid PrivateName as private setter (field definitions after an async generator in the same line)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public, async-iteration]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ...
+ set ClassElementName ( PropertySetParameterList ) { FunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ async *m() { return 42; } #$_; #__; #\u{6F}_; #\u2118_; #ZW_\u200C_NJ_; #ZW_\u200D_J_;
+ set #$(value) {
+ this.#$_ = value;
+ }
+ set #_(value) {
+ this.#__ = value;
+ }
+ set #\u{6F}(value) {
+ this.#\u{6F}_ = value;
+ }
+ set #\u2118(value) {
+ this.#\u2118_ = value;
+ }
+ set #ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ_ = value;
+ }
+ set #ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J_ = value;
+ }
+;
+ $(value) {
+ this.#$ = value;
+ return this.#$_;
+ }
+ _(value) {
+ this.#_ = value;
+ return this.#__;
+ }
+ \u{6F}(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F}_;
+ }
+ \u2118(value) {
+ this.#\u2118 = value;
+ return this.#\u2118_;
+ }
+ ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ = value;
+ return this.#ZW_\u200C_NJ_;
+ }
+ ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J = value;
+ return this.#ZW_\u200D_J_;
+ }
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+c.m().next().then(function(v) {
+ assert.sameValue(v.value, 42);
+ assert.sameValue(v.done, true);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(c.$(1), 1);
+ assert.sameValue(c._(1), 1);
+ assert.sameValue(c.\u{6F}(1), 1);
+ assert.sameValue(c.\u2118(1), 1);
+ assert.sameValue(c.ZW_\u200C_NJ(1), 1);
+ assert.sameValue(c.ZW_\u200D_J(1), 1);
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-privatename-identifier-alt.js
new file mode 100644
index 0000000000..e85d80c565
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-privatename-identifier-alt.js
@@ -0,0 +1,122 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-after-same-line-async-gen.template
+/*---
+description: Valid PrivateName (field definitions after an async generator in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public, async-iteration]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ async *m() { return 42; } #$; #_; #\u{6F}; #℘; #ZW_‌_NJ; #ZW_‍_J;
+ $(value) {
+ this.#$ = value;
+ return this.#$;
+ }
+ _(value) {
+ this.#_ = value;
+ return this.#_;
+ }
+ \u{6F}(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F};
+ }
+ ℘(value) {
+ this.#℘ = value;
+ return this.#℘;
+ }
+ ZW_‌_NJ(value) {
+ this.#ZW_‌_NJ = value;
+ return this.#ZW_‌_NJ;
+ }
+ ZW_‍_J(value) {
+ this.#ZW_‍_J = value;
+ return this.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+c.m().next().then(function(v) {
+ assert.sameValue(v.value, 42);
+ assert.sameValue(v.done, true);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(c.$(1), 1);
+ assert.sameValue(c._(1), 1);
+ assert.sameValue(c.\u{6F}(1), 1);
+ assert.sameValue(c.℘(1), 1);
+ assert.sameValue(c.ZW_‌_NJ(1), 1);
+ assert.sameValue(c.ZW_‍_J(1), 1);
+
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-privatename-identifier-initializer-alt.js b/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-privatename-identifier-initializer-alt.js
new file mode 100644
index 0000000000..297996f81f
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-privatename-identifier-initializer-alt.js
@@ -0,0 +1,116 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-privatename-identifier-initializer-alt.case
+// - src/class-elements/productions/cls-decl-after-same-line-async-gen.template
+/*---
+description: Valid PrivateName (field definitions after an async generator in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public, async-iteration]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ async *m() { return 42; } #$ = 1; #_ = 1; #\u{6F} = 1; #℘ = 1; #ZW_‌_NJ = 1; #ZW_‍_J = 1;
+ $() {
+ return this.#$;
+ }
+ _() {
+ return this.#_;
+ }
+ \u{6F}() {
+ return this.#\u{6F};
+ }
+ ℘() {
+ return this.#℘;
+ }
+ ZW_‌_NJ() {
+ return this.#ZW_‌_NJ;
+ }
+ ZW_‍_J() {
+ return this.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+c.m().next().then(function(v) {
+ assert.sameValue(v.value, 42);
+ assert.sameValue(v.done, true);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(c.$(), 1);
+ assert.sameValue(c._(), 1);
+ assert.sameValue(c.\u{6F}(), 1);
+ assert.sameValue(c.℘(), 1);
+ assert.sameValue(c.ZW_‌_NJ(), 1);
+ assert.sameValue(c.ZW_‍_J(), 1);
+
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-privatename-identifier-initializer.js b/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-privatename-identifier-initializer.js
new file mode 100644
index 0000000000..c7bb2db17b
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-privatename-identifier-initializer.js
@@ -0,0 +1,116 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-privatename-identifier-initializer.case
+// - src/class-elements/productions/cls-decl-after-same-line-async-gen.template
+/*---
+description: Valid PrivateName (field definitions after an async generator in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public, async-iteration]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ async *m() { return 42; } #$ = 1; #_ = 1; #\u{6F} = 1; #\u2118 = 1; #ZW_\u200C_NJ = 1; #ZW_\u200D_J = 1;
+ $() {
+ return this.#$;
+ }
+ _() {
+ return this.#_;
+ }
+ \u{6F}() {
+ return this.#\u{6F};
+ }
+ \u2118() {
+ return this.#\u2118;
+ }
+ ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ;
+ }
+ ZW_\u200D_J() {
+ return this.#ZW_\u200D_J;
+ }
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+c.m().next().then(function(v) {
+ assert.sameValue(v.value, 42);
+ assert.sameValue(v.done, true);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(c.$(), 1);
+ assert.sameValue(c._(), 1);
+ assert.sameValue(c.\u{6F}(), 1);
+ assert.sameValue(c.\u2118(), 1);
+ assert.sameValue(c.ZW_\u200C_NJ(), 1);
+ assert.sameValue(c.ZW_\u200D_J(), 1);
+
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-privatename-identifier.js
new file mode 100644
index 0000000000..25e094aa92
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-privatename-identifier.js
@@ -0,0 +1,122 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-after-same-line-async-gen.template
+/*---
+description: Valid PrivateName (field definitions after an async generator in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public, async-iteration]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ async *m() { return 42; } #$; #_; #\u{6F}; #\u2118; #ZW_\u200C_NJ; #ZW_\u200D_J;
+ $(value) {
+ this.#$ = value;
+ return this.#$;
+ }
+ _(value) {
+ this.#_ = value;
+ return this.#_;
+ }
+ \u{6F}(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F};
+ }
+ \u2118(value) {
+ this.#\u2118 = value;
+ return this.#\u2118;
+ }
+ ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ = value;
+ return this.#ZW_\u200C_NJ;
+ }
+ ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J = value;
+ return this.#ZW_\u200D_J;
+ }
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+c.m().next().then(function(v) {
+ assert.sameValue(v.value, 42);
+ assert.sameValue(v.done, true);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(c.$(1), 1);
+ assert.sameValue(c._(1), 1);
+ assert.sameValue(c.\u{6F}(1), 1);
+ assert.sameValue(c.\u2118(1), 1);
+ assert.sameValue(c.ZW_\u200C_NJ(1), 1);
+ assert.sameValue(c.ZW_\u200D_J(1), 1);
+
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-static-async-generator-method-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-static-async-generator-method-privatename-identifier-alt.js
new file mode 100644
index 0000000000..4f39dd59e4
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-static-async-generator-method-privatename-identifier-alt.js
@@ -0,0 +1,148 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-async-generator-method-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-after-same-line-async-gen.template
+/*---
+description: Valid Static AsyncGeneratorMethod PrivateName (field definitions after an async generator in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public, async-iteration]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ async *m() { return 42; } static async * #$(value) {
+ yield * await value;
+ }
+ static async * #_(value) {
+ yield * await value;
+ }
+ static async * #o(value) {
+ yield * await value;
+ }
+ static async * #℘(value) {
+ yield * await value;
+ }
+ static async * #ZW_‌_NJ(value) {
+ yield * await value;
+ }
+ static async * #ZW_‍_J(value) {
+ yield * await value;
+ };
+ static get $() {
+ return this.#$;
+ }
+ static get _() {
+ return this.#_;
+ }
+ static get o() {
+ return this.#o;
+ }
+ static get ℘() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#℘;
+ }
+ static get ZW_‌_NJ() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‌_NJ;
+ }
+ static get ZW_‍_J() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‍_J;
+ }
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+c.m().next().then(function(v) {
+ assert.sameValue(v.value, 42);
+ assert.sameValue(v.done, true);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ Promise.all([
+ C.$([1]).next(),
+ C._([1]).next(),
+ C.o([1]).next(),
+ C.℘([1]).next(), // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.ZW_‌_NJ([1]).next(), // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.ZW_‍_J([1]).next(), // DO NOT CHANGE THE NAME OF THIS FIELD
+ ]).then(results => {
+
+ assert.sameValue(results[0].value, 1);
+ assert.sameValue(results[1].value, 1);
+ assert.sameValue(results[2].value, 1);
+ assert.sameValue(results[3].value, 1);
+ assert.sameValue(results[4].value, 1);
+ assert.sameValue(results[5].value, 1);
+
+ }).then($DONE, $DONE);
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-static-async-generator-method-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-static-async-generator-method-privatename-identifier.js
new file mode 100644
index 0000000000..71476df72b
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-static-async-generator-method-privatename-identifier.js
@@ -0,0 +1,149 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-async-generator-method-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-after-same-line-async-gen.template
+/*---
+description: Valid Static AsyncGeneratorMethod PrivateName (field definitions after an async generator in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public, async-iteration]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ async *m() { return 42; } static async * #$(value) {
+ yield * await value;
+ }
+ static async * #_(value) {
+ yield * await value;
+ }
+ static async * #\u{6F}(value) {
+ yield * await value;
+ }
+ static async * #\u2118(value) {
+ yield * await value;
+ }
+ static async * #ZW_\u200C_NJ(value) {
+ yield * await value;
+ }
+ static async * #ZW_\u200D_J(value) {
+ yield * await value;
+ };
+ static get $() {
+ return this.#$;
+ }
+ static get _() {
+ return this.#_;
+ }
+ static get \u{6F}() {
+ return this.#\u{6F};
+ }
+ static get \u2118() {
+ return this.#\u2118;
+ }
+ static get ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ;
+ }
+ static get ZW_\u200D_J() {
+ return this.#ZW_\u200D_J;
+ }
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+c.m().next().then(function(v) {
+ assert.sameValue(v.value, 42);
+ assert.sameValue(v.done, true);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ Promise.all([
+ C.$([1]).next(),
+ C._([1]).next(),
+ C.\u{6F}([1]).next(),
+ C.\u2118([1]).next(),
+ C.ZW_\u200C_NJ([1]).next(),
+ C.ZW_\u200D_J([1]).next(),
+ ]).then(results => {
+
+ assert.sameValue(results[0].value, 1);
+ assert.sameValue(results[1].value, 1);
+ assert.sameValue(results[2].value, 1);
+ assert.sameValue(results[3].value, 1);
+ assert.sameValue(results[4].value, 1);
+ assert.sameValue(results[5].value, 1);
+
+ }).then($DONE, $DONE);
+
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-static-async-method-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-static-async-method-privatename-identifier-alt.js
new file mode 100644
index 0000000000..9a7993365e
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-static-async-method-privatename-identifier-alt.js
@@ -0,0 +1,148 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-async-method-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-after-same-line-async-gen.template
+/*---
+description: Valid Static AsyncMethod PrivateName (field definitions after an async generator in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public, async-iteration]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ AsyncMethod
+
+ AsyncMethod :
+ async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ async *m() { return 42; } static async #$(value) {
+ return await value;
+ }
+ static async #_(value) {
+ return await value;
+ }
+ static async #o(value) {
+ return await value;
+ }
+ static async #℘(value) {
+ return await value;
+ }
+ static async #ZW_‌_NJ(value) {
+ return await value;
+ }
+ static async #ZW_‍_J(value) {
+ return await value;
+ };
+ static async $(value) {
+ return await this.#$(value);
+ }
+ static async _(value) {
+ return await this.#_(value);
+ }
+ static async o(value) {
+ return await this.#o(value);
+ }
+ static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return await this.#℘(value);
+ }
+ static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return await this.#ZW_‌_NJ(value);
+ }
+ static async ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return await this.#ZW_‍_J(value);
+ }
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+c.m().next().then(function(v) {
+ assert.sameValue(v.value, 42);
+ assert.sameValue(v.done, true);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ Promise.all([
+ C.$(1),
+ C._(1),
+ C.o(1),
+ C.℘(1), // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.ZW_‌_NJ(1), // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.ZW_‍_J(1), // DO NOT CHANGE THE NAME OF THIS FIELD
+ ]).then(results => {
+
+ assert.sameValue(results[0], 1);
+ assert.sameValue(results[1], 1);
+ assert.sameValue(results[2], 1);
+ assert.sameValue(results[3], 1);
+ assert.sameValue(results[4], 1);
+ assert.sameValue(results[5], 1);
+
+ }).then($DONE, $DONE);
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-static-async-method-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-static-async-method-privatename-identifier.js
new file mode 100644
index 0000000000..ab1f021ca8
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-static-async-method-privatename-identifier.js
@@ -0,0 +1,149 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-async-method-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-after-same-line-async-gen.template
+/*---
+description: Valid Static AsyncMethod PrivateName (field definitions after an async generator in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public, async-iteration]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ AsyncMethod
+
+ AsyncMethod :
+ async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ async *m() { return 42; } static async #$(value) {
+ return await value;
+ }
+ static async #_(value) {
+ return await value;
+ }
+ static async #\u{6F}(value) {
+ return await value;
+ }
+ static async #\u2118(value) {
+ return await value;
+ }
+ static async #ZW_\u200C_NJ(value) {
+ return await value;
+ }
+ static async #ZW_\u200D_J(value) {
+ return await value;
+ };
+ static async $(value) {
+ return await this.#$(value);
+ }
+ static async _(value) {
+ return await this.#_(value);
+ }
+ static async \u{6F}(value) {
+ return await this.#\u{6F}(value);
+ }
+ static async \u2118(value) {
+ return await this.#\u2118(value);
+ }
+ static async ZW_\u200C_NJ(value) {
+ return await this.#ZW_\u200C_NJ(value);
+ }
+ static async ZW_\u200D_J(value) {
+ return await this.#ZW_\u200D_J(value);
+ }
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+c.m().next().then(function(v) {
+ assert.sameValue(v.value, 42);
+ assert.sameValue(v.done, true);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ Promise.all([
+ C.$(1),
+ C._(1),
+ C.\u{6F}(1),
+ C.\u2118(1),
+ C.ZW_\u200C_NJ(1),
+ C.ZW_\u200D_J(1),
+ ]).then(results => {
+
+ assert.sameValue(results[0], 1);
+ assert.sameValue(results[1], 1);
+ assert.sameValue(results[2], 1);
+ assert.sameValue(results[3], 1);
+ assert.sameValue(results[4], 1);
+ assert.sameValue(results[5], 1);
+
+ }).then($DONE, $DONE);
+
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-static-generator-method-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-static-generator-method-privatename-identifier-alt.js
new file mode 100644
index 0000000000..3d3f000cdb
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-static-generator-method-privatename-identifier-alt.js
@@ -0,0 +1,137 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-generator-method-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-after-same-line-async-gen.template
+/*---
+description: Valid Static GeneratorMethod PrivateName (field definitions after an async generator in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public, async-iteration]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ GeneratorMethod
+
+ GeneratorMethod :
+ * ClassElementName ( UniqueFormalParameters ){ GeneratorBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ async *m() { return 42; } static * #$(value) {
+ yield * value;
+ }
+ static * #_(value) {
+ yield * value;
+ }
+ static * #o(value) {
+ yield * value;
+ }
+ static * #℘(value) {
+ yield * value;
+ }
+ static * #ZW_‌_NJ(value) {
+ yield * value;
+ }
+ static * #ZW_‍_J(value) {
+ yield * value;
+ };
+ static get $() {
+ return this.#$;
+ }
+ static get _() {
+ return this.#_;
+ }
+ static get o() {
+ return this.#o;
+ }
+ static get ℘() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#℘;
+ }
+ static get ZW_‌_NJ() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‌_NJ;
+ }
+ static get ZW_‍_J() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‍_J;
+ }
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+c.m().next().then(function(v) {
+ assert.sameValue(v.value, 42);
+ assert.sameValue(v.done, true);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(C.$([1]).next().value, 1);
+ assert.sameValue(C._([1]).next().value, 1);
+ assert.sameValue(C.o([1]).next().value, 1);
+ assert.sameValue(C.℘([1]).next().value, 1);
+ assert.sameValue(C.ZW_‌_NJ([1]).next().value, 1);
+ assert.sameValue(C.ZW_‍_J([1]).next().value, 1);
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-static-generator-method-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-static-generator-method-privatename-identifier.js
new file mode 100644
index 0000000000..0bf793f536
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-static-generator-method-privatename-identifier.js
@@ -0,0 +1,138 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-generator-method-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-after-same-line-async-gen.template
+/*---
+description: Valid Static GeneratorMethod PrivateName (field definitions after an async generator in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public, async-iteration]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ GeneratorMethod
+
+ GeneratorMethod :
+ * ClassElementName ( UniqueFormalParameters ){ GeneratorBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ async *m() { return 42; } static * #$(value) {
+ yield * value;
+ }
+ static * #_(value) {
+ yield * value;
+ }
+ static * #\u{6F}(value) {
+ yield * value;
+ }
+ static * #\u2118(value) {
+ yield * value;
+ }
+ static * #ZW_\u200C_NJ(value) {
+ yield * value;
+ }
+ static * #ZW_\u200D_J(value) {
+ yield * value;
+ };
+ static get $() {
+ return this.#$;
+ }
+ static get _() {
+ return this.#_;
+ }
+ static get \u{6F}() {
+ return this.#\u{6F};
+ }
+ static get \u2118() {
+ return this.#\u2118;
+ }
+ static get ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ;
+ }
+ static get ZW_\u200D_J() {
+ return this.#ZW_\u200D_J;
+ }
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+c.m().next().then(function(v) {
+ assert.sameValue(v.value, 42);
+ assert.sameValue(v.done, true);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(C.$([1]).next().value, 1);
+ assert.sameValue(C._([1]).next().value, 1);
+ assert.sameValue(C.\u{6F}([1]).next().value, 1);
+ assert.sameValue(C.\u2118([1]).next().value, 1);
+ assert.sameValue(C.ZW_\u200C_NJ([1]).next().value, 1);
+ assert.sameValue(C.ZW_\u200D_J([1]).next().value, 1);
+
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-static-method-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-static-method-privatename-identifier-alt.js
new file mode 100644
index 0000000000..57fa08c44f
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-static-method-privatename-identifier-alt.js
@@ -0,0 +1,135 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-method-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-after-same-line-async-gen.template
+/*---
+description: Valid Static Method PrivateName (field definitions after an async generator in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public, async-iteration]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ ClassElementName ( UniqueFormalParameters ){ FunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ async *m() { return 42; } static #$(value) {
+ return value;
+ }
+ static #_(value) {
+ return value;
+ }
+ static #o(value) {
+ return value;
+ }
+ static #℘(value) {
+ return value;
+ }
+ static #ZW_‌_NJ(value) {
+ return value;
+ }
+ static #ZW_‍_J(value) {
+ return value;
+ };
+ static $(value) {
+ return this.#$(value);
+ }
+ static _(value) {
+ return this.#_(value);
+ }
+ static o(value) {
+ return this.#o(value);
+ }
+ static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#℘(value);
+ }
+ static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‌_NJ(value);
+ }
+ static ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‍_J(value);
+ }
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+c.m().next().then(function(v) {
+ assert.sameValue(v.value, 42);
+ assert.sameValue(v.done, true);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(C.$(1), 1);
+ assert.sameValue(C._(1), 1);
+ assert.sameValue(C.o(1), 1);
+ assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+ assert.sameValue(C.ZW_‌_NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+ assert.sameValue(C.ZW_‍_J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-static-method-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-static-method-privatename-identifier.js
new file mode 100644
index 0000000000..403e3b857b
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-static-method-privatename-identifier.js
@@ -0,0 +1,135 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-method-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-after-same-line-async-gen.template
+/*---
+description: Valid Static Method PrivateName (field definitions after an async generator in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public, async-iteration]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ ClassElementName ( UniqueFormalParameters ){ FunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ async *m() { return 42; } static #$(value) {
+ return value;
+ }
+ static #_(value) {
+ return value;
+ }
+ static #\u{6F}(value) {
+ return value;
+ }
+ static #\u2118(value) {
+ return value;
+ }
+ static #ZW_\u200C_NJ(value) {
+ return value;
+ }
+ static #ZW_\u200D_J(value) {
+ return value;
+ };
+ static $(value) {
+ return this.#$(value);
+ }
+ static _(value) {
+ return this.#_(value);
+ }
+ static \u{6F}(value) {
+ return this.#\u{6F}(value);
+ }
+ static \u2118(value) {
+ return this.#\u2118(value);
+ }
+ static ZW_\u200C_NJ(value) {
+ return this.#ZW_\u200C_NJ(value);
+ }
+ static ZW_\u200D_J(value) {
+ return this.#ZW_\u200D_J(value);
+ }
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+c.m().next().then(function(v) {
+ assert.sameValue(v.value, 42);
+ assert.sameValue(v.done, true);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(C.$(1), 1);
+ assert.sameValue(C._(1), 1);
+ assert.sameValue(C.\u{6F}(1), 1);
+ assert.sameValue(C.\u2118(1), 1);
+ assert.sameValue(C.ZW_\u200C_NJ(1), 1);
+ assert.sameValue(C.ZW_\u200D_J(1), 1);
+
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-static-privatename-identifier-alt-by-classname.js b/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-static-privatename-identifier-alt-by-classname.js
new file mode 100644
index 0000000000..16eb36e6fb
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-static-privatename-identifier-alt-by-classname.js
@@ -0,0 +1,123 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-alt-by-classname.case
+// - src/class-elements/productions/cls-decl-after-same-line-async-gen.template
+/*---
+description: Valid Static PrivateName (field definitions after an async generator in the same line)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public, async-iteration]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ async *m() { return 42; } static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_‍_J;
+ static $(value) {
+ C.#$ = value;
+ return C.#$;
+ }
+ static _(value) {
+ C.#_ = value;
+ return C.#_;
+ }
+ static o(value) {
+ C.#\u{6F} = value;
+ return C.#\u{6F};
+ }
+ static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.#℘ = value;
+ return C.#℘;
+ }
+ static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.#ZW_‌_NJ = value;
+ return C.#ZW_‌_NJ;
+ }
+ static ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.#ZW_‍_J = value;
+ return C.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+c.m().next().then(function(v) {
+ assert.sameValue(v.value, 42);
+ assert.sameValue(v.done, true);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(C.$(1), 1);
+ assert.sameValue(C._(1), 1);
+ assert.sameValue(C.o(1), 1);
+ assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+ assert.sameValue(C.ZW_‌_NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+ assert.sameValue(C.ZW_‍_J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-static-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-static-privatename-identifier-alt.js
new file mode 100644
index 0000000000..1e9a245c1f
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-static-privatename-identifier-alt.js
@@ -0,0 +1,123 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-after-same-line-async-gen.template
+/*---
+description: Valid Static PrivateName (field definitions after an async generator in the same line)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public, async-iteration]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ async *m() { return 42; } static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_‍_J;
+ static $(value) {
+ this.#$ = value;
+ return this.#$;
+ }
+ static _(value) {
+ this.#_ = value;
+ return this.#_;
+ }
+ static o(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F};
+ }
+ static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ this.#℘ = value;
+ return this.#℘;
+ }
+ static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ this.#ZW_‌_NJ = value;
+ return this.#ZW_‌_NJ;
+ }
+ static ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ this.#ZW_‍_J = value;
+ return this.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+c.m().next().then(function(v) {
+ assert.sameValue(v.value, 42);
+ assert.sameValue(v.done, true);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(C.$(1), 1);
+ assert.sameValue(C._(1), 1);
+ assert.sameValue(C.o(1), 1);
+ assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+ assert.sameValue(C.ZW_‌_NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+ assert.sameValue(C.ZW_‍_J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-static-privatename-identifier-by-classname.js b/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-static-privatename-identifier-by-classname.js
new file mode 100644
index 0000000000..e9351775f5
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-static-privatename-identifier-by-classname.js
@@ -0,0 +1,123 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-by-classname.case
+// - src/class-elements/productions/cls-decl-after-same-line-async-gen.template
+/*---
+description: Valid Static PrivateName (field definitions after an async generator in the same line)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public, async-iteration]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ async *m() { return 42; } static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J;
+ static $(value) {
+ C.#$ = value;
+ return C.#$;
+ }
+ static _(value) {
+ C.#_ = value;
+ return C.#_;
+ }
+ static \u{6F}(value) {
+ C.#\u{6F} = value;
+ return C.#\u{6F};
+ }
+ static \u2118(value) {
+ C.#\u2118 = value;
+ return C.#\u2118;
+ }
+ static ZW_\u200C_NJ(value) {
+ C.#ZW_\u200C_NJ = value;
+ return C.#ZW_\u200C_NJ;
+ }
+ static ZW_\u200D_J(value) {
+ C.#ZW_\u200D_J = value;
+ return C.#ZW_\u200D_J;
+ }
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+c.m().next().then(function(v) {
+ assert.sameValue(v.value, 42);
+ assert.sameValue(v.done, true);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(C.$(1), 1);
+ assert.sameValue(C._(1), 1);
+ assert.sameValue(C.\u{6F}(1), 1);
+ assert.sameValue(C.\u2118(1), 1);
+ assert.sameValue(C.ZW_\u200C_NJ(1), 1);
+ assert.sameValue(C.ZW_\u200D_J(1), 1);
+
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js b/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js
new file mode 100644
index 0000000000..9b954de62d
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js
@@ -0,0 +1,117 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-initializer-alt-by-classname.case
+// - src/class-elements/productions/cls-decl-after-same-line-async-gen.template
+/*---
+description: Valid Static PrivateName (field definitions after an async generator in the same line)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public, async-iteration]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ async *m() { return 42; } static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_‍_J = 1;
+ static $() {
+ return C.#$;
+ }
+ static _() {
+ return C.#_;
+ }
+ static \u{6F}() {
+ return C.#\u{6F};
+ }
+ static ℘() {
+ return C.#℘;
+ }
+ static ZW_‌_NJ() {
+ return C.#ZW_‌_NJ;
+ }
+ static ZW_‍_J() {
+ return C.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+c.m().next().then(function(v) {
+ assert.sameValue(v.value, 42);
+ assert.sameValue(v.done, true);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(C.$(), 1);
+ assert.sameValue(C._(), 1);
+ assert.sameValue(C.\u{6F}(), 1);
+ assert.sameValue(C.℘(), 1);
+ assert.sameValue(C.ZW_‌_NJ(), 1);
+ assert.sameValue(C.ZW_‍_J(), 1);
+
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-static-privatename-identifier-initializer-alt.js b/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-static-privatename-identifier-initializer-alt.js
new file mode 100644
index 0000000000..ef223e30dd
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-static-privatename-identifier-initializer-alt.js
@@ -0,0 +1,117 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-initializer-alt.case
+// - src/class-elements/productions/cls-decl-after-same-line-async-gen.template
+/*---
+description: Valid Static PrivateName (field definitions after an async generator in the same line)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public, async-iteration]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ async *m() { return 42; } static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_‍_J = 1;
+ static $() {
+ return this.#$;
+ }
+ static _() {
+ return this.#_;
+ }
+ static \u{6F}() {
+ return this.#\u{6F};
+ }
+ static ℘() {
+ return this.#℘;
+ }
+ static ZW_‌_NJ() {
+ return this.#ZW_‌_NJ;
+ }
+ static ZW_‍_J() {
+ return this.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+c.m().next().then(function(v) {
+ assert.sameValue(v.value, 42);
+ assert.sameValue(v.done, true);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(C.$(), 1);
+ assert.sameValue(C._(), 1);
+ assert.sameValue(C.\u{6F}(), 1);
+ assert.sameValue(C.℘(), 1);
+ assert.sameValue(C.ZW_‌_NJ(), 1);
+ assert.sameValue(C.ZW_‍_J(), 1);
+
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-static-privatename-identifier-initializer.js b/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-static-privatename-identifier-initializer.js
new file mode 100644
index 0000000000..89b39924ff
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-static-privatename-identifier-initializer.js
@@ -0,0 +1,117 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-initializer.case
+// - src/class-elements/productions/cls-decl-after-same-line-async-gen.template
+/*---
+description: Valid Static PrivateName (field definitions after an async generator in the same line)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public, async-iteration]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ async *m() { return 42; } static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #\u2118 = 1; static #ZW_\u200C_NJ = 1; static #ZW_\u200D_J = 1;
+ static $() {
+ return this.#$;
+ }
+ static _() {
+ return this.#_;
+ }
+ static \u{6F}() {
+ return this.#\u{6F};
+ }
+ static \u2118() {
+ return this.#\u2118;
+ }
+ static ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ;
+ }
+ static ZW_\u200D_J() {
+ return this.#ZW_\u200D_J;
+ }
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+c.m().next().then(function(v) {
+ assert.sameValue(v.value, 42);
+ assert.sameValue(v.done, true);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(C.$(), 1);
+ assert.sameValue(C._(), 1);
+ assert.sameValue(C.\u{6F}(), 1);
+ assert.sameValue(C.\u2118(), 1);
+ assert.sameValue(C.ZW_\u200C_NJ(), 1);
+ assert.sameValue(C.ZW_\u200D_J(), 1);
+
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-static-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-static-privatename-identifier.js
new file mode 100644
index 0000000000..cc7eb655b6
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-rs-static-privatename-identifier.js
@@ -0,0 +1,123 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-after-same-line-async-gen.template
+/*---
+description: Valid Static PrivateName (field definitions after an async generator in the same line)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public, async-iteration]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ async *m() { return 42; } static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J;
+ static $(value) {
+ this.#$ = value;
+ return this.#$;
+ }
+ static _(value) {
+ this.#_ = value;
+ return this.#_;
+ }
+ static \u{6F}(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F};
+ }
+ static \u2118(value) {
+ this.#\u2118 = value;
+ return this.#\u2118;
+ }
+ static ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ = value;
+ return this.#ZW_\u200C_NJ;
+ }
+ static ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J = value;
+ return this.#ZW_\u200D_J;
+ }
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+c.m().next().then(function(v) {
+ assert.sameValue(v.value, 42);
+ assert.sameValue(v.done, true);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(C.$(1), 1);
+ assert.sameValue(C._(1), 1);
+ assert.sameValue(C.\u{6F}(1), 1);
+ assert.sameValue(C.\u2118(1), 1);
+ assert.sameValue(C.ZW_\u200C_NJ(1), 1);
+ assert.sameValue(C.ZW_\u200D_J(1), 1);
+
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-static-private-fields.js b/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-static-private-fields.js
new file mode 100644
index 0000000000..534bf0f6aa
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-static-private-fields.js
@@ -0,0 +1,84 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/static-private-fields.case
+// - src/class-elements/productions/cls-decl-after-same-line-async-gen.template
+/*---
+description: static private fields (field definitions after an async generator in the same line)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public, async-iteration]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ static FieldDefinition ;
+
+ FieldDefinition :
+ ClassElementName Initializer_opt
+
+ ClassElementName :
+ PrivateName
+
+ PrivateName :
+ # IdentifierName
+
+---*/
+
+
+class C {
+ async *m() { return 42; } static #x; static #y;
+ static x() {
+ this.#x = 42;
+ return this.#x;
+ }
+ static y() {
+ this.#y = 43;
+ return this.#y;
+ }
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+c.m().next().then(function(v) {
+ assert.sameValue(v.value, 42);
+ assert.sameValue(v.done, true);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ // Test the private fields do not appear as properties before set to value
+ assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#x"), "test 1");
+ assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 2");
+ assert(!Object.prototype.hasOwnProperty.call(c, "#x"), "test 3");
+
+ assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#y"), "test 4");
+ assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 5");
+ assert(!Object.prototype.hasOwnProperty.call(c, "#y"), "test 6");
+
+ // Test if private fields can be sucessfully accessed and set to value
+ assert.sameValue(C.x(), 42, "test 7");
+ assert.sameValue(C.y(), 43, "test 8");
+
+ // Test the private fields do not appear as properties before after set to value
+ assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 9");
+ assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 10");
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-static-private-methods-with-fields.js b/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-static-private-methods-with-fields.js
new file mode 100644
index 0000000000..508876ee08
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-static-private-methods-with-fields.js
@@ -0,0 +1,101 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/static-private-methods-with-fields.case
+// - src/class-elements/productions/cls-decl-after-same-line-async-gen.template
+/*---
+description: static private methods with fields (field definitions after an async generator in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class-static-fields-private, class, class-fields-public, async-iteration]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ static FieldDefinition ;
+
+ FieldDefinition :
+ ClassElementName Initializer_opt
+
+ ClassElementName :
+ PrivateName
+
+ PrivateName :
+ # IdentifierName
+
+---*/
+
+
+class C {
+ async *m() { return 42; } static #xVal; static #yVal;
+ static #x(value) {
+ this.#xVal = value;
+ return this.#xVal;
+ }
+ static #y(value) {
+ this.#yVal = value;
+ return this.#yVal;
+ }
+ static x() {
+ return this.#x(42);
+ }
+ static y() {
+ return this.#y(43);
+ }
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+c.m().next().then(function(v) {
+ assert.sameValue(v.value, 42);
+ assert.sameValue(v.done, true);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ // Test the private methods do not appear as properties before set to value
+ assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#x"), "test 1");
+ assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 2");
+ assert(!Object.prototype.hasOwnProperty.call(c, "#x"), "test 3");
+
+ assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#y"), "test 4");
+ assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 5");
+ assert(!Object.prototype.hasOwnProperty.call(c, "#y"), "test 6");
+
+ assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#xVal"), "test 7");
+ assert(!Object.prototype.hasOwnProperty.call(C, "#xVal"), "test 8");
+ assert(!Object.prototype.hasOwnProperty.call(c, "#xVal"), "test 9");
+
+ assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#yVal"), "test 10");
+ assert(!Object.prototype.hasOwnProperty.call(C, "#yVal"), "test 11");
+ assert(!Object.prototype.hasOwnProperty.call(c, "#yVal"), "test 12");
+
+ // Test if private fields can be sucessfully accessed and set to value
+ assert.sameValue(C.x(), 42, "test 13");
+ assert.sameValue(C.y(), 43, "test 14");
+
+ // Test the private fields do not appear as properties before after set to value
+ assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 15");
+ assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 16");
+
+ assert(!Object.prototype.hasOwnProperty.call(C, "#xVal"), "test 17");
+ assert(!Object.prototype.hasOwnProperty.call(C, "#yVal"), "test 18");
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-static-private-methods.js b/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-static-private-methods.js
new file mode 100644
index 0000000000..9b6f577fca
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-static-private-methods.js
@@ -0,0 +1,88 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/static-private-methods.case
+// - src/class-elements/productions/cls-decl-after-same-line-async-gen.template
+/*---
+description: static private methods (field definitions after an async generator in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public, async-iteration]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ static FieldDefinition ;
+
+ FieldDefinition :
+ ClassElementName Initializer_opt
+
+ ClassElementName :
+ PrivateName
+
+ PrivateName :
+ # IdentifierName
+
+---*/
+
+
+class C {
+ async *m() { return 42; } ;
+ static #x(value) {
+ return value / 2;
+ }
+ static #y(value) {
+ return value * 2;
+ }
+ static x() {
+ return this.#x(84);
+ }
+ static y() {
+ return this.#y(43);
+ }
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+c.m().next().then(function(v) {
+ assert.sameValue(v.value, 42);
+ assert.sameValue(v.done, true);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ // Test the private methods do not appear as properties before set to value
+ assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#x"), "test 1");
+ assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 2");
+ assert(!Object.prototype.hasOwnProperty.call(c, "#x"), "test 3");
+
+ assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#y"), "test 4");
+ assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 5");
+ assert(!Object.prototype.hasOwnProperty.call(c, "#y"), "test 6");
+
+ // Test if private fields can be sucessfully accessed and set to value
+ assert.sameValue(C.x(), 42, "test 7");
+ assert.sameValue(C.y(), 86, "test 8");
+
+ // Test the private fields do not appear as properties before after set to value
+ assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 9");
+ assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 10");
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-string-literal-names.js b/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-string-literal-names.js
new file mode 100644
index 0000000000..911faa1d9a
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-async-gen-string-literal-names.js
@@ -0,0 +1,122 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/string-literal-names.case
+// - src/class-elements/productions/cls-decl-after-same-line-async-gen.template
+/*---
+description: String literal names (field definitions after an async generator in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-public, class, async-iteration]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement:
+ ...
+ FieldDefinition ;
+
+ FieldDefinition:
+ ClassElementName Initializer_opt
+
+ ClassElementName:
+ PropertyName
+
+---*/
+
+
+class C {
+ async *m() { return 42; } 'a'; "b"; 'c' = 39;
+ "d" = 42;
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+c.m().next().then(function(v) {
+ assert.sameValue(v.value, 42);
+ assert.sameValue(v.done, true);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "a"),
+ "a does not appear as an own property on C prototype"
+ );
+ assert(
+ !Object.prototype.hasOwnProperty.call(C, "a"),
+ "a does not appear as an own property on C constructor"
+ );
+
+ verifyProperty(c, "a", {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+ });
+
+ assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "b"),
+ "b does not appear as an own property on C prototype"
+ );
+ assert(
+ !Object.prototype.hasOwnProperty.call(C, "b"),
+ "b does not appear as an own property on C constructor"
+ );
+
+ verifyProperty(c, "b", {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+ });
+
+ assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "c"),
+ "c does not appear as an own property on C prototype"
+ );
+ assert(
+ !Object.prototype.hasOwnProperty.call(C, "c"),
+ "c does not appear as an own property on C constructor"
+ );
+
+ verifyProperty(c, "c", {
+ value: 39,
+ enumerable: true,
+ writable: true,
+ configurable: true
+ });
+
+ assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "d"),
+ "d does not appear as an own property on C prototype"
+ );
+ assert(
+ !Object.prototype.hasOwnProperty.call(C, "d"),
+ "d does not appear as an own property on C constructor"
+ );
+
+ verifyProperty(c, "d", {
+ value: 42,
+ enumerable: true,
+ writable: true,
+ configurable: true
+ });
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-async-method-computed-names.js b/js/src/tests/test262/language/statements/class/elements/same-line-async-method-computed-names.js
new file mode 100644
index 0000000000..9bb608a2f8
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-async-method-computed-names.js
@@ -0,0 +1,119 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/computed-names.case
+// - src/class-elements/productions/cls-decl-after-same-line-async-method.template
+/*---
+description: Computed property names (field definitions after an async method in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-public, computed-property-names, class, async-functions]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement:
+ ...
+ FieldDefinition ;
+
+ FieldDefinition:
+ ClassElementName Initializer_opt
+
+ ClassElementName:
+ PropertyName
+
+---*/
+var x = "b";
+
+
+
+class C {
+ async m() { return 42; } [x] = 42; [10] = "meep"; ["not initialized"];
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+c.m().then(function(v) {
+ assert.sameValue(v, 42);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "b"),
+ "b doesn't appear as an own property on C prototype"
+ );
+ assert(
+ !Object.prototype.hasOwnProperty.call(C, "b"),
+ "b doesn't appear as an own property on C constructor"
+ );
+
+ verifyProperty(c, "b", {
+ value: 42,
+ enumerable: true,
+ writable: true,
+ configurable: true
+ });
+
+ assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "x"),
+ "x doesn't appear as an own property on C prototype"
+ );
+ assert(
+ !Object.prototype.hasOwnProperty.call(C, "x"),
+ "x doesn't appear as an own property on C constructor"
+ );
+ assert(
+ !Object.prototype.hasOwnProperty.call(c, "x"),
+ "x doesn't appear as an own property on C instance"
+ );
+
+ assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "10"),
+ "10 doesn't appear as an own property on C prototype"
+ );
+ assert(
+ !Object.prototype.hasOwnProperty.call(C, "10"),
+ "10 doesn't appear as an own property on C constructor"
+ );
+
+ verifyProperty(c, "10", {
+ value: "meep",
+ enumerable: true,
+ writable: true,
+ configurable: true
+ });
+
+ assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "not initialized"),
+ "'not initialized' doesn't appear as an own property on C prototype"
+ );
+ assert(
+ !Object.prototype.hasOwnProperty.call(C, "not initialized"),
+ "'not initialized' doesn't appear as an own property on C constructor"
+ );
+
+ verifyProperty(c, "not initialized", {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+ });
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-async-method-computed-symbol-names.js b/js/src/tests/test262/language/statements/class/elements/same-line-async-method-computed-symbol-names.js
new file mode 100644
index 0000000000..395584354c
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-async-method-computed-symbol-names.js
@@ -0,0 +1,117 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/computed-symbol-names.case
+// - src/class-elements/productions/cls-decl-after-same-line-async-method.template
+/*---
+description: Computed property symbol names (field definitions after an async method in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-public, Symbol, computed-property-names, class, async-functions]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement:
+ ...
+ FieldDefinition ;
+
+ FieldDefinition:
+ ClassElementName Initializer_opt
+
+ ClassElementName:
+ PropertyName
+
+---*/
+var x = Symbol();
+var y = Symbol();
+
+
+
+class C {
+ async m() { return 42; } [x]; [y] = 42;
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+c.m().then(function(v) {
+ assert.sameValue(v, 42);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, x),
+ "Symbol x doesn't appear as an own property on C prototype"
+ );
+ assert(
+ !Object.prototype.hasOwnProperty.call(C, x),
+ "Symbol x doesn't appear as an own property on C constructor"
+ );
+
+ verifyProperty(c, x, {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+ });
+
+ assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, y),
+ "Symbol y doesn't appear as an own property on C prototype"
+ );
+ assert(
+ !Object.prototype.hasOwnProperty.call(C, y),
+ "Symbol y doesn't appear as an own property on C constructor"
+ );
+
+ verifyProperty(c, y, {
+ value: 42,
+ enumerable: true,
+ writable: true,
+ configurable: true
+ });
+
+ assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "x"),
+ "x doesn't appear as an own property on C prototype"
+ );
+ assert(
+ !Object.prototype.hasOwnProperty.call(C, "x"),
+ "x doesn't appear as an own property on C constructor"
+ );
+ assert(
+ !Object.prototype.hasOwnProperty.call(c, "x"),
+ "x doesn't appear as an own property on C instance"
+ );
+
+ assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "y"),
+ "y doesn't appear as an own property on C prototype"
+ );
+ assert(
+ !Object.prototype.hasOwnProperty.call(C, "y"),
+ "y doesn't appear as an own property on C constructor"
+ );
+ assert(
+ !Object.prototype.hasOwnProperty.call(c, "y"),
+ "y doesn't appear as an own property on C instance"
+ );
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-async-method-grammar-privatename-identifier-semantics-stringvalue.js b/js/src/tests/test262/language/statements/class/elements/same-line-async-method-grammar-privatename-identifier-semantics-stringvalue.js
new file mode 100644
index 0000000000..b474834e14
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-async-method-grammar-privatename-identifier-semantics-stringvalue.js
@@ -0,0 +1,121 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-privatename-identifier-semantics-stringvalue.case
+// - src/class-elements/productions/cls-decl-after-same-line-async-method.template
+/*---
+description: PrivateName Static Semantics, StringValue (field definitions after an async method in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public, async-functions]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+
+ 1. Return the String value consisting of the sequence of code
+ units corresponding to PrivateName. In determining the sequence
+ any occurrences of \ UnicodeEscapeSequence are first replaced
+ with the code point represented by the UnicodeEscapeSequence
+ and then the code points of the entire PrivateName are converted
+ to code units by UTF16Encoding (10.1.1) each code point.
+
+---*/
+
+
+class C {
+ async m() { return 42; } #\u{6F};
+ #\u2118;
+ #ZW_\u200C_NJ;
+ #ZW_\u200D_J;;
+ o(value) {
+ this.#o = value;
+ return this.#o;
+ }
+ ℘(value) {
+ this.#℘ = value;
+ return this.#℘;
+ }
+ ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS METHOD
+ this.#ZW_‌_NJ = value;
+ return this.#ZW_‌_NJ;
+ }
+ ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS METHOD
+ this.#ZW_‍_J = value;
+ return this.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+c.m().then(function(v) {
+ assert.sameValue(v, 42);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(c.o(1), 1);
+ assert.sameValue(c.℘(1), 1);
+ assert.sameValue(c.ZW_‌_NJ(1), 1);
+ assert.sameValue(c.ZW_‍_J(1), 1);
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-async-method-literal-names-asi.js b/js/src/tests/test262/language/statements/class/elements/same-line-async-method-literal-names-asi.js
new file mode 100644
index 0000000000..ace9109e4b
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-async-method-literal-names-asi.js
@@ -0,0 +1,89 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/literal-names-asi.case
+// - src/class-elements/productions/cls-decl-after-same-line-async-method.template
+/*---
+description: Literal property names with ASI (field definitions after an async method in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-public, class, async-functions]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement:
+ ...
+ FieldDefinition ;
+
+ FieldDefinition:
+ ClassElementName Initializer_opt
+
+ ClassElementName:
+ PropertyName
+
+---*/
+
+
+class C {
+ async m() { return 42; } a
+ b = 42;;
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+c.m().then(function(v) {
+ assert.sameValue(v, 42);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "a"),
+ "a doesn't appear as an own property on C prototype"
+ );
+ assert(
+ !Object.prototype.hasOwnProperty.call(C, "a"),
+ "a doesn't appear as an own property on C constructor"
+ );
+
+ verifyProperty(c, "a", {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+ });
+
+ assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "b"),
+ "b doesn't appear as an own property on C prototype"
+ );
+ assert(
+ !Object.prototype.hasOwnProperty.call(C, "b"),
+ "b doesn't appear as an own property on C constructor"
+ );
+
+ verifyProperty(c, "b", {
+ value: 42,
+ enumerable: true,
+ writable: true,
+ configurable: true
+ });
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-async-method-literal-names.js b/js/src/tests/test262/language/statements/class/elements/same-line-async-method-literal-names.js
new file mode 100644
index 0000000000..3bafafbc0d
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-async-method-literal-names.js
@@ -0,0 +1,108 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/literal-names.case
+// - src/class-elements/productions/cls-decl-after-same-line-async-method.template
+/*---
+description: Literal property names (field definitions after an async method in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-public, class, async-functions]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement:
+ ...
+ FieldDefinition ;
+
+ FieldDefinition:
+ ClassElementName Initializer_opt
+
+ ClassElementName:
+ PropertyName
+
+---*/
+const fn = function() {}
+
+
+
+class C {
+ async m() { return 42; } a; b = 42;
+ c = fn;
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+c.m().then(function(v) {
+ assert.sameValue(v, 42);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "a"),
+ "a doesn't appear as an own property on C prototype"
+ );
+ assert(
+ !Object.prototype.hasOwnProperty.call(C, "a"),
+ "a doesn't appear as an own property on C constructor"
+ );
+
+ verifyProperty(c, "a", {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+ });
+
+ assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "b"),
+ "b doesn't appear as an own property on C prototype"
+ );
+ assert(
+ !Object.prototype.hasOwnProperty.call(C, "b"),
+ "b doesn't appear as an own property on C constructor"
+ );
+
+ verifyProperty(c, "b", {
+ value: 42,
+ enumerable: true,
+ writable: true,
+ configurable: true
+ });
+
+ assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "c"),
+ "c doesn't appear as an own property on C prototype"
+ );
+ assert(
+ !Object.prototype.hasOwnProperty.call(C, "c"),
+ "c doesn't appear as an own property on C constructor"
+ );
+
+ verifyProperty(c, "c", {
+ value: fn,
+ enumerable: true,
+ writable: true,
+ configurable: true
+ });
+
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-async-method-private-field-usage.js b/js/src/tests/test262/language/statements/class/elements/same-line-async-method-private-field-usage.js
new file mode 100644
index 0000000000..66469c293d
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-async-method-private-field-usage.js
@@ -0,0 +1,61 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-field-usage.case
+// - src/class-elements/productions/cls-decl-after-same-line-async-method.template
+/*---
+description: PrivateName CallExpression usage (private field) (field definitions after an async method in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public, async-functions]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ Updated Productions
+
+ CallExpression[Yield, Await]:
+ CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+ SuperCall[?Yield, ?Await]
+ CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+ CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+ CallExpression[?Yield, ?Await].IdentifierName
+ CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+ CallExpression[?Yield, ?Await].PrivateName
+
+---*/
+
+
+class C {
+ async m() { return 42; } #m = 'test262';;
+ method() {
+ return this.#m;
+ }
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+c.m().then(function(v) {
+ assert.sameValue(v, 42);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(c.method(), 'test262');
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-async-method-private-method-getter-usage.js b/js/src/tests/test262/language/statements/class/elements/same-line-async-method-private-method-getter-usage.js
new file mode 100644
index 0000000000..f71ee44739
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-async-method-private-method-getter-usage.js
@@ -0,0 +1,61 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-method-getter-usage.case
+// - src/class-elements/productions/cls-decl-after-same-line-async-method.template
+/*---
+description: PrivateName CallExpression usage (Accesor get method) (field definitions after an async method in the same line)
+esid: prod-FieldDefinition
+features: [class-methods-private, class, class-fields-public, async-functions]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ Updated Productions
+
+ CallExpression[Yield, Await]:
+ CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+ SuperCall[?Yield, ?Await]
+ CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+ CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+ CallExpression[?Yield, ?Await].IdentifierName
+ CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+ CallExpression[?Yield, ?Await].PrivateName
+
+---*/
+
+
+class C {
+ async m() { return 42; } get #m() { return 'test262'; };
+ method() {
+ return this.#m;
+ }
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+c.m().then(function(v) {
+ assert.sameValue(v, 42);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(c.method(), 'test262');
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-async-method-private-method-usage.js b/js/src/tests/test262/language/statements/class/elements/same-line-async-method-private-method-usage.js
new file mode 100644
index 0000000000..f5b90f8685
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-async-method-private-method-usage.js
@@ -0,0 +1,61 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-method-usage.case
+// - src/class-elements/productions/cls-decl-after-same-line-async-method.template
+/*---
+description: PrivateName CallExpression usage (private method) (field definitions after an async method in the same line)
+esid: prod-FieldDefinition
+features: [class-methods-private, class, class-fields-public, async-functions]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ Updated Productions
+
+ CallExpression[Yield, Await]:
+ CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+ SuperCall[?Yield, ?Await]
+ CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+ CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+ CallExpression[?Yield, ?Await].IdentifierName
+ CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+ CallExpression[?Yield, ?Await].PrivateName
+
+---*/
+
+
+class C {
+ async m() { return 42; } #m() { return 'test262'; };
+ method() {
+ return this.#m();
+ }
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+c.m().then(function(v) {
+ assert.sameValue(v, 42);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(c.method(), 'test262');
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-async-method-private-names.js b/js/src/tests/test262/language/statements/class/elements/same-line-async-method-private-names.js
new file mode 100644
index 0000000000..7dde827b1e
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-async-method-private-names.js
@@ -0,0 +1,83 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-names.case
+// - src/class-elements/productions/cls-decl-after-same-line-async-method.template
+/*---
+description: private names (field definitions after an async method in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public, async-functions]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ FieldDefinition ;
+
+ FieldDefinition :
+ ClassElementName Initializer_opt
+
+ ClassElementName :
+ PrivateName
+
+ PrivateName :
+ # IdentifierName
+
+---*/
+
+
+class C {
+ async m() { return 42; } #x; #y;
+ x() {
+ this.#x = 42;
+ return this.#x;
+ }
+ y() {
+ this.#y = 43;
+ return this.#y;
+ }
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+c.m().then(function(v) {
+ assert.sameValue(v, 42);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ // Test the private fields do not appear as properties before set to value
+ assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#x"), "test 1");
+ assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 2");
+ assert(!Object.prototype.hasOwnProperty.call(c, "#x"), "test 3");
+
+ assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#y"), "test 4");
+ assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 5");
+ assert(!Object.prototype.hasOwnProperty.call(c, "#y"), "test 6");
+
+ // Test if private fields can be sucessfully accessed and set to value
+ assert.sameValue(c.x(), 42, "test 7");
+ assert.sameValue(c.y(), 43, "test 8");
+
+ // Test the private fields do not appear as properties before after set to value
+ assert(!Object.prototype.hasOwnProperty.call(c, "#x"), "test 9");
+ assert(!Object.prototype.hasOwnProperty.call(c, "#y"), "test 10");
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-field-identifier-initializer.js b/js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-field-identifier-initializer.js
new file mode 100644
index 0000000000..ea1128fafb
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-field-identifier-initializer.js
@@ -0,0 +1,99 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-field-identifier-initializer.case
+// - src/class-elements/productions/cls-decl-after-same-line-async-method.template
+/*---
+description: Valid FieldDefinition (field definitions after an async method in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-public, class, async-functions]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+
+ PropertyName :
+ LiteralPropertyName
+ ComputedPropertyName
+
+ LiteralPropertyName :
+ IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ async m() { return 42; } $ = 1; _ = 1; \u{6F} = 1; \u2118 = 1; ZW_\u200C_NJ = 1; ZW_\u200D_J = 1;
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+c.m().then(function(v) {
+ assert.sameValue(v, 42);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(c.$, 1);
+ assert.sameValue(c._, 1);
+ assert.sameValue(c.\u{6F}, 1);
+ assert.sameValue(c.\u2118, 1);
+ assert.sameValue(c.ZW_\u200C_NJ, 1);
+ assert.sameValue(c.ZW_\u200D_J, 1);
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-field-identifier.js b/js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-field-identifier.js
new file mode 100644
index 0000000000..5846d564c5
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-field-identifier.js
@@ -0,0 +1,106 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-field-identifier.case
+// - src/class-elements/productions/cls-decl-after-same-line-async-method.template
+/*---
+description: Valid FieldDefinition (field definitions after an async method in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-public, class, async-functions]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+
+ PropertyName :
+ LiteralPropertyName
+ ComputedPropertyName
+
+ LiteralPropertyName :
+ IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ async m() { return 42; } $; _; \u{6F}; \u2118; ZW_\u200C_NJ; ZW_\u200D_J;
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+c.m().then(function(v) {
+ assert.sameValue(v, 42);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ c.$ = 1;
+ c._ = 1;
+ c.\u{6F} = 1;
+ c.\u2118 = 1;
+ c.ZW_\u200C_NJ = 1;
+ c.ZW_\u200D_J = 1;
+
+ assert.sameValue(c.$, 1);
+ assert.sameValue(c._, 1);
+ assert.sameValue(c.\u{6F}, 1);
+ assert.sameValue(c.\u2118, 1);
+ assert.sameValue(c.ZW_\u200C_NJ, 1);
+ assert.sameValue(c.ZW_\u200D_J, 1);
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-private-getter-alt.js b/js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-private-getter-alt.js
new file mode 100644
index 0000000000..4054d76491
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-private-getter-alt.js
@@ -0,0 +1,140 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-getter-alt.case
+// - src/class-elements/productions/cls-decl-after-same-line-async-method.template
+/*---
+description: Valid PrivateName as private getter (field definitions after an async method in the same line)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public, async-functions]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ...
+ get ClassElementName ( ){ FunctionBody }
+ ...
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ async m() { return 42; } #$_; #__; #\u{6F}_; #℘_; #ZW_‌_NJ_; #ZW_‍_J_;
+ get #$() {
+ return this.#$_;
+ }
+ get #_() {
+ return this.#__;
+ }
+ get #\u{6F}() {
+ return this.#\u{6F}_;
+ }
+ get #℘() {
+ return this.#℘_;
+ }
+ get #ZW_‌_NJ() {
+ return this.#ZW_‌_NJ_;
+ }
+ get #ZW_‍_J() {
+ return this.#ZW_‍_J_;
+ }
+;
+ $(value) {
+ this.#$_ = value;
+ return this.#$;
+ }
+ _(value) {
+ this.#__ = value;
+ return this.#_;
+ }
+ \u{6F}(value) {
+ this.#\u{6F}_ = value;
+ return this.#\u{6F};
+ }
+ ℘(value) {
+ this.#℘_ = value;
+ return this.#℘;
+ }
+ ZW_‌_NJ(value) {
+ this.#ZW_‌_NJ_ = value;
+ return this.#ZW_‌_NJ;
+ }
+ ZW_‍_J(value) {
+ this.#ZW_‍_J_ = value;
+ return this.#ZW_‍_J;
+ }
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+c.m().then(function(v) {
+ assert.sameValue(v, 42);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(c.$(1), 1);
+ assert.sameValue(c._(1), 1);
+ assert.sameValue(c.\u{6F}(1), 1);
+ assert.sameValue(c.℘(1), 1);
+ assert.sameValue(c.ZW_‌_NJ(1), 1);
+ assert.sameValue(c.ZW_‍_J(1), 1);
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-private-getter.js b/js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-private-getter.js
new file mode 100644
index 0000000000..993a5984e9
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-private-getter.js
@@ -0,0 +1,140 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-getter.case
+// - src/class-elements/productions/cls-decl-after-same-line-async-method.template
+/*---
+description: Valid PrivateName as private getter (field definitions after an async method in the same line)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public, async-functions]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ...
+ get ClassElementName ( ){ FunctionBody }
+ ...
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ async m() { return 42; } #$_; #__; #\u{6F}_; #\u2118_; #ZW_\u200C_NJ_; #ZW_\u200D_J_;
+ get #$() {
+ return this.#$_;
+ }
+ get #_() {
+ return this.#__;
+ }
+ get #\u{6F}() {
+ return this.#\u{6F}_;
+ }
+ get #\u2118() {
+ return this.#\u2118_;
+ }
+ get #ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ_;
+ }
+ get #ZW_\u200D_J() {
+ return this.#ZW_\u200D_J_;
+ }
+;
+ $(value) {
+ this.#$_ = value;
+ return this.#$;
+ }
+ _(value) {
+ this.#__ = value;
+ return this.#_;
+ }
+ \u{6F}(value) {
+ this.#\u{6F}_ = value;
+ return this.#\u{6F};
+ }
+ \u2118(value) {
+ this.#\u2118_ = value;
+ return this.#\u2118;
+ }
+ ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ_ = value;
+ return this.#ZW_\u200C_NJ;
+ }
+ ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J_ = value;
+ return this.#ZW_\u200D_J;
+ }
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+c.m().then(function(v) {
+ assert.sameValue(v, 42);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(c.$(1), 1);
+ assert.sameValue(c._(1), 1);
+ assert.sameValue(c.\u{6F}(1), 1);
+ assert.sameValue(c.\u2118(1), 1);
+ assert.sameValue(c.ZW_\u200C_NJ(1), 1);
+ assert.sameValue(c.ZW_\u200D_J(1), 1);
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-private-method-alt.js b/js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-private-method-alt.js
new file mode 100644
index 0000000000..dc90a7d4a1
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-private-method-alt.js
@@ -0,0 +1,139 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-method-alt.case
+// - src/class-elements/productions/cls-decl-after-same-line-async-method.template
+/*---
+description: Valid PrivateName as private method (field definitions after an async method in the same line)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public, async-functions]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ClassElementName ( UniqueFormalParameters ) { FunctionBody }
+ ...
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ async m() { return 42; } #$_; #__; #\u{6F}_; #℘_; #ZW_‌_NJ_; #ZW_‍_J_;
+ #$() {
+ return this.#$_;
+ }
+ #_() {
+ return this.#__;
+ }
+ #\u{6F}() {
+ return this.#\u{6F}_;
+ }
+ #℘() {
+ return this.#℘_;
+ }
+ #ZW_‌_NJ() {
+ return this.#ZW_‌_NJ_;
+ }
+ #ZW_‍_J() {
+ return this.#ZW_‍_J_;
+ }
+;
+ $(value) {
+ this.#$_ = value;
+ return this.#$();
+ }
+ _(value) {
+ this.#__ = value;
+ return this.#_();
+ }
+ \u{6F}(value) {
+ this.#\u{6F}_ = value;
+ return this.#\u{6F}();
+ }
+ ℘(value) {
+ this.#℘_ = value;
+ return this.#℘();
+ }
+ ZW_‌_NJ(value) {
+ this.#ZW_‌_NJ_ = value;
+ return this.#ZW_‌_NJ();
+ }
+ ZW_‍_J(value) {
+ this.#ZW_‍_J_ = value;
+ return this.#ZW_‍_J();
+ }
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+c.m().then(function(v) {
+ assert.sameValue(v, 42);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(c.$(1), 1);
+ assert.sameValue(c._(1), 1);
+ assert.sameValue(c.\u{6F}(1), 1);
+ assert.sameValue(c.℘(1), 1);
+ assert.sameValue(c.ZW_‌_NJ(1), 1);
+ assert.sameValue(c.ZW_‍_J(1), 1);
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-private-method.js b/js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-private-method.js
new file mode 100644
index 0000000000..c385f47f7c
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-private-method.js
@@ -0,0 +1,139 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-method.case
+// - src/class-elements/productions/cls-decl-after-same-line-async-method.template
+/*---
+description: Valid PrivateName as private method (field definitions after an async method in the same line)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public, async-functions]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ClassElementName ( UniqueFormalParameters ) { FunctionBody }
+ ...
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ async m() { return 42; } #$_; #__; #\u{6F}_; #\u2118_; #ZW_\u200C_NJ_; #ZW_\u200D_J_;
+ #$() {
+ return this.#$_;
+ }
+ #_() {
+ return this.#__;
+ }
+ #\u{6F}() {
+ return this.#\u{6F}_;
+ }
+ #\u2118() {
+ return this.#\u2118_;
+ }
+ #ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ_;
+ }
+ #ZW_\u200D_J() {
+ return this.#ZW_\u200D_J_;
+ }
+;
+ $(value) {
+ this.#$_ = value;
+ return this.#$();
+ }
+ _(value) {
+ this.#__ = value;
+ return this.#_();
+ }
+ \u{6F}(value) {
+ this.#\u{6F}_ = value;
+ return this.#\u{6F}();
+ }
+ \u2118(value) {
+ this.#\u2118_ = value;
+ return this.#\u2118();
+ }
+ ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ_ = value;
+ return this.#ZW_\u200C_NJ();
+ }
+ ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J_ = value;
+ return this.#ZW_\u200D_J();
+ }
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+c.m().then(function(v) {
+ assert.sameValue(v, 42);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(c.$(1), 1);
+ assert.sameValue(c._(1), 1);
+ assert.sameValue(c.\u{6F}(1), 1);
+ assert.sameValue(c.\u2118(1), 1);
+ assert.sameValue(c.ZW_\u200C_NJ(1), 1);
+ assert.sameValue(c.ZW_\u200D_J(1), 1);
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-private-setter-alt.js b/js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-private-setter-alt.js
new file mode 100644
index 0000000000..a832fc5cd3
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-private-setter-alt.js
@@ -0,0 +1,139 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-setter-alt.case
+// - src/class-elements/productions/cls-decl-after-same-line-async-method.template
+/*---
+description: Valid PrivateName as private setter (field definitions after an async method in the same line)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public, async-functions]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ...
+ set ClassElementName ( PropertySetParameterList ) { FunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ async m() { return 42; } #$_; #__; #\u{6F}_; #℘_; #ZW_‌_NJ_; #ZW_‍_J_;
+ set #$(value) {
+ this.#$_ = value;
+ }
+ set #_(value) {
+ this.#__ = value;
+ }
+ set #\u{6F}(value) {
+ this.#\u{6F}_ = value;
+ }
+ set #℘(value) {
+ this.#℘_ = value;
+ }
+ set #ZW_‌_NJ(value) {
+ this.#ZW_‌_NJ_ = value;
+ }
+ set #ZW_‍_J(value) {
+ this.#ZW_‍_J_ = value;
+ }
+;
+ $(value) {
+ this.#$ = value;
+ return this.#$_;
+ }
+ _(value) {
+ this.#_ = value;
+ return this.#__;
+ }
+ \u{6F}(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F}_;
+ }
+ ℘(value) {
+ this.#℘ = value;
+ return this.#℘_;
+ }
+ ZW_‌_NJ(value) {
+ this.#ZW_‌_NJ = value;
+ return this.#ZW_‌_NJ_;
+ }
+ ZW_‍_J(value) {
+ this.#ZW_‍_J = value;
+ return this.#ZW_‍_J_;
+ }
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+c.m().then(function(v) {
+ assert.sameValue(v, 42);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(c.$(1), 1);
+ assert.sameValue(c._(1), 1);
+ assert.sameValue(c.\u{6F}(1), 1);
+ assert.sameValue(c.℘(1), 1);
+ assert.sameValue(c.ZW_‌_NJ(1), 1);
+ assert.sameValue(c.ZW_‍_J(1), 1);
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-private-setter.js b/js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-private-setter.js
new file mode 100644
index 0000000000..d6915b0c31
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-private-setter.js
@@ -0,0 +1,139 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-setter.case
+// - src/class-elements/productions/cls-decl-after-same-line-async-method.template
+/*---
+description: Valid PrivateName as private setter (field definitions after an async method in the same line)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public, async-functions]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ...
+ set ClassElementName ( PropertySetParameterList ) { FunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ async m() { return 42; } #$_; #__; #\u{6F}_; #\u2118_; #ZW_\u200C_NJ_; #ZW_\u200D_J_;
+ set #$(value) {
+ this.#$_ = value;
+ }
+ set #_(value) {
+ this.#__ = value;
+ }
+ set #\u{6F}(value) {
+ this.#\u{6F}_ = value;
+ }
+ set #\u2118(value) {
+ this.#\u2118_ = value;
+ }
+ set #ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ_ = value;
+ }
+ set #ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J_ = value;
+ }
+;
+ $(value) {
+ this.#$ = value;
+ return this.#$_;
+ }
+ _(value) {
+ this.#_ = value;
+ return this.#__;
+ }
+ \u{6F}(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F}_;
+ }
+ \u2118(value) {
+ this.#\u2118 = value;
+ return this.#\u2118_;
+ }
+ ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ = value;
+ return this.#ZW_\u200C_NJ_;
+ }
+ ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J = value;
+ return this.#ZW_\u200D_J_;
+ }
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+c.m().then(function(v) {
+ assert.sameValue(v, 42);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(c.$(1), 1);
+ assert.sameValue(c._(1), 1);
+ assert.sameValue(c.\u{6F}(1), 1);
+ assert.sameValue(c.\u2118(1), 1);
+ assert.sameValue(c.ZW_\u200C_NJ(1), 1);
+ assert.sameValue(c.ZW_\u200D_J(1), 1);
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-privatename-identifier-alt.js
new file mode 100644
index 0000000000..598efcb28a
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-privatename-identifier-alt.js
@@ -0,0 +1,121 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-after-same-line-async-method.template
+/*---
+description: Valid PrivateName (field definitions after an async method in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public, async-functions]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ async m() { return 42; } #$; #_; #\u{6F}; #℘; #ZW_‌_NJ; #ZW_‍_J;
+ $(value) {
+ this.#$ = value;
+ return this.#$;
+ }
+ _(value) {
+ this.#_ = value;
+ return this.#_;
+ }
+ \u{6F}(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F};
+ }
+ ℘(value) {
+ this.#℘ = value;
+ return this.#℘;
+ }
+ ZW_‌_NJ(value) {
+ this.#ZW_‌_NJ = value;
+ return this.#ZW_‌_NJ;
+ }
+ ZW_‍_J(value) {
+ this.#ZW_‍_J = value;
+ return this.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+c.m().then(function(v) {
+ assert.sameValue(v, 42);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(c.$(1), 1);
+ assert.sameValue(c._(1), 1);
+ assert.sameValue(c.\u{6F}(1), 1);
+ assert.sameValue(c.℘(1), 1);
+ assert.sameValue(c.ZW_‌_NJ(1), 1);
+ assert.sameValue(c.ZW_‍_J(1), 1);
+
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-privatename-identifier-initializer-alt.js b/js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-privatename-identifier-initializer-alt.js
new file mode 100644
index 0000000000..31760905fa
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-privatename-identifier-initializer-alt.js
@@ -0,0 +1,115 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-privatename-identifier-initializer-alt.case
+// - src/class-elements/productions/cls-decl-after-same-line-async-method.template
+/*---
+description: Valid PrivateName (field definitions after an async method in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public, async-functions]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ async m() { return 42; } #$ = 1; #_ = 1; #\u{6F} = 1; #℘ = 1; #ZW_‌_NJ = 1; #ZW_‍_J = 1;
+ $() {
+ return this.#$;
+ }
+ _() {
+ return this.#_;
+ }
+ \u{6F}() {
+ return this.#\u{6F};
+ }
+ ℘() {
+ return this.#℘;
+ }
+ ZW_‌_NJ() {
+ return this.#ZW_‌_NJ;
+ }
+ ZW_‍_J() {
+ return this.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+c.m().then(function(v) {
+ assert.sameValue(v, 42);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(c.$(), 1);
+ assert.sameValue(c._(), 1);
+ assert.sameValue(c.\u{6F}(), 1);
+ assert.sameValue(c.℘(), 1);
+ assert.sameValue(c.ZW_‌_NJ(), 1);
+ assert.sameValue(c.ZW_‍_J(), 1);
+
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-privatename-identifier-initializer.js b/js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-privatename-identifier-initializer.js
new file mode 100644
index 0000000000..3de36353e8
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-privatename-identifier-initializer.js
@@ -0,0 +1,115 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-privatename-identifier-initializer.case
+// - src/class-elements/productions/cls-decl-after-same-line-async-method.template
+/*---
+description: Valid PrivateName (field definitions after an async method in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public, async-functions]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ async m() { return 42; } #$ = 1; #_ = 1; #\u{6F} = 1; #\u2118 = 1; #ZW_\u200C_NJ = 1; #ZW_\u200D_J = 1;
+ $() {
+ return this.#$;
+ }
+ _() {
+ return this.#_;
+ }
+ \u{6F}() {
+ return this.#\u{6F};
+ }
+ \u2118() {
+ return this.#\u2118;
+ }
+ ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ;
+ }
+ ZW_\u200D_J() {
+ return this.#ZW_\u200D_J;
+ }
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+c.m().then(function(v) {
+ assert.sameValue(v, 42);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(c.$(), 1);
+ assert.sameValue(c._(), 1);
+ assert.sameValue(c.\u{6F}(), 1);
+ assert.sameValue(c.\u2118(), 1);
+ assert.sameValue(c.ZW_\u200C_NJ(), 1);
+ assert.sameValue(c.ZW_\u200D_J(), 1);
+
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-privatename-identifier.js
new file mode 100644
index 0000000000..f76b713628
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-privatename-identifier.js
@@ -0,0 +1,121 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-after-same-line-async-method.template
+/*---
+description: Valid PrivateName (field definitions after an async method in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public, async-functions]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ async m() { return 42; } #$; #_; #\u{6F}; #\u2118; #ZW_\u200C_NJ; #ZW_\u200D_J;
+ $(value) {
+ this.#$ = value;
+ return this.#$;
+ }
+ _(value) {
+ this.#_ = value;
+ return this.#_;
+ }
+ \u{6F}(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F};
+ }
+ \u2118(value) {
+ this.#\u2118 = value;
+ return this.#\u2118;
+ }
+ ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ = value;
+ return this.#ZW_\u200C_NJ;
+ }
+ ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J = value;
+ return this.#ZW_\u200D_J;
+ }
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+c.m().then(function(v) {
+ assert.sameValue(v, 42);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(c.$(1), 1);
+ assert.sameValue(c._(1), 1);
+ assert.sameValue(c.\u{6F}(1), 1);
+ assert.sameValue(c.\u2118(1), 1);
+ assert.sameValue(c.ZW_\u200C_NJ(1), 1);
+ assert.sameValue(c.ZW_\u200D_J(1), 1);
+
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-static-async-generator-method-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-static-async-generator-method-privatename-identifier-alt.js
new file mode 100644
index 0000000000..27f480eabb
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-static-async-generator-method-privatename-identifier-alt.js
@@ -0,0 +1,147 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-async-generator-method-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-after-same-line-async-method.template
+/*---
+description: Valid Static AsyncGeneratorMethod PrivateName (field definitions after an async method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public, async-functions]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ async m() { return 42; } static async * #$(value) {
+ yield * await value;
+ }
+ static async * #_(value) {
+ yield * await value;
+ }
+ static async * #o(value) {
+ yield * await value;
+ }
+ static async * #℘(value) {
+ yield * await value;
+ }
+ static async * #ZW_‌_NJ(value) {
+ yield * await value;
+ }
+ static async * #ZW_‍_J(value) {
+ yield * await value;
+ };
+ static get $() {
+ return this.#$;
+ }
+ static get _() {
+ return this.#_;
+ }
+ static get o() {
+ return this.#o;
+ }
+ static get ℘() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#℘;
+ }
+ static get ZW_‌_NJ() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‌_NJ;
+ }
+ static get ZW_‍_J() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‍_J;
+ }
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+c.m().then(function(v) {
+ assert.sameValue(v, 42);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ Promise.all([
+ C.$([1]).next(),
+ C._([1]).next(),
+ C.o([1]).next(),
+ C.℘([1]).next(), // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.ZW_‌_NJ([1]).next(), // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.ZW_‍_J([1]).next(), // DO NOT CHANGE THE NAME OF THIS FIELD
+ ]).then(results => {
+
+ assert.sameValue(results[0].value, 1);
+ assert.sameValue(results[1].value, 1);
+ assert.sameValue(results[2].value, 1);
+ assert.sameValue(results[3].value, 1);
+ assert.sameValue(results[4].value, 1);
+ assert.sameValue(results[5].value, 1);
+
+ }).then($DONE, $DONE);
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-static-async-generator-method-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-static-async-generator-method-privatename-identifier.js
new file mode 100644
index 0000000000..1c319cbca0
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-static-async-generator-method-privatename-identifier.js
@@ -0,0 +1,148 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-async-generator-method-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-after-same-line-async-method.template
+/*---
+description: Valid Static AsyncGeneratorMethod PrivateName (field definitions after an async method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public, async-functions]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ async m() { return 42; } static async * #$(value) {
+ yield * await value;
+ }
+ static async * #_(value) {
+ yield * await value;
+ }
+ static async * #\u{6F}(value) {
+ yield * await value;
+ }
+ static async * #\u2118(value) {
+ yield * await value;
+ }
+ static async * #ZW_\u200C_NJ(value) {
+ yield * await value;
+ }
+ static async * #ZW_\u200D_J(value) {
+ yield * await value;
+ };
+ static get $() {
+ return this.#$;
+ }
+ static get _() {
+ return this.#_;
+ }
+ static get \u{6F}() {
+ return this.#\u{6F};
+ }
+ static get \u2118() {
+ return this.#\u2118;
+ }
+ static get ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ;
+ }
+ static get ZW_\u200D_J() {
+ return this.#ZW_\u200D_J;
+ }
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+c.m().then(function(v) {
+ assert.sameValue(v, 42);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ Promise.all([
+ C.$([1]).next(),
+ C._([1]).next(),
+ C.\u{6F}([1]).next(),
+ C.\u2118([1]).next(),
+ C.ZW_\u200C_NJ([1]).next(),
+ C.ZW_\u200D_J([1]).next(),
+ ]).then(results => {
+
+ assert.sameValue(results[0].value, 1);
+ assert.sameValue(results[1].value, 1);
+ assert.sameValue(results[2].value, 1);
+ assert.sameValue(results[3].value, 1);
+ assert.sameValue(results[4].value, 1);
+ assert.sameValue(results[5].value, 1);
+
+ }).then($DONE, $DONE);
+
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-static-async-method-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-static-async-method-privatename-identifier-alt.js
new file mode 100644
index 0000000000..b7b7784982
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-static-async-method-privatename-identifier-alt.js
@@ -0,0 +1,147 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-async-method-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-after-same-line-async-method.template
+/*---
+description: Valid Static AsyncMethod PrivateName (field definitions after an async method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public, async-functions]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ AsyncMethod
+
+ AsyncMethod :
+ async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ async m() { return 42; } static async #$(value) {
+ return await value;
+ }
+ static async #_(value) {
+ return await value;
+ }
+ static async #o(value) {
+ return await value;
+ }
+ static async #℘(value) {
+ return await value;
+ }
+ static async #ZW_‌_NJ(value) {
+ return await value;
+ }
+ static async #ZW_‍_J(value) {
+ return await value;
+ };
+ static async $(value) {
+ return await this.#$(value);
+ }
+ static async _(value) {
+ return await this.#_(value);
+ }
+ static async o(value) {
+ return await this.#o(value);
+ }
+ static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return await this.#℘(value);
+ }
+ static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return await this.#ZW_‌_NJ(value);
+ }
+ static async ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return await this.#ZW_‍_J(value);
+ }
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+c.m().then(function(v) {
+ assert.sameValue(v, 42);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ Promise.all([
+ C.$(1),
+ C._(1),
+ C.o(1),
+ C.℘(1), // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.ZW_‌_NJ(1), // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.ZW_‍_J(1), // DO NOT CHANGE THE NAME OF THIS FIELD
+ ]).then(results => {
+
+ assert.sameValue(results[0], 1);
+ assert.sameValue(results[1], 1);
+ assert.sameValue(results[2], 1);
+ assert.sameValue(results[3], 1);
+ assert.sameValue(results[4], 1);
+ assert.sameValue(results[5], 1);
+
+ }).then($DONE, $DONE);
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-static-async-method-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-static-async-method-privatename-identifier.js
new file mode 100644
index 0000000000..e960409e25
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-static-async-method-privatename-identifier.js
@@ -0,0 +1,148 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-async-method-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-after-same-line-async-method.template
+/*---
+description: Valid Static AsyncMethod PrivateName (field definitions after an async method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public, async-functions]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ AsyncMethod
+
+ AsyncMethod :
+ async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ async m() { return 42; } static async #$(value) {
+ return await value;
+ }
+ static async #_(value) {
+ return await value;
+ }
+ static async #\u{6F}(value) {
+ return await value;
+ }
+ static async #\u2118(value) {
+ return await value;
+ }
+ static async #ZW_\u200C_NJ(value) {
+ return await value;
+ }
+ static async #ZW_\u200D_J(value) {
+ return await value;
+ };
+ static async $(value) {
+ return await this.#$(value);
+ }
+ static async _(value) {
+ return await this.#_(value);
+ }
+ static async \u{6F}(value) {
+ return await this.#\u{6F}(value);
+ }
+ static async \u2118(value) {
+ return await this.#\u2118(value);
+ }
+ static async ZW_\u200C_NJ(value) {
+ return await this.#ZW_\u200C_NJ(value);
+ }
+ static async ZW_\u200D_J(value) {
+ return await this.#ZW_\u200D_J(value);
+ }
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+c.m().then(function(v) {
+ assert.sameValue(v, 42);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ Promise.all([
+ C.$(1),
+ C._(1),
+ C.\u{6F}(1),
+ C.\u2118(1),
+ C.ZW_\u200C_NJ(1),
+ C.ZW_\u200D_J(1),
+ ]).then(results => {
+
+ assert.sameValue(results[0], 1);
+ assert.sameValue(results[1], 1);
+ assert.sameValue(results[2], 1);
+ assert.sameValue(results[3], 1);
+ assert.sameValue(results[4], 1);
+ assert.sameValue(results[5], 1);
+
+ }).then($DONE, $DONE);
+
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-static-generator-method-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-static-generator-method-privatename-identifier-alt.js
new file mode 100644
index 0000000000..cf980b1e01
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-static-generator-method-privatename-identifier-alt.js
@@ -0,0 +1,136 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-generator-method-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-after-same-line-async-method.template
+/*---
+description: Valid Static GeneratorMethod PrivateName (field definitions after an async method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public, async-functions]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ GeneratorMethod
+
+ GeneratorMethod :
+ * ClassElementName ( UniqueFormalParameters ){ GeneratorBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ async m() { return 42; } static * #$(value) {
+ yield * value;
+ }
+ static * #_(value) {
+ yield * value;
+ }
+ static * #o(value) {
+ yield * value;
+ }
+ static * #℘(value) {
+ yield * value;
+ }
+ static * #ZW_‌_NJ(value) {
+ yield * value;
+ }
+ static * #ZW_‍_J(value) {
+ yield * value;
+ };
+ static get $() {
+ return this.#$;
+ }
+ static get _() {
+ return this.#_;
+ }
+ static get o() {
+ return this.#o;
+ }
+ static get ℘() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#℘;
+ }
+ static get ZW_‌_NJ() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‌_NJ;
+ }
+ static get ZW_‍_J() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‍_J;
+ }
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+c.m().then(function(v) {
+ assert.sameValue(v, 42);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(C.$([1]).next().value, 1);
+ assert.sameValue(C._([1]).next().value, 1);
+ assert.sameValue(C.o([1]).next().value, 1);
+ assert.sameValue(C.℘([1]).next().value, 1);
+ assert.sameValue(C.ZW_‌_NJ([1]).next().value, 1);
+ assert.sameValue(C.ZW_‍_J([1]).next().value, 1);
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-static-generator-method-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-static-generator-method-privatename-identifier.js
new file mode 100644
index 0000000000..1ec439eb20
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-static-generator-method-privatename-identifier.js
@@ -0,0 +1,137 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-generator-method-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-after-same-line-async-method.template
+/*---
+description: Valid Static GeneratorMethod PrivateName (field definitions after an async method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public, async-functions]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ GeneratorMethod
+
+ GeneratorMethod :
+ * ClassElementName ( UniqueFormalParameters ){ GeneratorBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ async m() { return 42; } static * #$(value) {
+ yield * value;
+ }
+ static * #_(value) {
+ yield * value;
+ }
+ static * #\u{6F}(value) {
+ yield * value;
+ }
+ static * #\u2118(value) {
+ yield * value;
+ }
+ static * #ZW_\u200C_NJ(value) {
+ yield * value;
+ }
+ static * #ZW_\u200D_J(value) {
+ yield * value;
+ };
+ static get $() {
+ return this.#$;
+ }
+ static get _() {
+ return this.#_;
+ }
+ static get \u{6F}() {
+ return this.#\u{6F};
+ }
+ static get \u2118() {
+ return this.#\u2118;
+ }
+ static get ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ;
+ }
+ static get ZW_\u200D_J() {
+ return this.#ZW_\u200D_J;
+ }
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+c.m().then(function(v) {
+ assert.sameValue(v, 42);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(C.$([1]).next().value, 1);
+ assert.sameValue(C._([1]).next().value, 1);
+ assert.sameValue(C.\u{6F}([1]).next().value, 1);
+ assert.sameValue(C.\u2118([1]).next().value, 1);
+ assert.sameValue(C.ZW_\u200C_NJ([1]).next().value, 1);
+ assert.sameValue(C.ZW_\u200D_J([1]).next().value, 1);
+
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-static-method-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-static-method-privatename-identifier-alt.js
new file mode 100644
index 0000000000..a170bf16ce
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-static-method-privatename-identifier-alt.js
@@ -0,0 +1,134 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-method-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-after-same-line-async-method.template
+/*---
+description: Valid Static Method PrivateName (field definitions after an async method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public, async-functions]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ ClassElementName ( UniqueFormalParameters ){ FunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ async m() { return 42; } static #$(value) {
+ return value;
+ }
+ static #_(value) {
+ return value;
+ }
+ static #o(value) {
+ return value;
+ }
+ static #℘(value) {
+ return value;
+ }
+ static #ZW_‌_NJ(value) {
+ return value;
+ }
+ static #ZW_‍_J(value) {
+ return value;
+ };
+ static $(value) {
+ return this.#$(value);
+ }
+ static _(value) {
+ return this.#_(value);
+ }
+ static o(value) {
+ return this.#o(value);
+ }
+ static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#℘(value);
+ }
+ static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‌_NJ(value);
+ }
+ static ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‍_J(value);
+ }
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+c.m().then(function(v) {
+ assert.sameValue(v, 42);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(C.$(1), 1);
+ assert.sameValue(C._(1), 1);
+ assert.sameValue(C.o(1), 1);
+ assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+ assert.sameValue(C.ZW_‌_NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+ assert.sameValue(C.ZW_‍_J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-static-method-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-static-method-privatename-identifier.js
new file mode 100644
index 0000000000..fa4edb8610
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-static-method-privatename-identifier.js
@@ -0,0 +1,134 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-method-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-after-same-line-async-method.template
+/*---
+description: Valid Static Method PrivateName (field definitions after an async method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public, async-functions]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ ClassElementName ( UniqueFormalParameters ){ FunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ async m() { return 42; } static #$(value) {
+ return value;
+ }
+ static #_(value) {
+ return value;
+ }
+ static #\u{6F}(value) {
+ return value;
+ }
+ static #\u2118(value) {
+ return value;
+ }
+ static #ZW_\u200C_NJ(value) {
+ return value;
+ }
+ static #ZW_\u200D_J(value) {
+ return value;
+ };
+ static $(value) {
+ return this.#$(value);
+ }
+ static _(value) {
+ return this.#_(value);
+ }
+ static \u{6F}(value) {
+ return this.#\u{6F}(value);
+ }
+ static \u2118(value) {
+ return this.#\u2118(value);
+ }
+ static ZW_\u200C_NJ(value) {
+ return this.#ZW_\u200C_NJ(value);
+ }
+ static ZW_\u200D_J(value) {
+ return this.#ZW_\u200D_J(value);
+ }
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+c.m().then(function(v) {
+ assert.sameValue(v, 42);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(C.$(1), 1);
+ assert.sameValue(C._(1), 1);
+ assert.sameValue(C.\u{6F}(1), 1);
+ assert.sameValue(C.\u2118(1), 1);
+ assert.sameValue(C.ZW_\u200C_NJ(1), 1);
+ assert.sameValue(C.ZW_\u200D_J(1), 1);
+
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-static-privatename-identifier-alt-by-classname.js b/js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-static-privatename-identifier-alt-by-classname.js
new file mode 100644
index 0000000000..dc5ef17df1
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-static-privatename-identifier-alt-by-classname.js
@@ -0,0 +1,122 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-alt-by-classname.case
+// - src/class-elements/productions/cls-decl-after-same-line-async-method.template
+/*---
+description: Valid Static PrivateName (field definitions after an async method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public, async-functions]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ async m() { return 42; } static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_‍_J;
+ static $(value) {
+ C.#$ = value;
+ return C.#$;
+ }
+ static _(value) {
+ C.#_ = value;
+ return C.#_;
+ }
+ static o(value) {
+ C.#\u{6F} = value;
+ return C.#\u{6F};
+ }
+ static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.#℘ = value;
+ return C.#℘;
+ }
+ static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.#ZW_‌_NJ = value;
+ return C.#ZW_‌_NJ;
+ }
+ static ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.#ZW_‍_J = value;
+ return C.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+c.m().then(function(v) {
+ assert.sameValue(v, 42);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(C.$(1), 1);
+ assert.sameValue(C._(1), 1);
+ assert.sameValue(C.o(1), 1);
+ assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+ assert.sameValue(C.ZW_‌_NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+ assert.sameValue(C.ZW_‍_J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-static-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-static-privatename-identifier-alt.js
new file mode 100644
index 0000000000..a1b13ded29
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-static-privatename-identifier-alt.js
@@ -0,0 +1,122 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-after-same-line-async-method.template
+/*---
+description: Valid Static PrivateName (field definitions after an async method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public, async-functions]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ async m() { return 42; } static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_‍_J;
+ static $(value) {
+ this.#$ = value;
+ return this.#$;
+ }
+ static _(value) {
+ this.#_ = value;
+ return this.#_;
+ }
+ static o(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F};
+ }
+ static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ this.#℘ = value;
+ return this.#℘;
+ }
+ static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ this.#ZW_‌_NJ = value;
+ return this.#ZW_‌_NJ;
+ }
+ static ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ this.#ZW_‍_J = value;
+ return this.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+c.m().then(function(v) {
+ assert.sameValue(v, 42);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(C.$(1), 1);
+ assert.sameValue(C._(1), 1);
+ assert.sameValue(C.o(1), 1);
+ assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+ assert.sameValue(C.ZW_‌_NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+ assert.sameValue(C.ZW_‍_J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-static-privatename-identifier-by-classname.js b/js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-static-privatename-identifier-by-classname.js
new file mode 100644
index 0000000000..82513e2be7
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-static-privatename-identifier-by-classname.js
@@ -0,0 +1,122 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-by-classname.case
+// - src/class-elements/productions/cls-decl-after-same-line-async-method.template
+/*---
+description: Valid Static PrivateName (field definitions after an async method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public, async-functions]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ async m() { return 42; } static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J;
+ static $(value) {
+ C.#$ = value;
+ return C.#$;
+ }
+ static _(value) {
+ C.#_ = value;
+ return C.#_;
+ }
+ static \u{6F}(value) {
+ C.#\u{6F} = value;
+ return C.#\u{6F};
+ }
+ static \u2118(value) {
+ C.#\u2118 = value;
+ return C.#\u2118;
+ }
+ static ZW_\u200C_NJ(value) {
+ C.#ZW_\u200C_NJ = value;
+ return C.#ZW_\u200C_NJ;
+ }
+ static ZW_\u200D_J(value) {
+ C.#ZW_\u200D_J = value;
+ return C.#ZW_\u200D_J;
+ }
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+c.m().then(function(v) {
+ assert.sameValue(v, 42);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(C.$(1), 1);
+ assert.sameValue(C._(1), 1);
+ assert.sameValue(C.\u{6F}(1), 1);
+ assert.sameValue(C.\u2118(1), 1);
+ assert.sameValue(C.ZW_\u200C_NJ(1), 1);
+ assert.sameValue(C.ZW_\u200D_J(1), 1);
+
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-static-privatename-identifier-initializer-alt-by-classname.js b/js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-static-privatename-identifier-initializer-alt-by-classname.js
new file mode 100644
index 0000000000..046f6161b5
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-static-privatename-identifier-initializer-alt-by-classname.js
@@ -0,0 +1,116 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-initializer-alt-by-classname.case
+// - src/class-elements/productions/cls-decl-after-same-line-async-method.template
+/*---
+description: Valid Static PrivateName (field definitions after an async method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public, async-functions]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ async m() { return 42; } static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_‍_J = 1;
+ static $() {
+ return C.#$;
+ }
+ static _() {
+ return C.#_;
+ }
+ static \u{6F}() {
+ return C.#\u{6F};
+ }
+ static ℘() {
+ return C.#℘;
+ }
+ static ZW_‌_NJ() {
+ return C.#ZW_‌_NJ;
+ }
+ static ZW_‍_J() {
+ return C.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+c.m().then(function(v) {
+ assert.sameValue(v, 42);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(C.$(), 1);
+ assert.sameValue(C._(), 1);
+ assert.sameValue(C.\u{6F}(), 1);
+ assert.sameValue(C.℘(), 1);
+ assert.sameValue(C.ZW_‌_NJ(), 1);
+ assert.sameValue(C.ZW_‍_J(), 1);
+
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-static-privatename-identifier-initializer-alt.js b/js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-static-privatename-identifier-initializer-alt.js
new file mode 100644
index 0000000000..741d42cf4f
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-static-privatename-identifier-initializer-alt.js
@@ -0,0 +1,116 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-initializer-alt.case
+// - src/class-elements/productions/cls-decl-after-same-line-async-method.template
+/*---
+description: Valid Static PrivateName (field definitions after an async method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public, async-functions]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ async m() { return 42; } static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_‍_J = 1;
+ static $() {
+ return this.#$;
+ }
+ static _() {
+ return this.#_;
+ }
+ static \u{6F}() {
+ return this.#\u{6F};
+ }
+ static ℘() {
+ return this.#℘;
+ }
+ static ZW_‌_NJ() {
+ return this.#ZW_‌_NJ;
+ }
+ static ZW_‍_J() {
+ return this.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+c.m().then(function(v) {
+ assert.sameValue(v, 42);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(C.$(), 1);
+ assert.sameValue(C._(), 1);
+ assert.sameValue(C.\u{6F}(), 1);
+ assert.sameValue(C.℘(), 1);
+ assert.sameValue(C.ZW_‌_NJ(), 1);
+ assert.sameValue(C.ZW_‍_J(), 1);
+
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-static-privatename-identifier-initializer.js b/js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-static-privatename-identifier-initializer.js
new file mode 100644
index 0000000000..661d3c7f3e
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-static-privatename-identifier-initializer.js
@@ -0,0 +1,116 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-initializer.case
+// - src/class-elements/productions/cls-decl-after-same-line-async-method.template
+/*---
+description: Valid Static PrivateName (field definitions after an async method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public, async-functions]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ async m() { return 42; } static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #\u2118 = 1; static #ZW_\u200C_NJ = 1; static #ZW_\u200D_J = 1;
+ static $() {
+ return this.#$;
+ }
+ static _() {
+ return this.#_;
+ }
+ static \u{6F}() {
+ return this.#\u{6F};
+ }
+ static \u2118() {
+ return this.#\u2118;
+ }
+ static ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ;
+ }
+ static ZW_\u200D_J() {
+ return this.#ZW_\u200D_J;
+ }
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+c.m().then(function(v) {
+ assert.sameValue(v, 42);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(C.$(), 1);
+ assert.sameValue(C._(), 1);
+ assert.sameValue(C.\u{6F}(), 1);
+ assert.sameValue(C.\u2118(), 1);
+ assert.sameValue(C.ZW_\u200C_NJ(), 1);
+ assert.sameValue(C.ZW_\u200D_J(), 1);
+
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-static-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-static-privatename-identifier.js
new file mode 100644
index 0000000000..8e4d1e4cb4
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-async-method-rs-static-privatename-identifier.js
@@ -0,0 +1,122 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-after-same-line-async-method.template
+/*---
+description: Valid Static PrivateName (field definitions after an async method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public, async-functions]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ async m() { return 42; } static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J;
+ static $(value) {
+ this.#$ = value;
+ return this.#$;
+ }
+ static _(value) {
+ this.#_ = value;
+ return this.#_;
+ }
+ static \u{6F}(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F};
+ }
+ static \u2118(value) {
+ this.#\u2118 = value;
+ return this.#\u2118;
+ }
+ static ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ = value;
+ return this.#ZW_\u200C_NJ;
+ }
+ static ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J = value;
+ return this.#ZW_\u200D_J;
+ }
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+c.m().then(function(v) {
+ assert.sameValue(v, 42);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert.sameValue(C.$(1), 1);
+ assert.sameValue(C._(1), 1);
+ assert.sameValue(C.\u{6F}(1), 1);
+ assert.sameValue(C.\u2118(1), 1);
+ assert.sameValue(C.ZW_\u200C_NJ(1), 1);
+ assert.sameValue(C.ZW_\u200D_J(1), 1);
+
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-async-method-static-private-fields.js b/js/src/tests/test262/language/statements/class/elements/same-line-async-method-static-private-fields.js
new file mode 100644
index 0000000000..6ae1baeb9d
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-async-method-static-private-fields.js
@@ -0,0 +1,83 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/static-private-fields.case
+// - src/class-elements/productions/cls-decl-after-same-line-async-method.template
+/*---
+description: static private fields (field definitions after an async method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public, async-functions]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ static FieldDefinition ;
+
+ FieldDefinition :
+ ClassElementName Initializer_opt
+
+ ClassElementName :
+ PrivateName
+
+ PrivateName :
+ # IdentifierName
+
+---*/
+
+
+class C {
+ async m() { return 42; } static #x; static #y;
+ static x() {
+ this.#x = 42;
+ return this.#x;
+ }
+ static y() {
+ this.#y = 43;
+ return this.#y;
+ }
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+c.m().then(function(v) {
+ assert.sameValue(v, 42);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ // Test the private fields do not appear as properties before set to value
+ assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#x"), "test 1");
+ assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 2");
+ assert(!Object.prototype.hasOwnProperty.call(c, "#x"), "test 3");
+
+ assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#y"), "test 4");
+ assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 5");
+ assert(!Object.prototype.hasOwnProperty.call(c, "#y"), "test 6");
+
+ // Test if private fields can be sucessfully accessed and set to value
+ assert.sameValue(C.x(), 42, "test 7");
+ assert.sameValue(C.y(), 43, "test 8");
+
+ // Test the private fields do not appear as properties before after set to value
+ assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 9");
+ assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 10");
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-async-method-static-private-methods-with-fields.js b/js/src/tests/test262/language/statements/class/elements/same-line-async-method-static-private-methods-with-fields.js
new file mode 100644
index 0000000000..91bd3fbf19
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-async-method-static-private-methods-with-fields.js
@@ -0,0 +1,100 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/static-private-methods-with-fields.case
+// - src/class-elements/productions/cls-decl-after-same-line-async-method.template
+/*---
+description: static private methods with fields (field definitions after an async method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class-static-fields-private, class, class-fields-public, async-functions]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ static FieldDefinition ;
+
+ FieldDefinition :
+ ClassElementName Initializer_opt
+
+ ClassElementName :
+ PrivateName
+
+ PrivateName :
+ # IdentifierName
+
+---*/
+
+
+class C {
+ async m() { return 42; } static #xVal; static #yVal;
+ static #x(value) {
+ this.#xVal = value;
+ return this.#xVal;
+ }
+ static #y(value) {
+ this.#yVal = value;
+ return this.#yVal;
+ }
+ static x() {
+ return this.#x(42);
+ }
+ static y() {
+ return this.#y(43);
+ }
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+c.m().then(function(v) {
+ assert.sameValue(v, 42);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ // Test the private methods do not appear as properties before set to value
+ assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#x"), "test 1");
+ assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 2");
+ assert(!Object.prototype.hasOwnProperty.call(c, "#x"), "test 3");
+
+ assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#y"), "test 4");
+ assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 5");
+ assert(!Object.prototype.hasOwnProperty.call(c, "#y"), "test 6");
+
+ assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#xVal"), "test 7");
+ assert(!Object.prototype.hasOwnProperty.call(C, "#xVal"), "test 8");
+ assert(!Object.prototype.hasOwnProperty.call(c, "#xVal"), "test 9");
+
+ assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#yVal"), "test 10");
+ assert(!Object.prototype.hasOwnProperty.call(C, "#yVal"), "test 11");
+ assert(!Object.prototype.hasOwnProperty.call(c, "#yVal"), "test 12");
+
+ // Test if private fields can be sucessfully accessed and set to value
+ assert.sameValue(C.x(), 42, "test 13");
+ assert.sameValue(C.y(), 43, "test 14");
+
+ // Test the private fields do not appear as properties before after set to value
+ assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 15");
+ assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 16");
+
+ assert(!Object.prototype.hasOwnProperty.call(C, "#xVal"), "test 17");
+ assert(!Object.prototype.hasOwnProperty.call(C, "#yVal"), "test 18");
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-async-method-static-private-methods.js b/js/src/tests/test262/language/statements/class/elements/same-line-async-method-static-private-methods.js
new file mode 100644
index 0000000000..942d52a517
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-async-method-static-private-methods.js
@@ -0,0 +1,87 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/static-private-methods.case
+// - src/class-elements/productions/cls-decl-after-same-line-async-method.template
+/*---
+description: static private methods (field definitions after an async method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public, async-functions]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ static FieldDefinition ;
+
+ FieldDefinition :
+ ClassElementName Initializer_opt
+
+ ClassElementName :
+ PrivateName
+
+ PrivateName :
+ # IdentifierName
+
+---*/
+
+
+class C {
+ async m() { return 42; } ;
+ static #x(value) {
+ return value / 2;
+ }
+ static #y(value) {
+ return value * 2;
+ }
+ static x() {
+ return this.#x(84);
+ }
+ static y() {
+ return this.#y(43);
+ }
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+c.m().then(function(v) {
+ assert.sameValue(v, 42);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ // Test the private methods do not appear as properties before set to value
+ assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#x"), "test 1");
+ assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 2");
+ assert(!Object.prototype.hasOwnProperty.call(c, "#x"), "test 3");
+
+ assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#y"), "test 4");
+ assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 5");
+ assert(!Object.prototype.hasOwnProperty.call(c, "#y"), "test 6");
+
+ // Test if private fields can be sucessfully accessed and set to value
+ assert.sameValue(C.x(), 42, "test 7");
+ assert.sameValue(C.y(), 86, "test 8");
+
+ // Test the private fields do not appear as properties before after set to value
+ assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 9");
+ assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 10");
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-async-method-string-literal-names.js b/js/src/tests/test262/language/statements/class/elements/same-line-async-method-string-literal-names.js
new file mode 100644
index 0000000000..102f81d4b1
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-async-method-string-literal-names.js
@@ -0,0 +1,121 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/string-literal-names.case
+// - src/class-elements/productions/cls-decl-after-same-line-async-method.template
+/*---
+description: String literal names (field definitions after an async method in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-public, class, async-functions]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement:
+ ...
+ FieldDefinition ;
+
+ FieldDefinition:
+ ClassElementName Initializer_opt
+
+ ClassElementName:
+ PropertyName
+
+---*/
+
+
+class C {
+ async m() { return 42; } 'a'; "b"; 'c' = 39;
+ "d" = 42;
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+assert.sameValue(c.m, C.prototype.m);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+}, {restore: true});
+
+c.m().then(function(v) {
+ assert.sameValue(v, 42);
+
+ function assertions() {
+ // Cover $DONE handler for async cases.
+ function $DONE(error) {
+ if (error) {
+ throw new Test262Error('Test262:AsyncTestFailure')
+ }
+ }
+ assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "a"),
+ "a does not appear as an own property on C prototype"
+ );
+ assert(
+ !Object.prototype.hasOwnProperty.call(C, "a"),
+ "a does not appear as an own property on C constructor"
+ );
+
+ verifyProperty(c, "a", {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+ });
+
+ assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "b"),
+ "b does not appear as an own property on C prototype"
+ );
+ assert(
+ !Object.prototype.hasOwnProperty.call(C, "b"),
+ "b does not appear as an own property on C constructor"
+ );
+
+ verifyProperty(c, "b", {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+ });
+
+ assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "c"),
+ "c does not appear as an own property on C prototype"
+ );
+ assert(
+ !Object.prototype.hasOwnProperty.call(C, "c"),
+ "c does not appear as an own property on C constructor"
+ );
+
+ verifyProperty(c, "c", {
+ value: 39,
+ enumerable: true,
+ writable: true,
+ configurable: true
+ });
+
+ assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "d"),
+ "d does not appear as an own property on C prototype"
+ );
+ assert(
+ !Object.prototype.hasOwnProperty.call(C, "d"),
+ "d does not appear as an own property on C constructor"
+ );
+
+ verifyProperty(c, "d", {
+ value: 42,
+ enumerable: true,
+ writable: true,
+ configurable: true
+ });
+ }
+
+ return Promise.resolve(assertions());
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-gen-computed-names.js b/js/src/tests/test262/language/statements/class/elements/same-line-gen-computed-names.js
new file mode 100644
index 0000000000..c6756902a5
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-gen-computed-names.js
@@ -0,0 +1,107 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/computed-names.case
+// - src/class-elements/productions/cls-decl-same-line-generator.template
+/*---
+description: Computed property names (field definitions followed by a generator method in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-public, computed-property-names, class, generators]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement:
+ ...
+ FieldDefinition ;
+
+ FieldDefinition:
+ ClassElementName Initializer_opt
+
+ ClassElementName:
+ PropertyName
+
+---*/
+var x = "b";
+
+
+
+class C {
+ [x] = 42; [10] = "meep"; ["not initialized"]; *m() { return 42; }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "b"),
+ "b doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "b"),
+ "b doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "b", {
+ value: 42,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "x"),
+ "x doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "x"),
+ "x doesn't appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "x"),
+ "x doesn't appear as an own property on C instance"
+);
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "10"),
+ "10 doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "10"),
+ "10 doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "10", {
+ value: "meep",
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "not initialized"),
+ "'not initialized' doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "not initialized"),
+ "'not initialized' doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "not initialized", {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-gen-computed-symbol-names.js b/js/src/tests/test262/language/statements/class/elements/same-line-gen-computed-symbol-names.js
new file mode 100644
index 0000000000..fd3271ada5
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-gen-computed-symbol-names.js
@@ -0,0 +1,105 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/computed-symbol-names.case
+// - src/class-elements/productions/cls-decl-same-line-generator.template
+/*---
+description: Computed property symbol names (field definitions followed by a generator method in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-public, Symbol, computed-property-names, class, generators]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement:
+ ...
+ FieldDefinition ;
+
+ FieldDefinition:
+ ClassElementName Initializer_opt
+
+ ClassElementName:
+ PropertyName
+
+---*/
+var x = Symbol();
+var y = Symbol();
+
+
+
+class C {
+ [x]; [y] = 42; *m() { return 42; }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, x),
+ "Symbol x doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, x),
+ "Symbol x doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, x, {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, y),
+ "Symbol y doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, y),
+ "Symbol y doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, y, {
+ value: 42,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "x"),
+ "x doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "x"),
+ "x doesn't appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "x"),
+ "x doesn't appear as an own property on C instance"
+);
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "y"),
+ "y doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "y"),
+ "y doesn't appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "y"),
+ "y doesn't appear as an own property on C instance"
+);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-gen-grammar-privatename-identifier-semantics-stringvalue.js b/js/src/tests/test262/language/statements/class/elements/same-line-gen-grammar-privatename-identifier-semantics-stringvalue.js
new file mode 100644
index 0000000000..765b14e562
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-gen-grammar-privatename-identifier-semantics-stringvalue.js
@@ -0,0 +1,109 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-privatename-identifier-semantics-stringvalue.case
+// - src/class-elements/productions/cls-decl-same-line-generator.template
+/*---
+description: PrivateName Static Semantics, StringValue (field definitions followed by a generator method in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public, generators]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+
+ 1. Return the String value consisting of the sequence of code
+ units corresponding to PrivateName. In determining the sequence
+ any occurrences of \ UnicodeEscapeSequence are first replaced
+ with the code point represented by the UnicodeEscapeSequence
+ and then the code points of the entire PrivateName are converted
+ to code units by UTF16Encoding (10.1.1) each code point.
+
+---*/
+
+
+class C {
+ #\u{6F};
+ #\u2118;
+ #ZW_\u200C_NJ;
+ #ZW_\u200D_J;; *m() { return 42; }
+ o(value) {
+ this.#o = value;
+ return this.#o;
+ }
+ ℘(value) {
+ this.#℘ = value;
+ return this.#℘;
+ }
+ ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS METHOD
+ this.#ZW_‌_NJ = value;
+ return this.#ZW_‌_NJ;
+ }
+ ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS METHOD
+ this.#ZW_‍_J = value;
+ return this.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.o(1), 1);
+assert.sameValue(c.℘(1), 1);
+assert.sameValue(c.ZW_‌_NJ(1), 1);
+assert.sameValue(c.ZW_‍_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-gen-literal-names-asi.js b/js/src/tests/test262/language/statements/class/elements/same-line-gen-literal-names-asi.js
new file mode 100644
index 0000000000..1b44e6acd0
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-gen-literal-names-asi.js
@@ -0,0 +1,77 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/literal-names-asi.case
+// - src/class-elements/productions/cls-decl-same-line-generator.template
+/*---
+description: Literal property names with ASI (field definitions followed by a generator method in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-public, class, generators]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement:
+ ...
+ FieldDefinition ;
+
+ FieldDefinition:
+ ClassElementName Initializer_opt
+
+ ClassElementName:
+ PropertyName
+
+---*/
+
+
+class C {
+ a
+ b = 42;; *m() { return 42; }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "a"),
+ "a doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "a"),
+ "a doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "a", {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "b"),
+ "b doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "b"),
+ "b doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "b", {
+ value: 42,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-gen-literal-names.js b/js/src/tests/test262/language/statements/class/elements/same-line-gen-literal-names.js
new file mode 100644
index 0000000000..690e9b4775
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-gen-literal-names.js
@@ -0,0 +1,96 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/literal-names.case
+// - src/class-elements/productions/cls-decl-same-line-generator.template
+/*---
+description: Literal property names (field definitions followed by a generator method in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-public, class, generators]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement:
+ ...
+ FieldDefinition ;
+
+ FieldDefinition:
+ ClassElementName Initializer_opt
+
+ ClassElementName:
+ PropertyName
+
+---*/
+const fn = function() {}
+
+
+
+class C {
+ a; b = 42;
+ c = fn; *m() { return 42; }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "a"),
+ "a doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "a"),
+ "a doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "a", {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "b"),
+ "b doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "b"),
+ "b doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "b", {
+ value: 42,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "c"),
+ "c doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "c"),
+ "c doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "c", {
+ value: fn,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-gen-private-field-usage.js b/js/src/tests/test262/language/statements/class/elements/same-line-gen-private-field-usage.js
new file mode 100644
index 0000000000..e9c9b07277
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-gen-private-field-usage.js
@@ -0,0 +1,49 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-field-usage.case
+// - src/class-elements/productions/cls-decl-same-line-generator.template
+/*---
+description: PrivateName CallExpression usage (private field) (field definitions followed by a generator method in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public, generators]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ Updated Productions
+
+ CallExpression[Yield, Await]:
+ CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+ SuperCall[?Yield, ?Await]
+ CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+ CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+ CallExpression[?Yield, ?Await].IdentifierName
+ CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+ CallExpression[?Yield, ?Await].PrivateName
+
+---*/
+
+
+class C {
+ #m = 'test262';; *m() { return 42; }
+ method() {
+ return this.#m;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.method(), 'test262');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-gen-private-method-getter-usage.js b/js/src/tests/test262/language/statements/class/elements/same-line-gen-private-method-getter-usage.js
new file mode 100644
index 0000000000..b4d9b582f2
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-gen-private-method-getter-usage.js
@@ -0,0 +1,49 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-method-getter-usage.case
+// - src/class-elements/productions/cls-decl-same-line-generator.template
+/*---
+description: PrivateName CallExpression usage (Accesor get method) (field definitions followed by a generator method in the same line)
+esid: prod-FieldDefinition
+features: [class-methods-private, class, class-fields-public, generators]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ Updated Productions
+
+ CallExpression[Yield, Await]:
+ CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+ SuperCall[?Yield, ?Await]
+ CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+ CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+ CallExpression[?Yield, ?Await].IdentifierName
+ CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+ CallExpression[?Yield, ?Await].PrivateName
+
+---*/
+
+
+class C {
+ get #m() { return 'test262'; }; *m() { return 42; }
+ method() {
+ return this.#m;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.method(), 'test262');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-gen-private-method-usage.js b/js/src/tests/test262/language/statements/class/elements/same-line-gen-private-method-usage.js
new file mode 100644
index 0000000000..29ff1bffb1
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-gen-private-method-usage.js
@@ -0,0 +1,49 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-method-usage.case
+// - src/class-elements/productions/cls-decl-same-line-generator.template
+/*---
+description: PrivateName CallExpression usage (private method) (field definitions followed by a generator method in the same line)
+esid: prod-FieldDefinition
+features: [class-methods-private, class, class-fields-public, generators]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ Updated Productions
+
+ CallExpression[Yield, Await]:
+ CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+ SuperCall[?Yield, ?Await]
+ CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+ CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+ CallExpression[?Yield, ?Await].IdentifierName
+ CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+ CallExpression[?Yield, ?Await].PrivateName
+
+---*/
+
+
+class C {
+ #m() { return 'test262'; }; *m() { return 42; }
+ method() {
+ return this.#m();
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.method(), 'test262');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-gen-private-names.js b/js/src/tests/test262/language/statements/class/elements/same-line-gen-private-names.js
new file mode 100644
index 0000000000..012a9b8507
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-gen-private-names.js
@@ -0,0 +1,71 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-names.case
+// - src/class-elements/productions/cls-decl-same-line-generator.template
+/*---
+description: private names (field definitions followed by a generator method in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public, generators]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ FieldDefinition ;
+
+ FieldDefinition :
+ ClassElementName Initializer_opt
+
+ ClassElementName :
+ PrivateName
+
+ PrivateName :
+ # IdentifierName
+
+---*/
+
+
+class C {
+ #x; #y; *m() { return 42; }
+ x() {
+ this.#x = 42;
+ return this.#x;
+ }
+ y() {
+ this.#y = 43;
+ return this.#y;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+// Test the private fields do not appear as properties before set to value
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#x"), "test 1");
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 2");
+assert(!Object.prototype.hasOwnProperty.call(c, "#x"), "test 3");
+
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#y"), "test 4");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 5");
+assert(!Object.prototype.hasOwnProperty.call(c, "#y"), "test 6");
+
+// Test if private fields can be sucessfully accessed and set to value
+assert.sameValue(c.x(), 42, "test 7");
+assert.sameValue(c.y(), 43, "test 8");
+
+// Test the private fields do not appear as properties before after set to value
+assert(!Object.prototype.hasOwnProperty.call(c, "#x"), "test 9");
+assert(!Object.prototype.hasOwnProperty.call(c, "#y"), "test 10");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-field-identifier-initializer.js b/js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-field-identifier-initializer.js
new file mode 100644
index 0000000000..73314ca1ed
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-field-identifier-initializer.js
@@ -0,0 +1,87 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-field-identifier-initializer.case
+// - src/class-elements/productions/cls-decl-same-line-generator.template
+/*---
+description: Valid FieldDefinition (field definitions followed by a generator method in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-public, class, generators]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+
+ PropertyName :
+ LiteralPropertyName
+ ComputedPropertyName
+
+ LiteralPropertyName :
+ IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ $ = 1; _ = 1; \u{6F} = 1; \u2118 = 1; ZW_\u200C_NJ = 1; ZW_\u200D_J = 1; *m() { return 42; }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$, 1);
+assert.sameValue(c._, 1);
+assert.sameValue(c.\u{6F}, 1);
+assert.sameValue(c.\u2118, 1);
+assert.sameValue(c.ZW_\u200C_NJ, 1);
+assert.sameValue(c.ZW_\u200D_J, 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-field-identifier.js b/js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-field-identifier.js
new file mode 100644
index 0000000000..e718d9e508
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-field-identifier.js
@@ -0,0 +1,94 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-field-identifier.case
+// - src/class-elements/productions/cls-decl-same-line-generator.template
+/*---
+description: Valid FieldDefinition (field definitions followed by a generator method in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-public, class, generators]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+
+ PropertyName :
+ LiteralPropertyName
+ ComputedPropertyName
+
+ LiteralPropertyName :
+ IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ $; _; \u{6F}; \u2118; ZW_\u200C_NJ; ZW_\u200D_J; *m() { return 42; }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+c.$ = 1;
+c._ = 1;
+c.\u{6F} = 1;
+c.\u2118 = 1;
+c.ZW_\u200C_NJ = 1;
+c.ZW_\u200D_J = 1;
+
+assert.sameValue(c.$, 1);
+assert.sameValue(c._, 1);
+assert.sameValue(c.\u{6F}, 1);
+assert.sameValue(c.\u2118, 1);
+assert.sameValue(c.ZW_\u200C_NJ, 1);
+assert.sameValue(c.ZW_\u200D_J, 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-private-getter-alt.js b/js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-private-getter-alt.js
new file mode 100644
index 0000000000..55096fe306
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-private-getter-alt.js
@@ -0,0 +1,128 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-getter-alt.case
+// - src/class-elements/productions/cls-decl-same-line-generator.template
+/*---
+description: Valid PrivateName as private getter (field definitions followed by a generator method in the same line)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public, generators]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ...
+ get ClassElementName ( ){ FunctionBody }
+ ...
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ #$_; #__; #\u{6F}_; #℘_; #ZW_‌_NJ_; #ZW_‍_J_;
+ get #$() {
+ return this.#$_;
+ }
+ get #_() {
+ return this.#__;
+ }
+ get #\u{6F}() {
+ return this.#\u{6F}_;
+ }
+ get #℘() {
+ return this.#℘_;
+ }
+ get #ZW_‌_NJ() {
+ return this.#ZW_‌_NJ_;
+ }
+ get #ZW_‍_J() {
+ return this.#ZW_‍_J_;
+ }
+; *m() { return 42; }
+ $(value) {
+ this.#$_ = value;
+ return this.#$;
+ }
+ _(value) {
+ this.#__ = value;
+ return this.#_;
+ }
+ \u{6F}(value) {
+ this.#\u{6F}_ = value;
+ return this.#\u{6F};
+ }
+ ℘(value) {
+ this.#℘_ = value;
+ return this.#℘;
+ }
+ ZW_‌_NJ(value) {
+ this.#ZW_‌_NJ_ = value;
+ return this.#ZW_‌_NJ;
+ }
+ ZW_‍_J(value) {
+ this.#ZW_‍_J_ = value;
+ return this.#ZW_‍_J;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.℘(1), 1);
+assert.sameValue(c.ZW_‌_NJ(1), 1);
+assert.sameValue(c.ZW_‍_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-private-getter.js b/js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-private-getter.js
new file mode 100644
index 0000000000..80244ca087
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-private-getter.js
@@ -0,0 +1,128 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-getter.case
+// - src/class-elements/productions/cls-decl-same-line-generator.template
+/*---
+description: Valid PrivateName as private getter (field definitions followed by a generator method in the same line)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public, generators]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ...
+ get ClassElementName ( ){ FunctionBody }
+ ...
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ #$_; #__; #\u{6F}_; #\u2118_; #ZW_\u200C_NJ_; #ZW_\u200D_J_;
+ get #$() {
+ return this.#$_;
+ }
+ get #_() {
+ return this.#__;
+ }
+ get #\u{6F}() {
+ return this.#\u{6F}_;
+ }
+ get #\u2118() {
+ return this.#\u2118_;
+ }
+ get #ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ_;
+ }
+ get #ZW_\u200D_J() {
+ return this.#ZW_\u200D_J_;
+ }
+; *m() { return 42; }
+ $(value) {
+ this.#$_ = value;
+ return this.#$;
+ }
+ _(value) {
+ this.#__ = value;
+ return this.#_;
+ }
+ \u{6F}(value) {
+ this.#\u{6F}_ = value;
+ return this.#\u{6F};
+ }
+ \u2118(value) {
+ this.#\u2118_ = value;
+ return this.#\u2118;
+ }
+ ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ_ = value;
+ return this.#ZW_\u200C_NJ;
+ }
+ ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J_ = value;
+ return this.#ZW_\u200D_J;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.\u2118(1), 1);
+assert.sameValue(c.ZW_\u200C_NJ(1), 1);
+assert.sameValue(c.ZW_\u200D_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-private-method-alt.js b/js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-private-method-alt.js
new file mode 100644
index 0000000000..8f4d65d8d5
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-private-method-alt.js
@@ -0,0 +1,127 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-method-alt.case
+// - src/class-elements/productions/cls-decl-same-line-generator.template
+/*---
+description: Valid PrivateName as private method (field definitions followed by a generator method in the same line)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public, generators]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ClassElementName ( UniqueFormalParameters ) { FunctionBody }
+ ...
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ #$_; #__; #\u{6F}_; #℘_; #ZW_‌_NJ_; #ZW_‍_J_;
+ #$() {
+ return this.#$_;
+ }
+ #_() {
+ return this.#__;
+ }
+ #\u{6F}() {
+ return this.#\u{6F}_;
+ }
+ #℘() {
+ return this.#℘_;
+ }
+ #ZW_‌_NJ() {
+ return this.#ZW_‌_NJ_;
+ }
+ #ZW_‍_J() {
+ return this.#ZW_‍_J_;
+ }
+; *m() { return 42; }
+ $(value) {
+ this.#$_ = value;
+ return this.#$();
+ }
+ _(value) {
+ this.#__ = value;
+ return this.#_();
+ }
+ \u{6F}(value) {
+ this.#\u{6F}_ = value;
+ return this.#\u{6F}();
+ }
+ ℘(value) {
+ this.#℘_ = value;
+ return this.#℘();
+ }
+ ZW_‌_NJ(value) {
+ this.#ZW_‌_NJ_ = value;
+ return this.#ZW_‌_NJ();
+ }
+ ZW_‍_J(value) {
+ this.#ZW_‍_J_ = value;
+ return this.#ZW_‍_J();
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.℘(1), 1);
+assert.sameValue(c.ZW_‌_NJ(1), 1);
+assert.sameValue(c.ZW_‍_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-private-method.js b/js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-private-method.js
new file mode 100644
index 0000000000..d81c4e3383
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-private-method.js
@@ -0,0 +1,127 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-method.case
+// - src/class-elements/productions/cls-decl-same-line-generator.template
+/*---
+description: Valid PrivateName as private method (field definitions followed by a generator method in the same line)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public, generators]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ClassElementName ( UniqueFormalParameters ) { FunctionBody }
+ ...
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ #$_; #__; #\u{6F}_; #\u2118_; #ZW_\u200C_NJ_; #ZW_\u200D_J_;
+ #$() {
+ return this.#$_;
+ }
+ #_() {
+ return this.#__;
+ }
+ #\u{6F}() {
+ return this.#\u{6F}_;
+ }
+ #\u2118() {
+ return this.#\u2118_;
+ }
+ #ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ_;
+ }
+ #ZW_\u200D_J() {
+ return this.#ZW_\u200D_J_;
+ }
+; *m() { return 42; }
+ $(value) {
+ this.#$_ = value;
+ return this.#$();
+ }
+ _(value) {
+ this.#__ = value;
+ return this.#_();
+ }
+ \u{6F}(value) {
+ this.#\u{6F}_ = value;
+ return this.#\u{6F}();
+ }
+ \u2118(value) {
+ this.#\u2118_ = value;
+ return this.#\u2118();
+ }
+ ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ_ = value;
+ return this.#ZW_\u200C_NJ();
+ }
+ ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J_ = value;
+ return this.#ZW_\u200D_J();
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.\u2118(1), 1);
+assert.sameValue(c.ZW_\u200C_NJ(1), 1);
+assert.sameValue(c.ZW_\u200D_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-private-setter-alt.js b/js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-private-setter-alt.js
new file mode 100644
index 0000000000..a2b835d6ac
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-private-setter-alt.js
@@ -0,0 +1,127 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-setter-alt.case
+// - src/class-elements/productions/cls-decl-same-line-generator.template
+/*---
+description: Valid PrivateName as private setter (field definitions followed by a generator method in the same line)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public, generators]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ...
+ set ClassElementName ( PropertySetParameterList ) { FunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ #$_; #__; #\u{6F}_; #℘_; #ZW_‌_NJ_; #ZW_‍_J_;
+ set #$(value) {
+ this.#$_ = value;
+ }
+ set #_(value) {
+ this.#__ = value;
+ }
+ set #\u{6F}(value) {
+ this.#\u{6F}_ = value;
+ }
+ set #℘(value) {
+ this.#℘_ = value;
+ }
+ set #ZW_‌_NJ(value) {
+ this.#ZW_‌_NJ_ = value;
+ }
+ set #ZW_‍_J(value) {
+ this.#ZW_‍_J_ = value;
+ }
+; *m() { return 42; }
+ $(value) {
+ this.#$ = value;
+ return this.#$_;
+ }
+ _(value) {
+ this.#_ = value;
+ return this.#__;
+ }
+ \u{6F}(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F}_;
+ }
+ ℘(value) {
+ this.#℘ = value;
+ return this.#℘_;
+ }
+ ZW_‌_NJ(value) {
+ this.#ZW_‌_NJ = value;
+ return this.#ZW_‌_NJ_;
+ }
+ ZW_‍_J(value) {
+ this.#ZW_‍_J = value;
+ return this.#ZW_‍_J_;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.℘(1), 1);
+assert.sameValue(c.ZW_‌_NJ(1), 1);
+assert.sameValue(c.ZW_‍_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-private-setter.js b/js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-private-setter.js
new file mode 100644
index 0000000000..f0a4e46f00
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-private-setter.js
@@ -0,0 +1,127 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-setter.case
+// - src/class-elements/productions/cls-decl-same-line-generator.template
+/*---
+description: Valid PrivateName as private setter (field definitions followed by a generator method in the same line)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public, generators]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ...
+ set ClassElementName ( PropertySetParameterList ) { FunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ #$_; #__; #\u{6F}_; #\u2118_; #ZW_\u200C_NJ_; #ZW_\u200D_J_;
+ set #$(value) {
+ this.#$_ = value;
+ }
+ set #_(value) {
+ this.#__ = value;
+ }
+ set #\u{6F}(value) {
+ this.#\u{6F}_ = value;
+ }
+ set #\u2118(value) {
+ this.#\u2118_ = value;
+ }
+ set #ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ_ = value;
+ }
+ set #ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J_ = value;
+ }
+; *m() { return 42; }
+ $(value) {
+ this.#$ = value;
+ return this.#$_;
+ }
+ _(value) {
+ this.#_ = value;
+ return this.#__;
+ }
+ \u{6F}(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F}_;
+ }
+ \u2118(value) {
+ this.#\u2118 = value;
+ return this.#\u2118_;
+ }
+ ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ = value;
+ return this.#ZW_\u200C_NJ_;
+ }
+ ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J = value;
+ return this.#ZW_\u200D_J_;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.\u2118(1), 1);
+assert.sameValue(c.ZW_\u200C_NJ(1), 1);
+assert.sameValue(c.ZW_\u200D_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-privatename-identifier-alt.js
new file mode 100644
index 0000000000..ca087b0399
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-privatename-identifier-alt.js
@@ -0,0 +1,109 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-same-line-generator.template
+/*---
+description: Valid PrivateName (field definitions followed by a generator method in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public, generators]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ #$; #_; #\u{6F}; #℘; #ZW_‌_NJ; #ZW_‍_J; *m() { return 42; }
+ $(value) {
+ this.#$ = value;
+ return this.#$;
+ }
+ _(value) {
+ this.#_ = value;
+ return this.#_;
+ }
+ \u{6F}(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F};
+ }
+ ℘(value) {
+ this.#℘ = value;
+ return this.#℘;
+ }
+ ZW_‌_NJ(value) {
+ this.#ZW_‌_NJ = value;
+ return this.#ZW_‌_NJ;
+ }
+ ZW_‍_J(value) {
+ this.#ZW_‍_J = value;
+ return this.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.℘(1), 1);
+assert.sameValue(c.ZW_‌_NJ(1), 1);
+assert.sameValue(c.ZW_‍_J(1), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-privatename-identifier-initializer-alt.js b/js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-privatename-identifier-initializer-alt.js
new file mode 100644
index 0000000000..f21f1a2e71
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-privatename-identifier-initializer-alt.js
@@ -0,0 +1,103 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-privatename-identifier-initializer-alt.case
+// - src/class-elements/productions/cls-decl-same-line-generator.template
+/*---
+description: Valid PrivateName (field definitions followed by a generator method in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public, generators]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ #$ = 1; #_ = 1; #\u{6F} = 1; #℘ = 1; #ZW_‌_NJ = 1; #ZW_‍_J = 1; *m() { return 42; }
+ $() {
+ return this.#$;
+ }
+ _() {
+ return this.#_;
+ }
+ \u{6F}() {
+ return this.#\u{6F};
+ }
+ ℘() {
+ return this.#℘;
+ }
+ ZW_‌_NJ() {
+ return this.#ZW_‌_NJ;
+ }
+ ZW_‍_J() {
+ return this.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(), 1);
+assert.sameValue(c._(), 1);
+assert.sameValue(c.\u{6F}(), 1);
+assert.sameValue(c.℘(), 1);
+assert.sameValue(c.ZW_‌_NJ(), 1);
+assert.sameValue(c.ZW_‍_J(), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-privatename-identifier-initializer.js b/js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-privatename-identifier-initializer.js
new file mode 100644
index 0000000000..2ccadb6eae
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-privatename-identifier-initializer.js
@@ -0,0 +1,103 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-privatename-identifier-initializer.case
+// - src/class-elements/productions/cls-decl-same-line-generator.template
+/*---
+description: Valid PrivateName (field definitions followed by a generator method in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public, generators]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ #$ = 1; #_ = 1; #\u{6F} = 1; #\u2118 = 1; #ZW_\u200C_NJ = 1; #ZW_\u200D_J = 1; *m() { return 42; }
+ $() {
+ return this.#$;
+ }
+ _() {
+ return this.#_;
+ }
+ \u{6F}() {
+ return this.#\u{6F};
+ }
+ \u2118() {
+ return this.#\u2118;
+ }
+ ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ;
+ }
+ ZW_\u200D_J() {
+ return this.#ZW_\u200D_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(), 1);
+assert.sameValue(c._(), 1);
+assert.sameValue(c.\u{6F}(), 1);
+assert.sameValue(c.\u2118(), 1);
+assert.sameValue(c.ZW_\u200C_NJ(), 1);
+assert.sameValue(c.ZW_\u200D_J(), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-privatename-identifier.js
new file mode 100644
index 0000000000..485a9bd34d
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-privatename-identifier.js
@@ -0,0 +1,109 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-same-line-generator.template
+/*---
+description: Valid PrivateName (field definitions followed by a generator method in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public, generators]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ #$; #_; #\u{6F}; #\u2118; #ZW_\u200C_NJ; #ZW_\u200D_J; *m() { return 42; }
+ $(value) {
+ this.#$ = value;
+ return this.#$;
+ }
+ _(value) {
+ this.#_ = value;
+ return this.#_;
+ }
+ \u{6F}(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F};
+ }
+ \u2118(value) {
+ this.#\u2118 = value;
+ return this.#\u2118;
+ }
+ ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ = value;
+ return this.#ZW_\u200C_NJ;
+ }
+ ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J = value;
+ return this.#ZW_\u200D_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.\u2118(1), 1);
+assert.sameValue(c.ZW_\u200C_NJ(1), 1);
+assert.sameValue(c.ZW_\u200D_J(1), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js
new file mode 100644
index 0000000000..a6a8c640d1
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js
@@ -0,0 +1,134 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-async-generator-method-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-same-line-generator.template
+/*---
+description: Valid Static AsyncGeneratorMethod PrivateName (field definitions followed by a generator method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public, generators]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static async * #$(value) {
+ yield * await value;
+ }
+ static async * #_(value) {
+ yield * await value;
+ }
+ static async * #o(value) {
+ yield * await value;
+ }
+ static async * #℘(value) {
+ yield * await value;
+ }
+ static async * #ZW_‌_NJ(value) {
+ yield * await value;
+ }
+ static async * #ZW_‍_J(value) {
+ yield * await value;
+ }; *m() { return 42; }
+ static get $() {
+ return this.#$;
+ }
+ static get _() {
+ return this.#_;
+ }
+ static get o() {
+ return this.#o;
+ }
+ static get ℘() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#℘;
+ }
+ static get ZW_‌_NJ() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‌_NJ;
+ }
+ static get ZW_‍_J() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‍_J;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+Promise.all([
+ C.$([1]).next(),
+ C._([1]).next(),
+ C.o([1]).next(),
+ C.℘([1]).next(), // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.ZW_‌_NJ([1]).next(), // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.ZW_‍_J([1]).next(), // DO NOT CHANGE THE NAME OF THIS FIELD
+]).then(results => {
+
+ assert.sameValue(results[0].value, 1);
+ assert.sameValue(results[1].value, 1);
+ assert.sameValue(results[2].value, 1);
+ assert.sameValue(results[3].value, 1);
+ assert.sameValue(results[4].value, 1);
+ assert.sameValue(results[5].value, 1);
+
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-static-async-generator-method-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-static-async-generator-method-privatename-identifier.js
new file mode 100644
index 0000000000..fe03ce23f1
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-static-async-generator-method-privatename-identifier.js
@@ -0,0 +1,135 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-async-generator-method-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-same-line-generator.template
+/*---
+description: Valid Static AsyncGeneratorMethod PrivateName (field definitions followed by a generator method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public, generators]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static async * #$(value) {
+ yield * await value;
+ }
+ static async * #_(value) {
+ yield * await value;
+ }
+ static async * #\u{6F}(value) {
+ yield * await value;
+ }
+ static async * #\u2118(value) {
+ yield * await value;
+ }
+ static async * #ZW_\u200C_NJ(value) {
+ yield * await value;
+ }
+ static async * #ZW_\u200D_J(value) {
+ yield * await value;
+ }; *m() { return 42; }
+ static get $() {
+ return this.#$;
+ }
+ static get _() {
+ return this.#_;
+ }
+ static get \u{6F}() {
+ return this.#\u{6F};
+ }
+ static get \u2118() {
+ return this.#\u2118;
+ }
+ static get ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ;
+ }
+ static get ZW_\u200D_J() {
+ return this.#ZW_\u200D_J;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+Promise.all([
+ C.$([1]).next(),
+ C._([1]).next(),
+ C.\u{6F}([1]).next(),
+ C.\u2118([1]).next(),
+ C.ZW_\u200C_NJ([1]).next(),
+ C.ZW_\u200D_J([1]).next(),
+]).then(results => {
+
+ assert.sameValue(results[0].value, 1);
+ assert.sameValue(results[1].value, 1);
+ assert.sameValue(results[2].value, 1);
+ assert.sameValue(results[3].value, 1);
+ assert.sameValue(results[4].value, 1);
+ assert.sameValue(results[5].value, 1);
+
+}).then($DONE, $DONE);
+
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-static-async-method-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-static-async-method-privatename-identifier-alt.js
new file mode 100644
index 0000000000..22b486db39
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-static-async-method-privatename-identifier-alt.js
@@ -0,0 +1,134 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-async-method-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-same-line-generator.template
+/*---
+description: Valid Static AsyncMethod PrivateName (field definitions followed by a generator method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public, generators]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ AsyncMethod
+
+ AsyncMethod :
+ async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static async #$(value) {
+ return await value;
+ }
+ static async #_(value) {
+ return await value;
+ }
+ static async #o(value) {
+ return await value;
+ }
+ static async #℘(value) {
+ return await value;
+ }
+ static async #ZW_‌_NJ(value) {
+ return await value;
+ }
+ static async #ZW_‍_J(value) {
+ return await value;
+ }; *m() { return 42; }
+ static async $(value) {
+ return await this.#$(value);
+ }
+ static async _(value) {
+ return await this.#_(value);
+ }
+ static async o(value) {
+ return await this.#o(value);
+ }
+ static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return await this.#℘(value);
+ }
+ static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return await this.#ZW_‌_NJ(value);
+ }
+ static async ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return await this.#ZW_‍_J(value);
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+Promise.all([
+ C.$(1),
+ C._(1),
+ C.o(1),
+ C.℘(1), // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.ZW_‌_NJ(1), // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.ZW_‍_J(1), // DO NOT CHANGE THE NAME OF THIS FIELD
+]).then(results => {
+
+ assert.sameValue(results[0], 1);
+ assert.sameValue(results[1], 1);
+ assert.sameValue(results[2], 1);
+ assert.sameValue(results[3], 1);
+ assert.sameValue(results[4], 1);
+ assert.sameValue(results[5], 1);
+
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-static-async-method-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-static-async-method-privatename-identifier.js
new file mode 100644
index 0000000000..3ef061db5d
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-static-async-method-privatename-identifier.js
@@ -0,0 +1,135 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-async-method-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-same-line-generator.template
+/*---
+description: Valid Static AsyncMethod PrivateName (field definitions followed by a generator method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public, generators]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ AsyncMethod
+
+ AsyncMethod :
+ async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static async #$(value) {
+ return await value;
+ }
+ static async #_(value) {
+ return await value;
+ }
+ static async #\u{6F}(value) {
+ return await value;
+ }
+ static async #\u2118(value) {
+ return await value;
+ }
+ static async #ZW_\u200C_NJ(value) {
+ return await value;
+ }
+ static async #ZW_\u200D_J(value) {
+ return await value;
+ }; *m() { return 42; }
+ static async $(value) {
+ return await this.#$(value);
+ }
+ static async _(value) {
+ return await this.#_(value);
+ }
+ static async \u{6F}(value) {
+ return await this.#\u{6F}(value);
+ }
+ static async \u2118(value) {
+ return await this.#\u2118(value);
+ }
+ static async ZW_\u200C_NJ(value) {
+ return await this.#ZW_\u200C_NJ(value);
+ }
+ static async ZW_\u200D_J(value) {
+ return await this.#ZW_\u200D_J(value);
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+Promise.all([
+ C.$(1),
+ C._(1),
+ C.\u{6F}(1),
+ C.\u2118(1),
+ C.ZW_\u200C_NJ(1),
+ C.ZW_\u200D_J(1),
+]).then(results => {
+
+ assert.sameValue(results[0], 1);
+ assert.sameValue(results[1], 1);
+ assert.sameValue(results[2], 1);
+ assert.sameValue(results[3], 1);
+ assert.sameValue(results[4], 1);
+ assert.sameValue(results[5], 1);
+
+}).then($DONE, $DONE);
+
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-static-generator-method-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-static-generator-method-privatename-identifier-alt.js
new file mode 100644
index 0000000000..37181ecc10
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-static-generator-method-privatename-identifier-alt.js
@@ -0,0 +1,124 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-generator-method-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-same-line-generator.template
+/*---
+description: Valid Static GeneratorMethod PrivateName (field definitions followed by a generator method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public, generators]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ GeneratorMethod
+
+ GeneratorMethod :
+ * ClassElementName ( UniqueFormalParameters ){ GeneratorBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static * #$(value) {
+ yield * value;
+ }
+ static * #_(value) {
+ yield * value;
+ }
+ static * #o(value) {
+ yield * value;
+ }
+ static * #℘(value) {
+ yield * value;
+ }
+ static * #ZW_‌_NJ(value) {
+ yield * value;
+ }
+ static * #ZW_‍_J(value) {
+ yield * value;
+ }; *m() { return 42; }
+ static get $() {
+ return this.#$;
+ }
+ static get _() {
+ return this.#_;
+ }
+ static get o() {
+ return this.#o;
+ }
+ static get ℘() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#℘;
+ }
+ static get ZW_‌_NJ() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‌_NJ;
+ }
+ static get ZW_‍_J() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‍_J;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$([1]).next().value, 1);
+assert.sameValue(C._([1]).next().value, 1);
+assert.sameValue(C.o([1]).next().value, 1);
+assert.sameValue(C.℘([1]).next().value, 1);
+assert.sameValue(C.ZW_‌_NJ([1]).next().value, 1);
+assert.sameValue(C.ZW_‍_J([1]).next().value, 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-static-generator-method-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-static-generator-method-privatename-identifier.js
new file mode 100644
index 0000000000..3630e7b33c
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-static-generator-method-privatename-identifier.js
@@ -0,0 +1,125 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-generator-method-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-same-line-generator.template
+/*---
+description: Valid Static GeneratorMethod PrivateName (field definitions followed by a generator method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public, generators]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ GeneratorMethod
+
+ GeneratorMethod :
+ * ClassElementName ( UniqueFormalParameters ){ GeneratorBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static * #$(value) {
+ yield * value;
+ }
+ static * #_(value) {
+ yield * value;
+ }
+ static * #\u{6F}(value) {
+ yield * value;
+ }
+ static * #\u2118(value) {
+ yield * value;
+ }
+ static * #ZW_\u200C_NJ(value) {
+ yield * value;
+ }
+ static * #ZW_\u200D_J(value) {
+ yield * value;
+ }; *m() { return 42; }
+ static get $() {
+ return this.#$;
+ }
+ static get _() {
+ return this.#_;
+ }
+ static get \u{6F}() {
+ return this.#\u{6F};
+ }
+ static get \u2118() {
+ return this.#\u2118;
+ }
+ static get ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ;
+ }
+ static get ZW_\u200D_J() {
+ return this.#ZW_\u200D_J;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$([1]).next().value, 1);
+assert.sameValue(C._([1]).next().value, 1);
+assert.sameValue(C.\u{6F}([1]).next().value, 1);
+assert.sameValue(C.\u2118([1]).next().value, 1);
+assert.sameValue(C.ZW_\u200C_NJ([1]).next().value, 1);
+assert.sameValue(C.ZW_\u200D_J([1]).next().value, 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-static-method-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-static-method-privatename-identifier-alt.js
new file mode 100644
index 0000000000..b6f7007c88
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-static-method-privatename-identifier-alt.js
@@ -0,0 +1,122 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-method-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-same-line-generator.template
+/*---
+description: Valid Static Method PrivateName (field definitions followed by a generator method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public, generators]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ ClassElementName ( UniqueFormalParameters ){ FunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static #$(value) {
+ return value;
+ }
+ static #_(value) {
+ return value;
+ }
+ static #o(value) {
+ return value;
+ }
+ static #℘(value) {
+ return value;
+ }
+ static #ZW_‌_NJ(value) {
+ return value;
+ }
+ static #ZW_‍_J(value) {
+ return value;
+ }; *m() { return 42; }
+ static $(value) {
+ return this.#$(value);
+ }
+ static _(value) {
+ return this.#_(value);
+ }
+ static o(value) {
+ return this.#o(value);
+ }
+ static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#℘(value);
+ }
+ static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‌_NJ(value);
+ }
+ static ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‍_J(value);
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(1), 1);
+assert.sameValue(C._(1), 1);
+assert.sameValue(C.o(1), 1);
+assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+assert.sameValue(C.ZW_‌_NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+assert.sameValue(C.ZW_‍_J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-static-method-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-static-method-privatename-identifier.js
new file mode 100644
index 0000000000..ce032fa68c
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-static-method-privatename-identifier.js
@@ -0,0 +1,122 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-method-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-same-line-generator.template
+/*---
+description: Valid Static Method PrivateName (field definitions followed by a generator method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public, generators]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ ClassElementName ( UniqueFormalParameters ){ FunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static #$(value) {
+ return value;
+ }
+ static #_(value) {
+ return value;
+ }
+ static #\u{6F}(value) {
+ return value;
+ }
+ static #\u2118(value) {
+ return value;
+ }
+ static #ZW_\u200C_NJ(value) {
+ return value;
+ }
+ static #ZW_\u200D_J(value) {
+ return value;
+ }; *m() { return 42; }
+ static $(value) {
+ return this.#$(value);
+ }
+ static _(value) {
+ return this.#_(value);
+ }
+ static \u{6F}(value) {
+ return this.#\u{6F}(value);
+ }
+ static \u2118(value) {
+ return this.#\u2118(value);
+ }
+ static ZW_\u200C_NJ(value) {
+ return this.#ZW_\u200C_NJ(value);
+ }
+ static ZW_\u200D_J(value) {
+ return this.#ZW_\u200D_J(value);
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(1), 1);
+assert.sameValue(C._(1), 1);
+assert.sameValue(C.\u{6F}(1), 1);
+assert.sameValue(C.\u2118(1), 1);
+assert.sameValue(C.ZW_\u200C_NJ(1), 1);
+assert.sameValue(C.ZW_\u200D_J(1), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-static-privatename-identifier-alt-by-classname.js b/js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-static-privatename-identifier-alt-by-classname.js
new file mode 100644
index 0000000000..836a203e5c
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-static-privatename-identifier-alt-by-classname.js
@@ -0,0 +1,110 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-alt-by-classname.case
+// - src/class-elements/productions/cls-decl-same-line-generator.template
+/*---
+description: Valid Static PrivateName (field definitions followed by a generator method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public, generators]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_‍_J; *m() { return 42; }
+ static $(value) {
+ C.#$ = value;
+ return C.#$;
+ }
+ static _(value) {
+ C.#_ = value;
+ return C.#_;
+ }
+ static o(value) {
+ C.#\u{6F} = value;
+ return C.#\u{6F};
+ }
+ static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.#℘ = value;
+ return C.#℘;
+ }
+ static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.#ZW_‌_NJ = value;
+ return C.#ZW_‌_NJ;
+ }
+ static ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.#ZW_‍_J = value;
+ return C.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(1), 1);
+assert.sameValue(C._(1), 1);
+assert.sameValue(C.o(1), 1);
+assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+assert.sameValue(C.ZW_‌_NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+assert.sameValue(C.ZW_‍_J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-static-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-static-privatename-identifier-alt.js
new file mode 100644
index 0000000000..dd7f2c74ba
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-static-privatename-identifier-alt.js
@@ -0,0 +1,110 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-same-line-generator.template
+/*---
+description: Valid Static PrivateName (field definitions followed by a generator method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public, generators]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_‍_J; *m() { return 42; }
+ static $(value) {
+ this.#$ = value;
+ return this.#$;
+ }
+ static _(value) {
+ this.#_ = value;
+ return this.#_;
+ }
+ static o(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F};
+ }
+ static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ this.#℘ = value;
+ return this.#℘;
+ }
+ static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ this.#ZW_‌_NJ = value;
+ return this.#ZW_‌_NJ;
+ }
+ static ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ this.#ZW_‍_J = value;
+ return this.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(1), 1);
+assert.sameValue(C._(1), 1);
+assert.sameValue(C.o(1), 1);
+assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+assert.sameValue(C.ZW_‌_NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+assert.sameValue(C.ZW_‍_J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-static-privatename-identifier-by-classname.js b/js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-static-privatename-identifier-by-classname.js
new file mode 100644
index 0000000000..f99a1b1503
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-static-privatename-identifier-by-classname.js
@@ -0,0 +1,110 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-by-classname.case
+// - src/class-elements/productions/cls-decl-same-line-generator.template
+/*---
+description: Valid Static PrivateName (field definitions followed by a generator method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public, generators]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J; *m() { return 42; }
+ static $(value) {
+ C.#$ = value;
+ return C.#$;
+ }
+ static _(value) {
+ C.#_ = value;
+ return C.#_;
+ }
+ static \u{6F}(value) {
+ C.#\u{6F} = value;
+ return C.#\u{6F};
+ }
+ static \u2118(value) {
+ C.#\u2118 = value;
+ return C.#\u2118;
+ }
+ static ZW_\u200C_NJ(value) {
+ C.#ZW_\u200C_NJ = value;
+ return C.#ZW_\u200C_NJ;
+ }
+ static ZW_\u200D_J(value) {
+ C.#ZW_\u200D_J = value;
+ return C.#ZW_\u200D_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(1), 1);
+assert.sameValue(C._(1), 1);
+assert.sameValue(C.\u{6F}(1), 1);
+assert.sameValue(C.\u2118(1), 1);
+assert.sameValue(C.ZW_\u200C_NJ(1), 1);
+assert.sameValue(C.ZW_\u200D_J(1), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js b/js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js
new file mode 100644
index 0000000000..43ade49028
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js
@@ -0,0 +1,104 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-initializer-alt-by-classname.case
+// - src/class-elements/productions/cls-decl-same-line-generator.template
+/*---
+description: Valid Static PrivateName (field definitions followed by a generator method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public, generators]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_‍_J = 1; *m() { return 42; }
+ static $() {
+ return C.#$;
+ }
+ static _() {
+ return C.#_;
+ }
+ static \u{6F}() {
+ return C.#\u{6F};
+ }
+ static ℘() {
+ return C.#℘;
+ }
+ static ZW_‌_NJ() {
+ return C.#ZW_‌_NJ;
+ }
+ static ZW_‍_J() {
+ return C.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(), 1);
+assert.sameValue(C._(), 1);
+assert.sameValue(C.\u{6F}(), 1);
+assert.sameValue(C.℘(), 1);
+assert.sameValue(C.ZW_‌_NJ(), 1);
+assert.sameValue(C.ZW_‍_J(), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-static-privatename-identifier-initializer-alt.js b/js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-static-privatename-identifier-initializer-alt.js
new file mode 100644
index 0000000000..473ea08121
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-static-privatename-identifier-initializer-alt.js
@@ -0,0 +1,104 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-initializer-alt.case
+// - src/class-elements/productions/cls-decl-same-line-generator.template
+/*---
+description: Valid Static PrivateName (field definitions followed by a generator method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public, generators]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_‍_J = 1; *m() { return 42; }
+ static $() {
+ return this.#$;
+ }
+ static _() {
+ return this.#_;
+ }
+ static \u{6F}() {
+ return this.#\u{6F};
+ }
+ static ℘() {
+ return this.#℘;
+ }
+ static ZW_‌_NJ() {
+ return this.#ZW_‌_NJ;
+ }
+ static ZW_‍_J() {
+ return this.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(), 1);
+assert.sameValue(C._(), 1);
+assert.sameValue(C.\u{6F}(), 1);
+assert.sameValue(C.℘(), 1);
+assert.sameValue(C.ZW_‌_NJ(), 1);
+assert.sameValue(C.ZW_‍_J(), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-static-privatename-identifier-initializer.js b/js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-static-privatename-identifier-initializer.js
new file mode 100644
index 0000000000..734395af36
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-static-privatename-identifier-initializer.js
@@ -0,0 +1,104 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-initializer.case
+// - src/class-elements/productions/cls-decl-same-line-generator.template
+/*---
+description: Valid Static PrivateName (field definitions followed by a generator method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public, generators]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #\u2118 = 1; static #ZW_\u200C_NJ = 1; static #ZW_\u200D_J = 1; *m() { return 42; }
+ static $() {
+ return this.#$;
+ }
+ static _() {
+ return this.#_;
+ }
+ static \u{6F}() {
+ return this.#\u{6F};
+ }
+ static \u2118() {
+ return this.#\u2118;
+ }
+ static ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ;
+ }
+ static ZW_\u200D_J() {
+ return this.#ZW_\u200D_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(), 1);
+assert.sameValue(C._(), 1);
+assert.sameValue(C.\u{6F}(), 1);
+assert.sameValue(C.\u2118(), 1);
+assert.sameValue(C.ZW_\u200C_NJ(), 1);
+assert.sameValue(C.ZW_\u200D_J(), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-static-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-static-privatename-identifier.js
new file mode 100644
index 0000000000..3903cb11b4
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-gen-rs-static-privatename-identifier.js
@@ -0,0 +1,110 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-same-line-generator.template
+/*---
+description: Valid Static PrivateName (field definitions followed by a generator method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public, generators]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J; *m() { return 42; }
+ static $(value) {
+ this.#$ = value;
+ return this.#$;
+ }
+ static _(value) {
+ this.#_ = value;
+ return this.#_;
+ }
+ static \u{6F}(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F};
+ }
+ static \u2118(value) {
+ this.#\u2118 = value;
+ return this.#\u2118;
+ }
+ static ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ = value;
+ return this.#ZW_\u200C_NJ;
+ }
+ static ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J = value;
+ return this.#ZW_\u200D_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(1), 1);
+assert.sameValue(C._(1), 1);
+assert.sameValue(C.\u{6F}(1), 1);
+assert.sameValue(C.\u2118(1), 1);
+assert.sameValue(C.ZW_\u200C_NJ(1), 1);
+assert.sameValue(C.ZW_\u200D_J(1), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-gen-static-private-fields.js b/js/src/tests/test262/language/statements/class/elements/same-line-gen-static-private-fields.js
new file mode 100644
index 0000000000..8c27b417ab
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-gen-static-private-fields.js
@@ -0,0 +1,71 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/static-private-fields.case
+// - src/class-elements/productions/cls-decl-same-line-generator.template
+/*---
+description: static private fields (field definitions followed by a generator method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public, generators]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ static FieldDefinition ;
+
+ FieldDefinition :
+ ClassElementName Initializer_opt
+
+ ClassElementName :
+ PrivateName
+
+ PrivateName :
+ # IdentifierName
+
+---*/
+
+
+class C {
+ static #x; static #y; *m() { return 42; }
+ static x() {
+ this.#x = 42;
+ return this.#x;
+ }
+ static y() {
+ this.#y = 43;
+ return this.#y;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+// Test the private fields do not appear as properties before set to value
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#x"), "test 1");
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 2");
+assert(!Object.prototype.hasOwnProperty.call(c, "#x"), "test 3");
+
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#y"), "test 4");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 5");
+assert(!Object.prototype.hasOwnProperty.call(c, "#y"), "test 6");
+
+// Test if private fields can be sucessfully accessed and set to value
+assert.sameValue(C.x(), 42, "test 7");
+assert.sameValue(C.y(), 43, "test 8");
+
+// Test the private fields do not appear as properties before after set to value
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 9");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 10");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-gen-static-private-methods-with-fields.js b/js/src/tests/test262/language/statements/class/elements/same-line-gen-static-private-methods-with-fields.js
new file mode 100644
index 0000000000..fa0c3345e5
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-gen-static-private-methods-with-fields.js
@@ -0,0 +1,88 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/static-private-methods-with-fields.case
+// - src/class-elements/productions/cls-decl-same-line-generator.template
+/*---
+description: static private methods with fields (field definitions followed by a generator method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class-static-fields-private, class, class-fields-public, generators]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ static FieldDefinition ;
+
+ FieldDefinition :
+ ClassElementName Initializer_opt
+
+ ClassElementName :
+ PrivateName
+
+ PrivateName :
+ # IdentifierName
+
+---*/
+
+
+class C {
+ static #xVal; static #yVal; *m() { return 42; }
+ static #x(value) {
+ this.#xVal = value;
+ return this.#xVal;
+ }
+ static #y(value) {
+ this.#yVal = value;
+ return this.#yVal;
+ }
+ static x() {
+ return this.#x(42);
+ }
+ static y() {
+ return this.#y(43);
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+// Test the private methods do not appear as properties before set to value
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#x"), "test 1");
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 2");
+assert(!Object.prototype.hasOwnProperty.call(c, "#x"), "test 3");
+
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#y"), "test 4");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 5");
+assert(!Object.prototype.hasOwnProperty.call(c, "#y"), "test 6");
+
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#xVal"), "test 7");
+assert(!Object.prototype.hasOwnProperty.call(C, "#xVal"), "test 8");
+assert(!Object.prototype.hasOwnProperty.call(c, "#xVal"), "test 9");
+
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#yVal"), "test 10");
+assert(!Object.prototype.hasOwnProperty.call(C, "#yVal"), "test 11");
+assert(!Object.prototype.hasOwnProperty.call(c, "#yVal"), "test 12");
+
+// Test if private fields can be sucessfully accessed and set to value
+assert.sameValue(C.x(), 42, "test 13");
+assert.sameValue(C.y(), 43, "test 14");
+
+// Test the private fields do not appear as properties before after set to value
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 15");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 16");
+
+assert(!Object.prototype.hasOwnProperty.call(C, "#xVal"), "test 17");
+assert(!Object.prototype.hasOwnProperty.call(C, "#yVal"), "test 18");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-gen-static-private-methods.js b/js/src/tests/test262/language/statements/class/elements/same-line-gen-static-private-methods.js
new file mode 100644
index 0000000000..9a54e8a48f
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-gen-static-private-methods.js
@@ -0,0 +1,75 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/static-private-methods.case
+// - src/class-elements/productions/cls-decl-same-line-generator.template
+/*---
+description: static private methods (field definitions followed by a generator method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public, generators]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ static FieldDefinition ;
+
+ FieldDefinition :
+ ClassElementName Initializer_opt
+
+ ClassElementName :
+ PrivateName
+
+ PrivateName :
+ # IdentifierName
+
+---*/
+
+
+class C {
+ ; *m() { return 42; }
+ static #x(value) {
+ return value / 2;
+ }
+ static #y(value) {
+ return value * 2;
+ }
+ static x() {
+ return this.#x(84);
+ }
+ static y() {
+ return this.#y(43);
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+// Test the private methods do not appear as properties before set to value
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#x"), "test 1");
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 2");
+assert(!Object.prototype.hasOwnProperty.call(c, "#x"), "test 3");
+
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#y"), "test 4");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 5");
+assert(!Object.prototype.hasOwnProperty.call(c, "#y"), "test 6");
+
+// Test if private fields can be sucessfully accessed and set to value
+assert.sameValue(C.x(), 42, "test 7");
+assert.sameValue(C.y(), 86, "test 8");
+
+// Test the private fields do not appear as properties before after set to value
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 9");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 10");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-gen-string-literal-names.js b/js/src/tests/test262/language/statements/class/elements/same-line-gen-string-literal-names.js
new file mode 100644
index 0000000000..6735a3a627
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-gen-string-literal-names.js
@@ -0,0 +1,109 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/string-literal-names.case
+// - src/class-elements/productions/cls-decl-same-line-generator.template
+/*---
+description: String literal names (field definitions followed by a generator method in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-public, class, generators]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement:
+ ...
+ FieldDefinition ;
+
+ FieldDefinition:
+ ClassElementName Initializer_opt
+
+ ClassElementName:
+ PropertyName
+
+---*/
+
+
+class C {
+ 'a'; "b"; 'c' = 39;
+ "d" = 42; *m() { return 42; }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m().next().value, 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "a"),
+ "a does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "a"),
+ "a does not appear as an own property on C constructor"
+);
+
+verifyProperty(c, "a", {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "b"),
+ "b does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "b"),
+ "b does not appear as an own property on C constructor"
+);
+
+verifyProperty(c, "b", {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "c"),
+ "c does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "c"),
+ "c does not appear as an own property on C constructor"
+);
+
+verifyProperty(c, "c", {
+ value: 39,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "d"),
+ "d does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "d"),
+ "d does not appear as an own property on C constructor"
+);
+
+verifyProperty(c, "d", {
+ value: 42,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-method-computed-names.js b/js/src/tests/test262/language/statements/class/elements/same-line-method-computed-names.js
new file mode 100644
index 0000000000..d2e624c169
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-method-computed-names.js
@@ -0,0 +1,107 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/computed-names.case
+// - src/class-elements/productions/cls-decl-same-line-method.template
+/*---
+description: Computed property names (field definitions followed by a method in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-public, computed-property-names, class]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement:
+ ...
+ FieldDefinition ;
+
+ FieldDefinition:
+ ClassElementName Initializer_opt
+
+ ClassElementName:
+ PropertyName
+
+---*/
+var x = "b";
+
+
+
+class C {
+ [x] = 42; [10] = "meep"; ["not initialized"]; m() { return 42; }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "b"),
+ "b doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "b"),
+ "b doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "b", {
+ value: 42,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "x"),
+ "x doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "x"),
+ "x doesn't appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "x"),
+ "x doesn't appear as an own property on C instance"
+);
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "10"),
+ "10 doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "10"),
+ "10 doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "10", {
+ value: "meep",
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "not initialized"),
+ "'not initialized' doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "not initialized"),
+ "'not initialized' doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "not initialized", {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-method-computed-symbol-names.js b/js/src/tests/test262/language/statements/class/elements/same-line-method-computed-symbol-names.js
new file mode 100644
index 0000000000..60f11abfc5
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-method-computed-symbol-names.js
@@ -0,0 +1,105 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/computed-symbol-names.case
+// - src/class-elements/productions/cls-decl-same-line-method.template
+/*---
+description: Computed property symbol names (field definitions followed by a method in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-public, Symbol, computed-property-names, class]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement:
+ ...
+ FieldDefinition ;
+
+ FieldDefinition:
+ ClassElementName Initializer_opt
+
+ ClassElementName:
+ PropertyName
+
+---*/
+var x = Symbol();
+var y = Symbol();
+
+
+
+class C {
+ [x]; [y] = 42; m() { return 42; }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, x),
+ "Symbol x doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, x),
+ "Symbol x doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, x, {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, y),
+ "Symbol y doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, y),
+ "Symbol y doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, y, {
+ value: 42,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "x"),
+ "x doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "x"),
+ "x doesn't appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "x"),
+ "x doesn't appear as an own property on C instance"
+);
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "y"),
+ "y doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "y"),
+ "y doesn't appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "y"),
+ "y doesn't appear as an own property on C instance"
+);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-method-grammar-privatename-identifier-semantics-stringvalue.js b/js/src/tests/test262/language/statements/class/elements/same-line-method-grammar-privatename-identifier-semantics-stringvalue.js
new file mode 100644
index 0000000000..4a6e3dc26a
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-method-grammar-privatename-identifier-semantics-stringvalue.js
@@ -0,0 +1,109 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-privatename-identifier-semantics-stringvalue.case
+// - src/class-elements/productions/cls-decl-same-line-method.template
+/*---
+description: PrivateName Static Semantics, StringValue (field definitions followed by a method in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+
+ 1. Return the String value consisting of the sequence of code
+ units corresponding to PrivateName. In determining the sequence
+ any occurrences of \ UnicodeEscapeSequence are first replaced
+ with the code point represented by the UnicodeEscapeSequence
+ and then the code points of the entire PrivateName are converted
+ to code units by UTF16Encoding (10.1.1) each code point.
+
+---*/
+
+
+class C {
+ #\u{6F};
+ #\u2118;
+ #ZW_\u200C_NJ;
+ #ZW_\u200D_J;; m() { return 42; }
+ o(value) {
+ this.#o = value;
+ return this.#o;
+ }
+ ℘(value) {
+ this.#℘ = value;
+ return this.#℘;
+ }
+ ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS METHOD
+ this.#ZW_‌_NJ = value;
+ return this.#ZW_‌_NJ;
+ }
+ ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS METHOD
+ this.#ZW_‍_J = value;
+ return this.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.o(1), 1);
+assert.sameValue(c.℘(1), 1);
+assert.sameValue(c.ZW_‌_NJ(1), 1);
+assert.sameValue(c.ZW_‍_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-method-literal-names-asi.js b/js/src/tests/test262/language/statements/class/elements/same-line-method-literal-names-asi.js
new file mode 100644
index 0000000000..86b5cabe86
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-method-literal-names-asi.js
@@ -0,0 +1,77 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/literal-names-asi.case
+// - src/class-elements/productions/cls-decl-same-line-method.template
+/*---
+description: Literal property names with ASI (field definitions followed by a method in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-public, class]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement:
+ ...
+ FieldDefinition ;
+
+ FieldDefinition:
+ ClassElementName Initializer_opt
+
+ ClassElementName:
+ PropertyName
+
+---*/
+
+
+class C {
+ a
+ b = 42;; m() { return 42; }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "a"),
+ "a doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "a"),
+ "a doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "a", {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "b"),
+ "b doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "b"),
+ "b doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "b", {
+ value: 42,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-method-literal-names.js b/js/src/tests/test262/language/statements/class/elements/same-line-method-literal-names.js
new file mode 100644
index 0000000000..ffad35e421
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-method-literal-names.js
@@ -0,0 +1,96 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/literal-names.case
+// - src/class-elements/productions/cls-decl-same-line-method.template
+/*---
+description: Literal property names (field definitions followed by a method in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-public, class]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement:
+ ...
+ FieldDefinition ;
+
+ FieldDefinition:
+ ClassElementName Initializer_opt
+
+ ClassElementName:
+ PropertyName
+
+---*/
+const fn = function() {}
+
+
+
+class C {
+ a; b = 42;
+ c = fn; m() { return 42; }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "a"),
+ "a doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "a"),
+ "a doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "a", {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "b"),
+ "b doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "b"),
+ "b doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "b", {
+ value: 42,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "c"),
+ "c doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "c"),
+ "c doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "c", {
+ value: fn,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-method-private-field-usage.js b/js/src/tests/test262/language/statements/class/elements/same-line-method-private-field-usage.js
new file mode 100644
index 0000000000..e41e34de6c
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-method-private-field-usage.js
@@ -0,0 +1,49 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-field-usage.case
+// - src/class-elements/productions/cls-decl-same-line-method.template
+/*---
+description: PrivateName CallExpression usage (private field) (field definitions followed by a method in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ Updated Productions
+
+ CallExpression[Yield, Await]:
+ CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+ SuperCall[?Yield, ?Await]
+ CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+ CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+ CallExpression[?Yield, ?Await].IdentifierName
+ CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+ CallExpression[?Yield, ?Await].PrivateName
+
+---*/
+
+
+class C {
+ #m = 'test262';; m() { return 42; }
+ method() {
+ return this.#m;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.method(), 'test262');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-method-private-method-getter-usage.js b/js/src/tests/test262/language/statements/class/elements/same-line-method-private-method-getter-usage.js
new file mode 100644
index 0000000000..fcc4466573
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-method-private-method-getter-usage.js
@@ -0,0 +1,49 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-method-getter-usage.case
+// - src/class-elements/productions/cls-decl-same-line-method.template
+/*---
+description: PrivateName CallExpression usage (Accesor get method) (field definitions followed by a method in the same line)
+esid: prod-FieldDefinition
+features: [class-methods-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ Updated Productions
+
+ CallExpression[Yield, Await]:
+ CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+ SuperCall[?Yield, ?Await]
+ CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+ CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+ CallExpression[?Yield, ?Await].IdentifierName
+ CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+ CallExpression[?Yield, ?Await].PrivateName
+
+---*/
+
+
+class C {
+ get #m() { return 'test262'; }; m() { return 42; }
+ method() {
+ return this.#m;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.method(), 'test262');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-method-private-method-usage.js b/js/src/tests/test262/language/statements/class/elements/same-line-method-private-method-usage.js
new file mode 100644
index 0000000000..03ec6f24e2
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-method-private-method-usage.js
@@ -0,0 +1,49 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-method-usage.case
+// - src/class-elements/productions/cls-decl-same-line-method.template
+/*---
+description: PrivateName CallExpression usage (private method) (field definitions followed by a method in the same line)
+esid: prod-FieldDefinition
+features: [class-methods-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ Updated Productions
+
+ CallExpression[Yield, Await]:
+ CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+ SuperCall[?Yield, ?Await]
+ CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+ CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+ CallExpression[?Yield, ?Await].IdentifierName
+ CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+ CallExpression[?Yield, ?Await].PrivateName
+
+---*/
+
+
+class C {
+ #m() { return 'test262'; }; m() { return 42; }
+ method() {
+ return this.#m();
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.method(), 'test262');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-method-private-names.js b/js/src/tests/test262/language/statements/class/elements/same-line-method-private-names.js
new file mode 100644
index 0000000000..0977dfbdd1
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-method-private-names.js
@@ -0,0 +1,71 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-names.case
+// - src/class-elements/productions/cls-decl-same-line-method.template
+/*---
+description: private names (field definitions followed by a method in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ FieldDefinition ;
+
+ FieldDefinition :
+ ClassElementName Initializer_opt
+
+ ClassElementName :
+ PrivateName
+
+ PrivateName :
+ # IdentifierName
+
+---*/
+
+
+class C {
+ #x; #y; m() { return 42; }
+ x() {
+ this.#x = 42;
+ return this.#x;
+ }
+ y() {
+ this.#y = 43;
+ return this.#y;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+// Test the private fields do not appear as properties before set to value
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#x"), "test 1");
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 2");
+assert(!Object.prototype.hasOwnProperty.call(c, "#x"), "test 3");
+
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#y"), "test 4");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 5");
+assert(!Object.prototype.hasOwnProperty.call(c, "#y"), "test 6");
+
+// Test if private fields can be sucessfully accessed and set to value
+assert.sameValue(c.x(), 42, "test 7");
+assert.sameValue(c.y(), 43, "test 8");
+
+// Test the private fields do not appear as properties before after set to value
+assert(!Object.prototype.hasOwnProperty.call(c, "#x"), "test 9");
+assert(!Object.prototype.hasOwnProperty.call(c, "#y"), "test 10");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-method-rs-field-identifier-initializer.js b/js/src/tests/test262/language/statements/class/elements/same-line-method-rs-field-identifier-initializer.js
new file mode 100644
index 0000000000..4a14ab6d0e
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-method-rs-field-identifier-initializer.js
@@ -0,0 +1,87 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-field-identifier-initializer.case
+// - src/class-elements/productions/cls-decl-same-line-method.template
+/*---
+description: Valid FieldDefinition (field definitions followed by a method in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-public, class]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+
+ PropertyName :
+ LiteralPropertyName
+ ComputedPropertyName
+
+ LiteralPropertyName :
+ IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ $ = 1; _ = 1; \u{6F} = 1; \u2118 = 1; ZW_\u200C_NJ = 1; ZW_\u200D_J = 1; m() { return 42; }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$, 1);
+assert.sameValue(c._, 1);
+assert.sameValue(c.\u{6F}, 1);
+assert.sameValue(c.\u2118, 1);
+assert.sameValue(c.ZW_\u200C_NJ, 1);
+assert.sameValue(c.ZW_\u200D_J, 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-method-rs-field-identifier.js b/js/src/tests/test262/language/statements/class/elements/same-line-method-rs-field-identifier.js
new file mode 100644
index 0000000000..2261cbc387
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-method-rs-field-identifier.js
@@ -0,0 +1,94 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-field-identifier.case
+// - src/class-elements/productions/cls-decl-same-line-method.template
+/*---
+description: Valid FieldDefinition (field definitions followed by a method in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-public, class]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+
+ PropertyName :
+ LiteralPropertyName
+ ComputedPropertyName
+
+ LiteralPropertyName :
+ IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ $; _; \u{6F}; \u2118; ZW_\u200C_NJ; ZW_\u200D_J; m() { return 42; }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+c.$ = 1;
+c._ = 1;
+c.\u{6F} = 1;
+c.\u2118 = 1;
+c.ZW_\u200C_NJ = 1;
+c.ZW_\u200D_J = 1;
+
+assert.sameValue(c.$, 1);
+assert.sameValue(c._, 1);
+assert.sameValue(c.\u{6F}, 1);
+assert.sameValue(c.\u2118, 1);
+assert.sameValue(c.ZW_\u200C_NJ, 1);
+assert.sameValue(c.ZW_\u200D_J, 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-method-rs-private-getter-alt.js b/js/src/tests/test262/language/statements/class/elements/same-line-method-rs-private-getter-alt.js
new file mode 100644
index 0000000000..5d5831486a
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-method-rs-private-getter-alt.js
@@ -0,0 +1,128 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-getter-alt.case
+// - src/class-elements/productions/cls-decl-same-line-method.template
+/*---
+description: Valid PrivateName as private getter (field definitions followed by a method in the same line)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ...
+ get ClassElementName ( ){ FunctionBody }
+ ...
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ #$_; #__; #\u{6F}_; #℘_; #ZW_‌_NJ_; #ZW_‍_J_;
+ get #$() {
+ return this.#$_;
+ }
+ get #_() {
+ return this.#__;
+ }
+ get #\u{6F}() {
+ return this.#\u{6F}_;
+ }
+ get #℘() {
+ return this.#℘_;
+ }
+ get #ZW_‌_NJ() {
+ return this.#ZW_‌_NJ_;
+ }
+ get #ZW_‍_J() {
+ return this.#ZW_‍_J_;
+ }
+; m() { return 42; }
+ $(value) {
+ this.#$_ = value;
+ return this.#$;
+ }
+ _(value) {
+ this.#__ = value;
+ return this.#_;
+ }
+ \u{6F}(value) {
+ this.#\u{6F}_ = value;
+ return this.#\u{6F};
+ }
+ ℘(value) {
+ this.#℘_ = value;
+ return this.#℘;
+ }
+ ZW_‌_NJ(value) {
+ this.#ZW_‌_NJ_ = value;
+ return this.#ZW_‌_NJ;
+ }
+ ZW_‍_J(value) {
+ this.#ZW_‍_J_ = value;
+ return this.#ZW_‍_J;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.℘(1), 1);
+assert.sameValue(c.ZW_‌_NJ(1), 1);
+assert.sameValue(c.ZW_‍_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-method-rs-private-getter.js b/js/src/tests/test262/language/statements/class/elements/same-line-method-rs-private-getter.js
new file mode 100644
index 0000000000..8698f33905
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-method-rs-private-getter.js
@@ -0,0 +1,128 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-getter.case
+// - src/class-elements/productions/cls-decl-same-line-method.template
+/*---
+description: Valid PrivateName as private getter (field definitions followed by a method in the same line)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ...
+ get ClassElementName ( ){ FunctionBody }
+ ...
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ #$_; #__; #\u{6F}_; #\u2118_; #ZW_\u200C_NJ_; #ZW_\u200D_J_;
+ get #$() {
+ return this.#$_;
+ }
+ get #_() {
+ return this.#__;
+ }
+ get #\u{6F}() {
+ return this.#\u{6F}_;
+ }
+ get #\u2118() {
+ return this.#\u2118_;
+ }
+ get #ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ_;
+ }
+ get #ZW_\u200D_J() {
+ return this.#ZW_\u200D_J_;
+ }
+; m() { return 42; }
+ $(value) {
+ this.#$_ = value;
+ return this.#$;
+ }
+ _(value) {
+ this.#__ = value;
+ return this.#_;
+ }
+ \u{6F}(value) {
+ this.#\u{6F}_ = value;
+ return this.#\u{6F};
+ }
+ \u2118(value) {
+ this.#\u2118_ = value;
+ return this.#\u2118;
+ }
+ ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ_ = value;
+ return this.#ZW_\u200C_NJ;
+ }
+ ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J_ = value;
+ return this.#ZW_\u200D_J;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.\u2118(1), 1);
+assert.sameValue(c.ZW_\u200C_NJ(1), 1);
+assert.sameValue(c.ZW_\u200D_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-method-rs-private-method-alt.js b/js/src/tests/test262/language/statements/class/elements/same-line-method-rs-private-method-alt.js
new file mode 100644
index 0000000000..18d7aa16d2
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-method-rs-private-method-alt.js
@@ -0,0 +1,127 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-method-alt.case
+// - src/class-elements/productions/cls-decl-same-line-method.template
+/*---
+description: Valid PrivateName as private method (field definitions followed by a method in the same line)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ClassElementName ( UniqueFormalParameters ) { FunctionBody }
+ ...
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ #$_; #__; #\u{6F}_; #℘_; #ZW_‌_NJ_; #ZW_‍_J_;
+ #$() {
+ return this.#$_;
+ }
+ #_() {
+ return this.#__;
+ }
+ #\u{6F}() {
+ return this.#\u{6F}_;
+ }
+ #℘() {
+ return this.#℘_;
+ }
+ #ZW_‌_NJ() {
+ return this.#ZW_‌_NJ_;
+ }
+ #ZW_‍_J() {
+ return this.#ZW_‍_J_;
+ }
+; m() { return 42; }
+ $(value) {
+ this.#$_ = value;
+ return this.#$();
+ }
+ _(value) {
+ this.#__ = value;
+ return this.#_();
+ }
+ \u{6F}(value) {
+ this.#\u{6F}_ = value;
+ return this.#\u{6F}();
+ }
+ ℘(value) {
+ this.#℘_ = value;
+ return this.#℘();
+ }
+ ZW_‌_NJ(value) {
+ this.#ZW_‌_NJ_ = value;
+ return this.#ZW_‌_NJ();
+ }
+ ZW_‍_J(value) {
+ this.#ZW_‍_J_ = value;
+ return this.#ZW_‍_J();
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.℘(1), 1);
+assert.sameValue(c.ZW_‌_NJ(1), 1);
+assert.sameValue(c.ZW_‍_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-method-rs-private-method.js b/js/src/tests/test262/language/statements/class/elements/same-line-method-rs-private-method.js
new file mode 100644
index 0000000000..85cff2317b
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-method-rs-private-method.js
@@ -0,0 +1,127 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-method.case
+// - src/class-elements/productions/cls-decl-same-line-method.template
+/*---
+description: Valid PrivateName as private method (field definitions followed by a method in the same line)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ClassElementName ( UniqueFormalParameters ) { FunctionBody }
+ ...
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ #$_; #__; #\u{6F}_; #\u2118_; #ZW_\u200C_NJ_; #ZW_\u200D_J_;
+ #$() {
+ return this.#$_;
+ }
+ #_() {
+ return this.#__;
+ }
+ #\u{6F}() {
+ return this.#\u{6F}_;
+ }
+ #\u2118() {
+ return this.#\u2118_;
+ }
+ #ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ_;
+ }
+ #ZW_\u200D_J() {
+ return this.#ZW_\u200D_J_;
+ }
+; m() { return 42; }
+ $(value) {
+ this.#$_ = value;
+ return this.#$();
+ }
+ _(value) {
+ this.#__ = value;
+ return this.#_();
+ }
+ \u{6F}(value) {
+ this.#\u{6F}_ = value;
+ return this.#\u{6F}();
+ }
+ \u2118(value) {
+ this.#\u2118_ = value;
+ return this.#\u2118();
+ }
+ ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ_ = value;
+ return this.#ZW_\u200C_NJ();
+ }
+ ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J_ = value;
+ return this.#ZW_\u200D_J();
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.\u2118(1), 1);
+assert.sameValue(c.ZW_\u200C_NJ(1), 1);
+assert.sameValue(c.ZW_\u200D_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-method-rs-private-setter-alt.js b/js/src/tests/test262/language/statements/class/elements/same-line-method-rs-private-setter-alt.js
new file mode 100644
index 0000000000..c6d74ba3f4
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-method-rs-private-setter-alt.js
@@ -0,0 +1,127 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-setter-alt.case
+// - src/class-elements/productions/cls-decl-same-line-method.template
+/*---
+description: Valid PrivateName as private setter (field definitions followed by a method in the same line)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ...
+ set ClassElementName ( PropertySetParameterList ) { FunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ #$_; #__; #\u{6F}_; #℘_; #ZW_‌_NJ_; #ZW_‍_J_;
+ set #$(value) {
+ this.#$_ = value;
+ }
+ set #_(value) {
+ this.#__ = value;
+ }
+ set #\u{6F}(value) {
+ this.#\u{6F}_ = value;
+ }
+ set #℘(value) {
+ this.#℘_ = value;
+ }
+ set #ZW_‌_NJ(value) {
+ this.#ZW_‌_NJ_ = value;
+ }
+ set #ZW_‍_J(value) {
+ this.#ZW_‍_J_ = value;
+ }
+; m() { return 42; }
+ $(value) {
+ this.#$ = value;
+ return this.#$_;
+ }
+ _(value) {
+ this.#_ = value;
+ return this.#__;
+ }
+ \u{6F}(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F}_;
+ }
+ ℘(value) {
+ this.#℘ = value;
+ return this.#℘_;
+ }
+ ZW_‌_NJ(value) {
+ this.#ZW_‌_NJ = value;
+ return this.#ZW_‌_NJ_;
+ }
+ ZW_‍_J(value) {
+ this.#ZW_‍_J = value;
+ return this.#ZW_‍_J_;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.℘(1), 1);
+assert.sameValue(c.ZW_‌_NJ(1), 1);
+assert.sameValue(c.ZW_‍_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-method-rs-private-setter.js b/js/src/tests/test262/language/statements/class/elements/same-line-method-rs-private-setter.js
new file mode 100644
index 0000000000..b626dbbe6c
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-method-rs-private-setter.js
@@ -0,0 +1,127 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-setter.case
+// - src/class-elements/productions/cls-decl-same-line-method.template
+/*---
+description: Valid PrivateName as private setter (field definitions followed by a method in the same line)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ...
+ set ClassElementName ( PropertySetParameterList ) { FunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ #$_; #__; #\u{6F}_; #\u2118_; #ZW_\u200C_NJ_; #ZW_\u200D_J_;
+ set #$(value) {
+ this.#$_ = value;
+ }
+ set #_(value) {
+ this.#__ = value;
+ }
+ set #\u{6F}(value) {
+ this.#\u{6F}_ = value;
+ }
+ set #\u2118(value) {
+ this.#\u2118_ = value;
+ }
+ set #ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ_ = value;
+ }
+ set #ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J_ = value;
+ }
+; m() { return 42; }
+ $(value) {
+ this.#$ = value;
+ return this.#$_;
+ }
+ _(value) {
+ this.#_ = value;
+ return this.#__;
+ }
+ \u{6F}(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F}_;
+ }
+ \u2118(value) {
+ this.#\u2118 = value;
+ return this.#\u2118_;
+ }
+ ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ = value;
+ return this.#ZW_\u200C_NJ_;
+ }
+ ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J = value;
+ return this.#ZW_\u200D_J_;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.\u2118(1), 1);
+assert.sameValue(c.ZW_\u200C_NJ(1), 1);
+assert.sameValue(c.ZW_\u200D_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-method-rs-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/same-line-method-rs-privatename-identifier-alt.js
new file mode 100644
index 0000000000..305a538f48
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-method-rs-privatename-identifier-alt.js
@@ -0,0 +1,109 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-same-line-method.template
+/*---
+description: Valid PrivateName (field definitions followed by a method in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ #$; #_; #\u{6F}; #℘; #ZW_‌_NJ; #ZW_‍_J; m() { return 42; }
+ $(value) {
+ this.#$ = value;
+ return this.#$;
+ }
+ _(value) {
+ this.#_ = value;
+ return this.#_;
+ }
+ \u{6F}(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F};
+ }
+ ℘(value) {
+ this.#℘ = value;
+ return this.#℘;
+ }
+ ZW_‌_NJ(value) {
+ this.#ZW_‌_NJ = value;
+ return this.#ZW_‌_NJ;
+ }
+ ZW_‍_J(value) {
+ this.#ZW_‍_J = value;
+ return this.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.℘(1), 1);
+assert.sameValue(c.ZW_‌_NJ(1), 1);
+assert.sameValue(c.ZW_‍_J(1), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-method-rs-privatename-identifier-initializer-alt.js b/js/src/tests/test262/language/statements/class/elements/same-line-method-rs-privatename-identifier-initializer-alt.js
new file mode 100644
index 0000000000..a560f28089
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-method-rs-privatename-identifier-initializer-alt.js
@@ -0,0 +1,103 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-privatename-identifier-initializer-alt.case
+// - src/class-elements/productions/cls-decl-same-line-method.template
+/*---
+description: Valid PrivateName (field definitions followed by a method in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ #$ = 1; #_ = 1; #\u{6F} = 1; #℘ = 1; #ZW_‌_NJ = 1; #ZW_‍_J = 1; m() { return 42; }
+ $() {
+ return this.#$;
+ }
+ _() {
+ return this.#_;
+ }
+ \u{6F}() {
+ return this.#\u{6F};
+ }
+ ℘() {
+ return this.#℘;
+ }
+ ZW_‌_NJ() {
+ return this.#ZW_‌_NJ;
+ }
+ ZW_‍_J() {
+ return this.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(), 1);
+assert.sameValue(c._(), 1);
+assert.sameValue(c.\u{6F}(), 1);
+assert.sameValue(c.℘(), 1);
+assert.sameValue(c.ZW_‌_NJ(), 1);
+assert.sameValue(c.ZW_‍_J(), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-method-rs-privatename-identifier-initializer.js b/js/src/tests/test262/language/statements/class/elements/same-line-method-rs-privatename-identifier-initializer.js
new file mode 100644
index 0000000000..370cd34157
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-method-rs-privatename-identifier-initializer.js
@@ -0,0 +1,103 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-privatename-identifier-initializer.case
+// - src/class-elements/productions/cls-decl-same-line-method.template
+/*---
+description: Valid PrivateName (field definitions followed by a method in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ #$ = 1; #_ = 1; #\u{6F} = 1; #\u2118 = 1; #ZW_\u200C_NJ = 1; #ZW_\u200D_J = 1; m() { return 42; }
+ $() {
+ return this.#$;
+ }
+ _() {
+ return this.#_;
+ }
+ \u{6F}() {
+ return this.#\u{6F};
+ }
+ \u2118() {
+ return this.#\u2118;
+ }
+ ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ;
+ }
+ ZW_\u200D_J() {
+ return this.#ZW_\u200D_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(), 1);
+assert.sameValue(c._(), 1);
+assert.sameValue(c.\u{6F}(), 1);
+assert.sameValue(c.\u2118(), 1);
+assert.sameValue(c.ZW_\u200C_NJ(), 1);
+assert.sameValue(c.ZW_\u200D_J(), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-method-rs-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/same-line-method-rs-privatename-identifier.js
new file mode 100644
index 0000000000..026bb6e756
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-method-rs-privatename-identifier.js
@@ -0,0 +1,109 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-same-line-method.template
+/*---
+description: Valid PrivateName (field definitions followed by a method in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ #$; #_; #\u{6F}; #\u2118; #ZW_\u200C_NJ; #ZW_\u200D_J; m() { return 42; }
+ $(value) {
+ this.#$ = value;
+ return this.#$;
+ }
+ _(value) {
+ this.#_ = value;
+ return this.#_;
+ }
+ \u{6F}(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F};
+ }
+ \u2118(value) {
+ this.#\u2118 = value;
+ return this.#\u2118;
+ }
+ ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ = value;
+ return this.#ZW_\u200C_NJ;
+ }
+ ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J = value;
+ return this.#ZW_\u200D_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.\u2118(1), 1);
+assert.sameValue(c.ZW_\u200C_NJ(1), 1);
+assert.sameValue(c.ZW_\u200D_J(1), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-method-rs-static-async-generator-method-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/same-line-method-rs-static-async-generator-method-privatename-identifier-alt.js
new file mode 100644
index 0000000000..d001e108f3
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-method-rs-static-async-generator-method-privatename-identifier-alt.js
@@ -0,0 +1,134 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-async-generator-method-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-same-line-method.template
+/*---
+description: Valid Static AsyncGeneratorMethod PrivateName (field definitions followed by a method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static async * #$(value) {
+ yield * await value;
+ }
+ static async * #_(value) {
+ yield * await value;
+ }
+ static async * #o(value) {
+ yield * await value;
+ }
+ static async * #℘(value) {
+ yield * await value;
+ }
+ static async * #ZW_‌_NJ(value) {
+ yield * await value;
+ }
+ static async * #ZW_‍_J(value) {
+ yield * await value;
+ }; m() { return 42; }
+ static get $() {
+ return this.#$;
+ }
+ static get _() {
+ return this.#_;
+ }
+ static get o() {
+ return this.#o;
+ }
+ static get ℘() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#℘;
+ }
+ static get ZW_‌_NJ() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‌_NJ;
+ }
+ static get ZW_‍_J() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‍_J;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+Promise.all([
+ C.$([1]).next(),
+ C._([1]).next(),
+ C.o([1]).next(),
+ C.℘([1]).next(), // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.ZW_‌_NJ([1]).next(), // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.ZW_‍_J([1]).next(), // DO NOT CHANGE THE NAME OF THIS FIELD
+]).then(results => {
+
+ assert.sameValue(results[0].value, 1);
+ assert.sameValue(results[1].value, 1);
+ assert.sameValue(results[2].value, 1);
+ assert.sameValue(results[3].value, 1);
+ assert.sameValue(results[4].value, 1);
+ assert.sameValue(results[5].value, 1);
+
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-method-rs-static-async-generator-method-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/same-line-method-rs-static-async-generator-method-privatename-identifier.js
new file mode 100644
index 0000000000..5da3af0260
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-method-rs-static-async-generator-method-privatename-identifier.js
@@ -0,0 +1,135 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-async-generator-method-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-same-line-method.template
+/*---
+description: Valid Static AsyncGeneratorMethod PrivateName (field definitions followed by a method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static async * #$(value) {
+ yield * await value;
+ }
+ static async * #_(value) {
+ yield * await value;
+ }
+ static async * #\u{6F}(value) {
+ yield * await value;
+ }
+ static async * #\u2118(value) {
+ yield * await value;
+ }
+ static async * #ZW_\u200C_NJ(value) {
+ yield * await value;
+ }
+ static async * #ZW_\u200D_J(value) {
+ yield * await value;
+ }; m() { return 42; }
+ static get $() {
+ return this.#$;
+ }
+ static get _() {
+ return this.#_;
+ }
+ static get \u{6F}() {
+ return this.#\u{6F};
+ }
+ static get \u2118() {
+ return this.#\u2118;
+ }
+ static get ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ;
+ }
+ static get ZW_\u200D_J() {
+ return this.#ZW_\u200D_J;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+Promise.all([
+ C.$([1]).next(),
+ C._([1]).next(),
+ C.\u{6F}([1]).next(),
+ C.\u2118([1]).next(),
+ C.ZW_\u200C_NJ([1]).next(),
+ C.ZW_\u200D_J([1]).next(),
+]).then(results => {
+
+ assert.sameValue(results[0].value, 1);
+ assert.sameValue(results[1].value, 1);
+ assert.sameValue(results[2].value, 1);
+ assert.sameValue(results[3].value, 1);
+ assert.sameValue(results[4].value, 1);
+ assert.sameValue(results[5].value, 1);
+
+}).then($DONE, $DONE);
+
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-method-rs-static-async-method-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/same-line-method-rs-static-async-method-privatename-identifier-alt.js
new file mode 100644
index 0000000000..3d0f4dffea
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-method-rs-static-async-method-privatename-identifier-alt.js
@@ -0,0 +1,134 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-async-method-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-same-line-method.template
+/*---
+description: Valid Static AsyncMethod PrivateName (field definitions followed by a method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ AsyncMethod
+
+ AsyncMethod :
+ async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static async #$(value) {
+ return await value;
+ }
+ static async #_(value) {
+ return await value;
+ }
+ static async #o(value) {
+ return await value;
+ }
+ static async #℘(value) {
+ return await value;
+ }
+ static async #ZW_‌_NJ(value) {
+ return await value;
+ }
+ static async #ZW_‍_J(value) {
+ return await value;
+ }; m() { return 42; }
+ static async $(value) {
+ return await this.#$(value);
+ }
+ static async _(value) {
+ return await this.#_(value);
+ }
+ static async o(value) {
+ return await this.#o(value);
+ }
+ static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return await this.#℘(value);
+ }
+ static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return await this.#ZW_‌_NJ(value);
+ }
+ static async ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return await this.#ZW_‍_J(value);
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+Promise.all([
+ C.$(1),
+ C._(1),
+ C.o(1),
+ C.℘(1), // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.ZW_‌_NJ(1), // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.ZW_‍_J(1), // DO NOT CHANGE THE NAME OF THIS FIELD
+]).then(results => {
+
+ assert.sameValue(results[0], 1);
+ assert.sameValue(results[1], 1);
+ assert.sameValue(results[2], 1);
+ assert.sameValue(results[3], 1);
+ assert.sameValue(results[4], 1);
+ assert.sameValue(results[5], 1);
+
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-method-rs-static-async-method-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/same-line-method-rs-static-async-method-privatename-identifier.js
new file mode 100644
index 0000000000..ab5ea4157e
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-method-rs-static-async-method-privatename-identifier.js
@@ -0,0 +1,135 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-async-method-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-same-line-method.template
+/*---
+description: Valid Static AsyncMethod PrivateName (field definitions followed by a method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public]
+flags: [generated, async]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ AsyncMethod
+
+ AsyncMethod :
+ async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static async #$(value) {
+ return await value;
+ }
+ static async #_(value) {
+ return await value;
+ }
+ static async #\u{6F}(value) {
+ return await value;
+ }
+ static async #\u2118(value) {
+ return await value;
+ }
+ static async #ZW_\u200C_NJ(value) {
+ return await value;
+ }
+ static async #ZW_\u200D_J(value) {
+ return await value;
+ }; m() { return 42; }
+ static async $(value) {
+ return await this.#$(value);
+ }
+ static async _(value) {
+ return await this.#_(value);
+ }
+ static async \u{6F}(value) {
+ return await this.#\u{6F}(value);
+ }
+ static async \u2118(value) {
+ return await this.#\u2118(value);
+ }
+ static async ZW_\u200C_NJ(value) {
+ return await this.#ZW_\u200C_NJ(value);
+ }
+ static async ZW_\u200D_J(value) {
+ return await this.#ZW_\u200D_J(value);
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+Promise.all([
+ C.$(1),
+ C._(1),
+ C.\u{6F}(1),
+ C.\u2118(1),
+ C.ZW_\u200C_NJ(1),
+ C.ZW_\u200D_J(1),
+]).then(results => {
+
+ assert.sameValue(results[0], 1);
+ assert.sameValue(results[1], 1);
+ assert.sameValue(results[2], 1);
+ assert.sameValue(results[3], 1);
+ assert.sameValue(results[4], 1);
+ assert.sameValue(results[5], 1);
+
+}).then($DONE, $DONE);
+
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-method-rs-static-generator-method-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/same-line-method-rs-static-generator-method-privatename-identifier-alt.js
new file mode 100644
index 0000000000..b2fb9a471b
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-method-rs-static-generator-method-privatename-identifier-alt.js
@@ -0,0 +1,124 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-generator-method-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-same-line-method.template
+/*---
+description: Valid Static GeneratorMethod PrivateName (field definitions followed by a method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ GeneratorMethod
+
+ GeneratorMethod :
+ * ClassElementName ( UniqueFormalParameters ){ GeneratorBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static * #$(value) {
+ yield * value;
+ }
+ static * #_(value) {
+ yield * value;
+ }
+ static * #o(value) {
+ yield * value;
+ }
+ static * #℘(value) {
+ yield * value;
+ }
+ static * #ZW_‌_NJ(value) {
+ yield * value;
+ }
+ static * #ZW_‍_J(value) {
+ yield * value;
+ }; m() { return 42; }
+ static get $() {
+ return this.#$;
+ }
+ static get _() {
+ return this.#_;
+ }
+ static get o() {
+ return this.#o;
+ }
+ static get ℘() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#℘;
+ }
+ static get ZW_‌_NJ() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‌_NJ;
+ }
+ static get ZW_‍_J() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‍_J;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$([1]).next().value, 1);
+assert.sameValue(C._([1]).next().value, 1);
+assert.sameValue(C.o([1]).next().value, 1);
+assert.sameValue(C.℘([1]).next().value, 1);
+assert.sameValue(C.ZW_‌_NJ([1]).next().value, 1);
+assert.sameValue(C.ZW_‍_J([1]).next().value, 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-method-rs-static-generator-method-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/same-line-method-rs-static-generator-method-privatename-identifier.js
new file mode 100644
index 0000000000..610ae1f044
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-method-rs-static-generator-method-privatename-identifier.js
@@ -0,0 +1,125 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-generator-method-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-same-line-method.template
+/*---
+description: Valid Static GeneratorMethod PrivateName (field definitions followed by a method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ GeneratorMethod
+
+ GeneratorMethod :
+ * ClassElementName ( UniqueFormalParameters ){ GeneratorBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static * #$(value) {
+ yield * value;
+ }
+ static * #_(value) {
+ yield * value;
+ }
+ static * #\u{6F}(value) {
+ yield * value;
+ }
+ static * #\u2118(value) {
+ yield * value;
+ }
+ static * #ZW_\u200C_NJ(value) {
+ yield * value;
+ }
+ static * #ZW_\u200D_J(value) {
+ yield * value;
+ }; m() { return 42; }
+ static get $() {
+ return this.#$;
+ }
+ static get _() {
+ return this.#_;
+ }
+ static get \u{6F}() {
+ return this.#\u{6F};
+ }
+ static get \u2118() {
+ return this.#\u2118;
+ }
+ static get ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ;
+ }
+ static get ZW_\u200D_J() {
+ return this.#ZW_\u200D_J;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$([1]).next().value, 1);
+assert.sameValue(C._([1]).next().value, 1);
+assert.sameValue(C.\u{6F}([1]).next().value, 1);
+assert.sameValue(C.\u2118([1]).next().value, 1);
+assert.sameValue(C.ZW_\u200C_NJ([1]).next().value, 1);
+assert.sameValue(C.ZW_\u200D_J([1]).next().value, 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-method-rs-static-method-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/same-line-method-rs-static-method-privatename-identifier-alt.js
new file mode 100644
index 0000000000..c37597597d
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-method-rs-static-method-privatename-identifier-alt.js
@@ -0,0 +1,122 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-method-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-same-line-method.template
+/*---
+description: Valid Static Method PrivateName (field definitions followed by a method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ ClassElementName ( UniqueFormalParameters ){ FunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static #$(value) {
+ return value;
+ }
+ static #_(value) {
+ return value;
+ }
+ static #o(value) {
+ return value;
+ }
+ static #℘(value) {
+ return value;
+ }
+ static #ZW_‌_NJ(value) {
+ return value;
+ }
+ static #ZW_‍_J(value) {
+ return value;
+ }; m() { return 42; }
+ static $(value) {
+ return this.#$(value);
+ }
+ static _(value) {
+ return this.#_(value);
+ }
+ static o(value) {
+ return this.#o(value);
+ }
+ static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#℘(value);
+ }
+ static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‌_NJ(value);
+ }
+ static ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‍_J(value);
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(1), 1);
+assert.sameValue(C._(1), 1);
+assert.sameValue(C.o(1), 1);
+assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+assert.sameValue(C.ZW_‌_NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+assert.sameValue(C.ZW_‍_J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-method-rs-static-method-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/same-line-method-rs-static-method-privatename-identifier.js
new file mode 100644
index 0000000000..f169846a04
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-method-rs-static-method-privatename-identifier.js
@@ -0,0 +1,122 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-method-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-same-line-method.template
+/*---
+description: Valid Static Method PrivateName (field definitions followed by a method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ ClassElementName ( UniqueFormalParameters ){ FunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static #$(value) {
+ return value;
+ }
+ static #_(value) {
+ return value;
+ }
+ static #\u{6F}(value) {
+ return value;
+ }
+ static #\u2118(value) {
+ return value;
+ }
+ static #ZW_\u200C_NJ(value) {
+ return value;
+ }
+ static #ZW_\u200D_J(value) {
+ return value;
+ }; m() { return 42; }
+ static $(value) {
+ return this.#$(value);
+ }
+ static _(value) {
+ return this.#_(value);
+ }
+ static \u{6F}(value) {
+ return this.#\u{6F}(value);
+ }
+ static \u2118(value) {
+ return this.#\u2118(value);
+ }
+ static ZW_\u200C_NJ(value) {
+ return this.#ZW_\u200C_NJ(value);
+ }
+ static ZW_\u200D_J(value) {
+ return this.#ZW_\u200D_J(value);
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(1), 1);
+assert.sameValue(C._(1), 1);
+assert.sameValue(C.\u{6F}(1), 1);
+assert.sameValue(C.\u2118(1), 1);
+assert.sameValue(C.ZW_\u200C_NJ(1), 1);
+assert.sameValue(C.ZW_\u200D_J(1), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-method-rs-static-privatename-identifier-alt-by-classname.js b/js/src/tests/test262/language/statements/class/elements/same-line-method-rs-static-privatename-identifier-alt-by-classname.js
new file mode 100644
index 0000000000..b0ddf9a34e
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-method-rs-static-privatename-identifier-alt-by-classname.js
@@ -0,0 +1,110 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-alt-by-classname.case
+// - src/class-elements/productions/cls-decl-same-line-method.template
+/*---
+description: Valid Static PrivateName (field definitions followed by a method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_‍_J; m() { return 42; }
+ static $(value) {
+ C.#$ = value;
+ return C.#$;
+ }
+ static _(value) {
+ C.#_ = value;
+ return C.#_;
+ }
+ static o(value) {
+ C.#\u{6F} = value;
+ return C.#\u{6F};
+ }
+ static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.#℘ = value;
+ return C.#℘;
+ }
+ static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.#ZW_‌_NJ = value;
+ return C.#ZW_‌_NJ;
+ }
+ static ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.#ZW_‍_J = value;
+ return C.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(1), 1);
+assert.sameValue(C._(1), 1);
+assert.sameValue(C.o(1), 1);
+assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+assert.sameValue(C.ZW_‌_NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+assert.sameValue(C.ZW_‍_J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-method-rs-static-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/same-line-method-rs-static-privatename-identifier-alt.js
new file mode 100644
index 0000000000..2cc1ad9a75
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-method-rs-static-privatename-identifier-alt.js
@@ -0,0 +1,110 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-same-line-method.template
+/*---
+description: Valid Static PrivateName (field definitions followed by a method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_‍_J; m() { return 42; }
+ static $(value) {
+ this.#$ = value;
+ return this.#$;
+ }
+ static _(value) {
+ this.#_ = value;
+ return this.#_;
+ }
+ static o(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F};
+ }
+ static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ this.#℘ = value;
+ return this.#℘;
+ }
+ static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ this.#ZW_‌_NJ = value;
+ return this.#ZW_‌_NJ;
+ }
+ static ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ this.#ZW_‍_J = value;
+ return this.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(1), 1);
+assert.sameValue(C._(1), 1);
+assert.sameValue(C.o(1), 1);
+assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+assert.sameValue(C.ZW_‌_NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+assert.sameValue(C.ZW_‍_J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-method-rs-static-privatename-identifier-by-classname.js b/js/src/tests/test262/language/statements/class/elements/same-line-method-rs-static-privatename-identifier-by-classname.js
new file mode 100644
index 0000000000..5c113a6763
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-method-rs-static-privatename-identifier-by-classname.js
@@ -0,0 +1,110 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-by-classname.case
+// - src/class-elements/productions/cls-decl-same-line-method.template
+/*---
+description: Valid Static PrivateName (field definitions followed by a method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J; m() { return 42; }
+ static $(value) {
+ C.#$ = value;
+ return C.#$;
+ }
+ static _(value) {
+ C.#_ = value;
+ return C.#_;
+ }
+ static \u{6F}(value) {
+ C.#\u{6F} = value;
+ return C.#\u{6F};
+ }
+ static \u2118(value) {
+ C.#\u2118 = value;
+ return C.#\u2118;
+ }
+ static ZW_\u200C_NJ(value) {
+ C.#ZW_\u200C_NJ = value;
+ return C.#ZW_\u200C_NJ;
+ }
+ static ZW_\u200D_J(value) {
+ C.#ZW_\u200D_J = value;
+ return C.#ZW_\u200D_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(1), 1);
+assert.sameValue(C._(1), 1);
+assert.sameValue(C.\u{6F}(1), 1);
+assert.sameValue(C.\u2118(1), 1);
+assert.sameValue(C.ZW_\u200C_NJ(1), 1);
+assert.sameValue(C.ZW_\u200D_J(1), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-method-rs-static-privatename-identifier-initializer-alt-by-classname.js b/js/src/tests/test262/language/statements/class/elements/same-line-method-rs-static-privatename-identifier-initializer-alt-by-classname.js
new file mode 100644
index 0000000000..b99b7b6fb7
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-method-rs-static-privatename-identifier-initializer-alt-by-classname.js
@@ -0,0 +1,104 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-initializer-alt-by-classname.case
+// - src/class-elements/productions/cls-decl-same-line-method.template
+/*---
+description: Valid Static PrivateName (field definitions followed by a method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_‍_J = 1; m() { return 42; }
+ static $() {
+ return C.#$;
+ }
+ static _() {
+ return C.#_;
+ }
+ static \u{6F}() {
+ return C.#\u{6F};
+ }
+ static ℘() {
+ return C.#℘;
+ }
+ static ZW_‌_NJ() {
+ return C.#ZW_‌_NJ;
+ }
+ static ZW_‍_J() {
+ return C.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(), 1);
+assert.sameValue(C._(), 1);
+assert.sameValue(C.\u{6F}(), 1);
+assert.sameValue(C.℘(), 1);
+assert.sameValue(C.ZW_‌_NJ(), 1);
+assert.sameValue(C.ZW_‍_J(), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-method-rs-static-privatename-identifier-initializer-alt.js b/js/src/tests/test262/language/statements/class/elements/same-line-method-rs-static-privatename-identifier-initializer-alt.js
new file mode 100644
index 0000000000..726b917af6
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-method-rs-static-privatename-identifier-initializer-alt.js
@@ -0,0 +1,104 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-initializer-alt.case
+// - src/class-elements/productions/cls-decl-same-line-method.template
+/*---
+description: Valid Static PrivateName (field definitions followed by a method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_‍_J = 1; m() { return 42; }
+ static $() {
+ return this.#$;
+ }
+ static _() {
+ return this.#_;
+ }
+ static \u{6F}() {
+ return this.#\u{6F};
+ }
+ static ℘() {
+ return this.#℘;
+ }
+ static ZW_‌_NJ() {
+ return this.#ZW_‌_NJ;
+ }
+ static ZW_‍_J() {
+ return this.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(), 1);
+assert.sameValue(C._(), 1);
+assert.sameValue(C.\u{6F}(), 1);
+assert.sameValue(C.℘(), 1);
+assert.sameValue(C.ZW_‌_NJ(), 1);
+assert.sameValue(C.ZW_‍_J(), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-method-rs-static-privatename-identifier-initializer.js b/js/src/tests/test262/language/statements/class/elements/same-line-method-rs-static-privatename-identifier-initializer.js
new file mode 100644
index 0000000000..dc6cc0adc8
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-method-rs-static-privatename-identifier-initializer.js
@@ -0,0 +1,104 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-initializer.case
+// - src/class-elements/productions/cls-decl-same-line-method.template
+/*---
+description: Valid Static PrivateName (field definitions followed by a method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #\u2118 = 1; static #ZW_\u200C_NJ = 1; static #ZW_\u200D_J = 1; m() { return 42; }
+ static $() {
+ return this.#$;
+ }
+ static _() {
+ return this.#_;
+ }
+ static \u{6F}() {
+ return this.#\u{6F};
+ }
+ static \u2118() {
+ return this.#\u2118;
+ }
+ static ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ;
+ }
+ static ZW_\u200D_J() {
+ return this.#ZW_\u200D_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(), 1);
+assert.sameValue(C._(), 1);
+assert.sameValue(C.\u{6F}(), 1);
+assert.sameValue(C.\u2118(), 1);
+assert.sameValue(C.ZW_\u200C_NJ(), 1);
+assert.sameValue(C.ZW_\u200D_J(), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-method-rs-static-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/same-line-method-rs-static-privatename-identifier.js
new file mode 100644
index 0000000000..eeedf66852
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-method-rs-static-privatename-identifier.js
@@ -0,0 +1,110 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-same-line-method.template
+/*---
+description: Valid Static PrivateName (field definitions followed by a method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J; m() { return 42; }
+ static $(value) {
+ this.#$ = value;
+ return this.#$;
+ }
+ static _(value) {
+ this.#_ = value;
+ return this.#_;
+ }
+ static \u{6F}(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F};
+ }
+ static \u2118(value) {
+ this.#\u2118 = value;
+ return this.#\u2118;
+ }
+ static ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ = value;
+ return this.#ZW_\u200C_NJ;
+ }
+ static ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J = value;
+ return this.#ZW_\u200D_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert.sameValue(C.$(1), 1);
+assert.sameValue(C._(1), 1);
+assert.sameValue(C.\u{6F}(1), 1);
+assert.sameValue(C.\u2118(1), 1);
+assert.sameValue(C.ZW_\u200C_NJ(1), 1);
+assert.sameValue(C.ZW_\u200D_J(1), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-method-static-private-fields.js b/js/src/tests/test262/language/statements/class/elements/same-line-method-static-private-fields.js
new file mode 100644
index 0000000000..b829baa278
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-method-static-private-fields.js
@@ -0,0 +1,71 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/static-private-fields.case
+// - src/class-elements/productions/cls-decl-same-line-method.template
+/*---
+description: static private fields (field definitions followed by a method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ static FieldDefinition ;
+
+ FieldDefinition :
+ ClassElementName Initializer_opt
+
+ ClassElementName :
+ PrivateName
+
+ PrivateName :
+ # IdentifierName
+
+---*/
+
+
+class C {
+ static #x; static #y; m() { return 42; }
+ static x() {
+ this.#x = 42;
+ return this.#x;
+ }
+ static y() {
+ this.#y = 43;
+ return this.#y;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+// Test the private fields do not appear as properties before set to value
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#x"), "test 1");
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 2");
+assert(!Object.prototype.hasOwnProperty.call(c, "#x"), "test 3");
+
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#y"), "test 4");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 5");
+assert(!Object.prototype.hasOwnProperty.call(c, "#y"), "test 6");
+
+// Test if private fields can be sucessfully accessed and set to value
+assert.sameValue(C.x(), 42, "test 7");
+assert.sameValue(C.y(), 43, "test 8");
+
+// Test the private fields do not appear as properties before after set to value
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 9");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 10");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-method-static-private-methods-with-fields.js b/js/src/tests/test262/language/statements/class/elements/same-line-method-static-private-methods-with-fields.js
new file mode 100644
index 0000000000..122e89c869
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-method-static-private-methods-with-fields.js
@@ -0,0 +1,88 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/static-private-methods-with-fields.case
+// - src/class-elements/productions/cls-decl-same-line-method.template
+/*---
+description: static private methods with fields (field definitions followed by a method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class-static-fields-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ static FieldDefinition ;
+
+ FieldDefinition :
+ ClassElementName Initializer_opt
+
+ ClassElementName :
+ PrivateName
+
+ PrivateName :
+ # IdentifierName
+
+---*/
+
+
+class C {
+ static #xVal; static #yVal; m() { return 42; }
+ static #x(value) {
+ this.#xVal = value;
+ return this.#xVal;
+ }
+ static #y(value) {
+ this.#yVal = value;
+ return this.#yVal;
+ }
+ static x() {
+ return this.#x(42);
+ }
+ static y() {
+ return this.#y(43);
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+// Test the private methods do not appear as properties before set to value
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#x"), "test 1");
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 2");
+assert(!Object.prototype.hasOwnProperty.call(c, "#x"), "test 3");
+
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#y"), "test 4");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 5");
+assert(!Object.prototype.hasOwnProperty.call(c, "#y"), "test 6");
+
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#xVal"), "test 7");
+assert(!Object.prototype.hasOwnProperty.call(C, "#xVal"), "test 8");
+assert(!Object.prototype.hasOwnProperty.call(c, "#xVal"), "test 9");
+
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#yVal"), "test 10");
+assert(!Object.prototype.hasOwnProperty.call(C, "#yVal"), "test 11");
+assert(!Object.prototype.hasOwnProperty.call(c, "#yVal"), "test 12");
+
+// Test if private fields can be sucessfully accessed and set to value
+assert.sameValue(C.x(), 42, "test 13");
+assert.sameValue(C.y(), 43, "test 14");
+
+// Test the private fields do not appear as properties before after set to value
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 15");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 16");
+
+assert(!Object.prototype.hasOwnProperty.call(C, "#xVal"), "test 17");
+assert(!Object.prototype.hasOwnProperty.call(C, "#yVal"), "test 18");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-method-static-private-methods.js b/js/src/tests/test262/language/statements/class/elements/same-line-method-static-private-methods.js
new file mode 100644
index 0000000000..23d279092e
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-method-static-private-methods.js
@@ -0,0 +1,75 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/static-private-methods.case
+// - src/class-elements/productions/cls-decl-same-line-method.template
+/*---
+description: static private methods (field definitions followed by a method in the same line)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement :
+ ...
+ static FieldDefinition ;
+
+ FieldDefinition :
+ ClassElementName Initializer_opt
+
+ ClassElementName :
+ PrivateName
+
+ PrivateName :
+ # IdentifierName
+
+---*/
+
+
+class C {
+ ; m() { return 42; }
+ static #x(value) {
+ return value / 2;
+ }
+ static #y(value) {
+ return value * 2;
+ }
+ static x() {
+ return this.#x(84);
+ }
+ static y() {
+ return this.#y(43);
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+// Test the private methods do not appear as properties before set to value
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#x"), "test 1");
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 2");
+assert(!Object.prototype.hasOwnProperty.call(c, "#x"), "test 3");
+
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#y"), "test 4");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 5");
+assert(!Object.prototype.hasOwnProperty.call(c, "#y"), "test 6");
+
+// Test if private fields can be sucessfully accessed and set to value
+assert.sameValue(C.x(), 42, "test 7");
+assert.sameValue(C.y(), 86, "test 8");
+
+// Test the private fields do not appear as properties before after set to value
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 9");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 10");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/same-line-method-string-literal-names.js b/js/src/tests/test262/language/statements/class/elements/same-line-method-string-literal-names.js
new file mode 100644
index 0000000000..bc189fe759
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/same-line-method-string-literal-names.js
@@ -0,0 +1,109 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/string-literal-names.case
+// - src/class-elements/productions/cls-decl-same-line-method.template
+/*---
+description: String literal names (field definitions followed by a method in the same line)
+esid: prod-FieldDefinition
+features: [class-fields-public, class]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement:
+ ...
+ FieldDefinition ;
+
+ FieldDefinition:
+ ClassElementName Initializer_opt
+
+ ClassElementName:
+ PropertyName
+
+---*/
+
+
+class C {
+ 'a'; "b"; 'c' = 39;
+ "d" = 42; m() { return 42; }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.m(), 42);
+assert.sameValue(c.m, C.prototype.m);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "m"),
+ "m doesn't appear as an own property on the C instance"
+);
+
+verifyProperty(C.prototype, "m", {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "a"),
+ "a does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "a"),
+ "a does not appear as an own property on C constructor"
+);
+
+verifyProperty(c, "a", {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "b"),
+ "b does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "b"),
+ "b does not appear as an own property on C constructor"
+);
+
+verifyProperty(c, "b", {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "c"),
+ "c does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "c"),
+ "c does not appear as an own property on C constructor"
+);
+
+verifyProperty(c, "c", {
+ value: 39,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "d"),
+ "d does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "d"),
+ "d does not appear as an own property on C constructor"
+);
+
+verifyProperty(c, "d", {
+ value: 42,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/set-access-of-missing-private-setter.js b/js/src/tests/test262/language/statements/class/elements/set-access-of-missing-private-setter.js
new file mode 100644
index 0000000000..0548a1b526
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/set-access-of-missing-private-setter.js
@@ -0,0 +1,42 @@
+// Copyright (C) 2019 Caio Lima (Igalia SL). All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: Trying to set a private member without setter throws TypeError
+esid: sec-privatefieldset
+info: |
+ PrivateFieldSet ( P, O, value )
+ 1. Assert: P is a Private Name.
+ 2. If O is not an object, throw a TypeError exception.
+ 3. If P.[[Kind]] is "field",
+ a. Let entry be PrivateFieldFind(P, O).
+ b. If entry is empty, throw a TypeError exception.
+ c. Set entry.[[PrivateFieldValue]] to value.
+ d. Return.
+ 4. If P.[[Kind]] is "method", throw a TypeError exception.
+ 5. Else,
+ a. Assert: P.[[Kind]] is "accessor".
+ b. If O.[[PrivateFieldBrands]] does not contain P.[[Brand]], throw a TypeError exception.
+ c. If P does not have a [[Set]] field, throw a TypeError exception.
+ d. Let setter be P.[[Set]].
+ e. Perform ? Call(setter, O, value).
+ f. Return.
+features: [class-methods-private, class]
+---*/
+
+class C {
+ get #f() {
+ throw new Test262Error();
+ }
+
+ setAccess() {
+ this.#f = 'Test262';
+ }
+}
+
+let c = new C();
+assert.throws(TypeError, function() {
+ c.setAccess();
+}, 'set operation on private accessor without setter should throw TypeError');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/set-access-of-missing-private-static-setter.js b/js/src/tests/test262/language/statements/class/elements/set-access-of-missing-private-static-setter.js
new file mode 100644
index 0000000000..cba6b87287
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/set-access-of-missing-private-static-setter.js
@@ -0,0 +1,41 @@
+// Copyright (C) 2021 André Bargull. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: Trying to set a private member without setter throws TypeError
+esid: sec-privatefieldset
+info: |
+ PrivateFieldSet ( P, O, value )
+ 1. Assert: P is a Private Name.
+ 2. If O is not an object, throw a TypeError exception.
+ 3. If P.[[Kind]] is "field",
+ a. Let entry be PrivateFieldFind(P, O).
+ b. If entry is empty, throw a TypeError exception.
+ c. Set entry.[[PrivateFieldValue]] to value.
+ d. Return.
+ 4. If P.[[Kind]] is "method", throw a TypeError exception.
+ 5. Else,
+ a. Assert: P.[[Kind]] is "accessor".
+ b. If O.[[PrivateFieldBrands]] does not contain P.[[Brand]], throw a TypeError exception.
+ c. If P does not have a [[Set]] field, throw a TypeError exception.
+ d. Let setter be P.[[Set]].
+ e. Perform ? Call(setter, O, value).
+ f. Return.
+features: [class-static-methods-private, class]
+---*/
+
+class C {
+ static get #f() {
+ throw new Test262Error();
+ }
+
+ static setAccess() {
+ this.#f = 'Test262';
+ }
+}
+
+assert.throws(TypeError, function() {
+ C.setAccess();
+}, 'set operation on private accessor without setter should throw TypeError');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/set-access-of-missing-shadowed-private-setter.js b/js/src/tests/test262/language/statements/class/elements/set-access-of-missing-shadowed-private-setter.js
new file mode 100644
index 0000000000..9f2657cec9
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/set-access-of-missing-shadowed-private-setter.js
@@ -0,0 +1,92 @@
+// Copyright (C) 2019 Caio Lima (Igalia SL). All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: Trying to set in PrivateName without setter throws TypeError
+esid: sec-privatefieldset
+info: |
+ PrivateFieldSet ( P, O, value )
+ 1. Assert: P is a Private Name.
+ 2. If O is not an object, throw a TypeError exception.
+ 3. If P.[[Kind]] is "field",
+ a. Let entry be PrivateFieldFind(P, O).
+ b. If entry is empty, throw a TypeError exception.
+ c. Set entry.[[PrivateFieldValue]] to value.
+ d. Return.
+ 4. If P.[[Kind]] is "method", throw a TypeError exception.
+ 5. Else,
+ a. Assert: P.[[Kind]] is "accessor".
+ b. If O.[[PrivateFieldBrands]] does not contain P.[[Brand]], throw a TypeError exception.
+ c. If P does not have a [[Set]] field, throw a TypeError exception.
+ d. Let setter be P.[[Set]].
+ e. Perform ? Call(setter, O, value).
+ f. Return.
+features: [class-methods-private, class-fields-public, class]
+---*/
+
+class A {
+ set #f(v) {
+ throw new Test262Error();
+ }
+}
+
+class B extends A {
+ get #f() {
+ throw new Test262Error();
+ }
+
+ setAccess() {
+ this.#f = 'Test262';
+ }
+}
+
+let b = new B();
+assert.throws(TypeError, function() {
+ b.setAccess();
+}, 'subclass private accessor should shadow super class private accessor');
+
+class C {
+ set #f(v) {
+ throw new Test262Error();
+ }
+
+ Inner = class {
+ get #f() {
+ throw new Test262Error();
+ }
+
+ setAccess() {
+ this.#f = 'Test262';
+ }
+ }
+}
+
+let c = new C();
+let innerC = new c.Inner();
+assert.throws(TypeError, function() {
+ innerC.setAccess();
+}, 'inner class private accessor should shadow outer class private accessor');
+
+class D {
+ get #f() {
+ throw new Test262Error();
+ }
+
+ Inner = class {
+ set #f(v) {
+ throw new Test262Error();
+ }
+ }
+
+ setAccess() {
+ this.#f = 'Test262';
+ }
+}
+
+let d = new D();
+assert.throws(TypeError, function() {
+ d.setAccess();
+}, 'inner class private accessor should not be visible to outer class private accessor');
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/set-access-of-private-method.js b/js/src/tests/test262/language/statements/class/elements/set-access-of-private-method.js
new file mode 100644
index 0000000000..13b493274e
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/set-access-of-private-method.js
@@ -0,0 +1,43 @@
+// Copyright (C) 2019 Caio Lima (Igalia SL). All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: Trying to set a private method throws TypeError
+esid: sec-privatefieldset
+info: |
+ PrivateFieldSet ( P, O, value )
+ 1. Assert: P is a Private Name.
+ 2. If O is not an object, throw a TypeError exception.
+ 3. If P.[[Kind]] is "field",
+ a. Let entry be PrivateFieldFind(P, O).
+ b. If entry is empty, throw a TypeError exception.
+ c. Set entry.[[PrivateFieldValue]] to value.
+ d. Return.
+ 4. If P.[[Kind]] is "method", throw a TypeError exception.
+ 5. Else,
+ a. Assert: P.[[Kind]] is "accessor".
+ b. If O.[[PrivateFieldBrands]] does not contain P.[[Brand]], throw a TypeError exception.
+ c. If P does not have a [[Set]] field, throw a TypeError exception.
+ d. Let setter be P.[[Set]].
+ e. Perform ? Call(setter, O, value).
+ f. Return.
+features: [class-methods-private, class]
+---*/
+
+class C {
+ #f() {
+ throw new Test262Error();
+ }
+
+ setAccess() {
+ this.#f = 'Test262';
+ }
+}
+
+let c = new C();
+assert.throws(TypeError, function() {
+ c.setAccess();
+}, 'set operation on private method should throw TypeError');
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/set-access-of-shadowed-private-method.js b/js/src/tests/test262/language/statements/class/elements/set-access-of-shadowed-private-method.js
new file mode 100644
index 0000000000..4a15f281a5
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/set-access-of-shadowed-private-method.js
@@ -0,0 +1,92 @@
+// Copyright (C) 2019 Caio Lima (Igalia SL). All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: Trying to set private method throws TypeError
+esid: sec-privatefieldset
+info: |
+ PrivateFieldSet ( P, O, value )
+ 1. Assert: P is a Private Name.
+ 2. If O is not an object, throw a TypeError exception.
+ 3. If P.[[Kind]] is "field",
+ a. Let entry be PrivateFieldFind(P, O).
+ b. If entry is empty, throw a TypeError exception.
+ c. Set entry.[[PrivateFieldValue]] to value.
+ d. Return.
+ 4. If P.[[Kind]] is "method", throw a TypeError exception.
+ 5. Else,
+ a. Assert: P.[[Kind]] is "accessor".
+ b. If O.[[PrivateFieldBrands]] does not contain P.[[Brand]], throw a TypeError exception.
+ c. If P does not have a [[Set]] field, throw a TypeError exception.
+ d. Let setter be P.[[Set]].
+ e. Perform ? Call(setter, O, value).
+ f. Return.
+features: [class-methods-private, class-fields-public, class]
+---*/
+
+class A {
+ set #f(v) {
+ throw new Test262Error();
+ }
+}
+
+class B extends A {
+ #f() {
+ throw new Test262Error();
+ }
+
+ setAccess() {
+ this.#f = 'Test262';
+ }
+}
+
+let b = new B();
+assert.throws(TypeError, function() {
+ b.setAccess();
+}, 'subclass private method should shadow super class private accessor');
+
+class C {
+ set #f(v) {
+ throw new Test262Error();
+ }
+
+ Inner = class {
+ #f() {
+ throw new Test262Error();
+ }
+
+ setAccess() {
+ this.#f = 'Test262';
+ }
+ }
+}
+
+let c = new C();
+let innerC = new c.Inner();
+assert.throws(TypeError, function() {
+ innerC.setAccess();
+}, 'inner class private method should shadow outer class private accessor');
+
+class D {
+ #f() {
+ throw new Test262Error();
+ }
+
+ Inner = class {
+ set #f(v) {
+ throw new Test262Error();
+ }
+ }
+
+ setAccess() {
+ this.#f = 'Test262';
+ }
+}
+
+let d = new D();
+assert.throws(TypeError, function() {
+ d.setAccess();
+}, 'inner class private accessor should not be visible to outer class');
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/shell.js b/js/src/tests/test262/language/statements/class/elements/shell.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/shell.js
diff --git a/js/src/tests/test262/language/statements/class/elements/static-as-valid-instance-field-assigned.js b/js/src/tests/test262/language/statements/class/elements/static-as-valid-instance-field-assigned.js
new file mode 100644
index 0000000000..7e6f093768
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/static-as-valid-instance-field-assigned.js
@@ -0,0 +1,38 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/static-as-valid-instance-field-assigned.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: static is a valid name of an instance field (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-fields-public, class]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement:
+ ...
+ FieldDefinition ;
+
+ FieldDefinition:
+ ClassElementName Initializer_opt
+
+ ClassElementName:
+ PropertyName
+
+---*/
+
+
+class C {
+ static = "foo";
+}
+
+let c = new C();
+
+verifyProperty(c, "static", {
+ value: "foo",
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/static-as-valid-instance-field.js b/js/src/tests/test262/language/statements/class/elements/static-as-valid-instance-field.js
new file mode 100644
index 0000000000..26bb5b7629
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/static-as-valid-instance-field.js
@@ -0,0 +1,38 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/static-as-valid-instance-field.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: static is a valid name of an instance field (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-fields-public, class]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement:
+ ...
+ FieldDefinition ;
+
+ FieldDefinition:
+ ClassElementName Initializer_opt
+
+ ClassElementName:
+ PropertyName
+
+---*/
+
+
+class C {
+ static;
+}
+
+let c = new C();
+
+verifyProperty(c, "static", {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/static-as-valid-static-field-assigned.js b/js/src/tests/test262/language/statements/class/elements/static-as-valid-static-field-assigned.js
new file mode 100644
index 0000000000..1383f338c0
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/static-as-valid-static-field-assigned.js
@@ -0,0 +1,30 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/static-as-valid-static-field-assigned.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: static is a valid name of a static field (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-static-fields-public, class]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement:
+ ...
+ static FieldDefinition ;
+
+---*/
+
+
+class C {
+ static static = "test262";
+}
+
+verifyProperty(C, "static", {
+ value: "test262",
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/static-as-valid-static-field.js b/js/src/tests/test262/language/statements/class/elements/static-as-valid-static-field.js
new file mode 100644
index 0000000000..88f818f28c
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/static-as-valid-static-field.js
@@ -0,0 +1,30 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/static-as-valid-static-field.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: static is a valid name of a static field (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-static-fields-public, class]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement:
+ ...
+ static FieldDefinition ;
+
+---*/
+
+
+class C {
+ static static;
+}
+
+verifyProperty(C, "static", {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/static-comp-name-init-err-contains-arguments.js b/js/src/tests/test262/language/statements/class/elements/static-comp-name-init-err-contains-arguments.js
new file mode 100644
index 0000000000..eff2ee5b0a
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/static-comp-name-init-err-contains-arguments.js
@@ -0,0 +1,36 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/init-err-contains-arguments.case
+// - src/class-elements/initializer-error/cls-decl-fields-static-comp-name.template
+/*---
+description: Syntax error if `arguments` used in class field (static computed ClassElementName)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-public, class-static-fields-public, computed-property-names]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ FieldDefinition:
+ PropertyNameInitializeropt
+
+ - It is a Syntax Error if ContainsArguments of Initializer is true.
+
+ Static Semantics: ContainsArguments
+ IdentifierReference : Identifier
+
+ 1. If the StringValue of Identifier is "arguments", return true.
+ ...
+ For all other grammatical productions, recurse on all nonterminals. If any piece returns true, then return true. Otherwise return false.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+var x = "string";
+class C {
+ static [x] = arguments;
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/static-comp-name-init-err-contains-super.js b/js/src/tests/test262/language/statements/class/elements/static-comp-name-init-err-contains-super.js
new file mode 100644
index 0000000000..8ea327730f
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/static-comp-name-init-err-contains-super.js
@@ -0,0 +1,29 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/init-err-contains-super.case
+// - src/class-elements/initializer-error/cls-decl-fields-static-comp-name.template
+/*---
+description: Syntax error if `super()` used in class field (static computed ClassElementName)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-public, class-static-fields-public, computed-property-names]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ FieldDefinition:
+ PropertyNameInitializeropt
+
+ - It is a Syntax Error if Initializer is present and Initializer Contains SuperCall is true.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+var x = "string";
+class C {
+ static [x] = super();
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/static-field-anonymous-function-length.js b/js/src/tests/test262/language/statements/class/elements/static-field-anonymous-function-length.js
new file mode 100644
index 0000000000..17c4b304b2
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/static-field-anonymous-function-length.js
@@ -0,0 +1,63 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/static-field-anonymous-function-length.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: Anonymous function in field initilizer have length properly set (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class-static-fields-public, class]
+flags: [generated]
+info: |
+ Updated Productions
+
+ ClassElement :
+ ...
+ static FieldDefinition ;
+
+ FieldDefinition :
+ ClassElementName Initializer_opt
+
+ ClassDefinitionEvaluation:
+ ...
+
+ 27. Let staticFields be a new empty List.
+ 28. For each ClassElement e in order from elements,
+ a. If IsStatic of e is false, then
+ ...
+ b. Else,
+ i. Let field be the result of performing PropertyDefinitionEvaluation for m ClassElementEvaluation for e with arguments F and false.
+ c. If field is an abrupt completion, then
+ ...
+ d. If field is not empty,
+ i. If IsStatic of e is false, append field to instanceFields.
+ ii. Otherwise, append field to staticFields.
+
+ 34. For each item fieldRecord in order from staticFields,
+ a. Perform ? DefineField(F, field).
+ ...
+
+ DefineField(receiver, fieldRecord)
+ 1. Assert: Type(receiver) is Object.
+ 2. Assert: fieldRecord is a Record as created by ClassFieldDefinitionEvaluation.
+ 3. Let name be fieldRecord.[[Name]].
+ 4. Let initializer be fieldRecord.[[Initializer]].
+ 5. If initializer is not empty, then
+ a. Let initValue be ? Call(initializer, receiver).
+ ...
+
+---*/
+
+
+class C {
+ static #field = (a, b) => undefined;
+ static field = function() {};
+
+ static accessPrivateField() {
+ return this.#field;
+ }
+
+}
+
+assert.sameValue(C.accessPrivateField().length, 2);
+assert.sameValue(C.field.length, 0);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/static-field-anonymous-function-name.js b/js/src/tests/test262/language/statements/class/elements/static-field-anonymous-function-name.js
new file mode 100644
index 0000000000..9fe93ca156
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/static-field-anonymous-function-name.js
@@ -0,0 +1,72 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/static-field-anonymous-function-name.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: Anonymous function receives the name of static fields (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class-static-fields-public, class]
+flags: [generated]
+info: |
+ Updated Productions
+
+ ClassElement :
+ ...
+ static FieldDefinition ;
+
+ FieldDefinition :
+ ClassElementName Initializer_opt
+
+ ClassDefinitionEvaluation:
+ ...
+
+ 27. Let staticFields be a new empty List.
+ 28. For each ClassElement e in order from elements,
+ a. If IsStatic of e is false, then
+ ...
+ b. Else,
+ i. Let field be the result of performing PropertyDefinitionEvaluation for m ClassElementEvaluation for e with arguments F and false.
+ c. If field is an abrupt completion, then
+ ...
+ d. If field is not empty,
+ i. If IsStatic of e is false, append field to instanceFields.
+ ii. Otherwise, append field to staticFields.
+
+ 34. For each item fieldRecord in order from staticFields,
+ a. Perform ? DefineField(F, field).
+ ...
+
+ DefineField(receiver, fieldRecord)
+ 1. Assert: Type(receiver) is Object.
+ 2. Assert: fieldRecord is a Record as created by ClassFieldDefinitionEvaluation.
+ 3. Let name be fieldRecord.[[Name]].
+ 4. Let initializer be fieldRecord.[[Initializer]].
+ 5. If initializer is not empty, then
+ a. Let initValue be ? Call(initializer, receiver).
+ 6. Else, let initValue be undefined.
+ 7. If fieldRecord.[[IsAnonymousFunctionDefinition]] is true, then
+ a. Let hasNameProperty be ? HasOwnProperty(initValue, "name").
+ b. If hasNameProperty is false, perform SetFunctionName(initValue, fieldName).
+ 8. If fieldName is a Private Name,
+ a. Perform ? PrivateFieldAdd(fieldName, receiver, initValue).
+ 9. Else,
+ a. Assert: IsPropertyKey(fieldName) is true.
+ b. Perform ? CreateDataPropertyOrThrow(receiver, fieldName, initValue).
+ 10. Return.
+
+---*/
+
+
+class C {
+ static #field = () => 'Test262';
+ static field = function() { return 42; };
+
+ static accessPrivateField() {
+ return this.#field;
+ }
+
+}
+
+assert.sameValue(C.accessPrivateField().name, "#field");
+assert.sameValue(C.field.name, "field");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/static-field-declaration.js b/js/src/tests/test262/language/statements/class/elements/static-field-declaration.js
new file mode 100644
index 0000000000..3bdd8ae3e3
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/static-field-declaration.js
@@ -0,0 +1,132 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/static-field-declaration.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: Static fields are defined using DefineField (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-static-fields-public, class]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ Updated Productions
+
+ ClassElement :
+ ...
+ static FieldDefinition ;
+
+ FieldDefinition :
+ ClassElementName Initializer_opt
+
+ ClassElementName :
+ PropertyName
+
+ PropertyName :
+ LiteralPropertyName
+ ComputedPropertyName
+
+ LiteralPropertyName :
+ IdentifierName
+ StringLiteral
+ NumericLiteral
+
+ ClassDefinitionEvaluation:
+ ...
+
+ 27. Let staticFields be a new empty List.
+ 28. For each ClassElement e in order from elements,
+ a. If IsStatic of e is false, then
+ ...
+ b. Else,
+ i. Let field be the result of performing PropertyDefinitionEvaluation for mClassElementEvaluation for e with arguments F and false.
+ c. If field is an abrupt completion, then
+ ...
+ d. If field is not empty,
+ i. If IsStatic of e is false, append field to instanceFields.
+ ii. Otherwise, append field to staticFields.
+
+ 34. For each item fieldRecord in order from staticFields,
+ a. Perform ? DefineField(F, field).
+ ...
+
+ DefineField(receiver, fieldRecord)
+ 1. Assert: Type(receiver) is Object.
+ 2. Assert: fieldRecord is a Record as created by ClassFieldDefinitionEvaluation.
+ 3. Let name be fieldRecord.[[Name]].
+ 4. Let initializer be fieldRecord.[[Initializer]].
+ 5. If initializer is not empty, then
+ a. Let initValue be ? Call(initializer, receiver).
+ 6. Else, let initValue be undefined.
+ 7. If fieldRecord.[[IsAnonymousFunctionDefinition]] is true, then
+ a. Let hasNameProperty be ? HasOwnProperty(initValue, "name").
+ b. If hasNameProperty is false, perform SetFunctionName(initValue, fieldName).
+ 8. If fieldName is a Private Name,
+ a. Perform ? PrivateFieldAdd(fieldName, receiver, initValue).
+ 9. Else,
+ a. Assert: IsPropertyKey(fieldName) is true.
+ b. Perform ? CreateDataPropertyOrThrow(receiver, fieldName, initValue).
+ 10. Return.
+
+---*/
+var computed = 'h';
+
+
+class C {
+ static f = 'test262';
+ static 'g';
+ static 0 = 'bar';
+ static [computed];
+}
+
+let c = new C();
+
+assert.sameValue(c.f, undefined);
+assert.sameValue(c.g, undefined);
+assert.sameValue(c.h, undefined);
+assert.sameValue(c[0], undefined);
+
+assert(
+ !Object.prototype.hasOwnProperty.call(c, 'f'),
+ "f does not appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, 'g'),
+ "g does not appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, 'h'),
+ "h does not appear as an own property on the C instance"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, 0),
+ "0 does not appear as an own property on the C instance"
+);
+
+verifyProperty(C, 'f', {
+ value: 'test262',
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+verifyProperty(C, 'g', {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+verifyProperty(C, 0, {
+ value: 'bar',
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+verifyProperty(C, 'h', {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/static-field-init-this-inside-arrow-function.js b/js/src/tests/test262/language/statements/class/elements/static-field-init-this-inside-arrow-function.js
new file mode 100644
index 0000000000..e10becfcc2
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/static-field-init-this-inside-arrow-function.js
@@ -0,0 +1,65 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/static-field-init-this-inside-arrow-function.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: this in static field initializers refers to class constructor (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-static-fields-public, class]
+flags: [generated]
+info: |
+ Updated Productions
+
+ ClassElement :
+ ...
+ static FieldDefinition ;
+
+ FieldDefinition :
+ ClassElementName Initializer_opt
+
+ ClassDefinitionEvaluation:
+ ...
+
+ 27. Let staticFields be a new empty List.
+ 28. For each ClassElement e in order from elements,
+ a. If IsStatic of e is false, then
+ ...
+ b. Else,
+ i. Let field be the result of performing PropertyDefinitionEvaluation for m ClassElementEvaluation for e with arguments F and false.
+ c. If field is an abrupt completion, then
+ ...
+ d. If field is not empty,
+ i. If IsStatic of e is false, append field to instanceFields.
+ ii. Otherwise, append field to staticFields.
+
+ 34. For each item fieldRecord in order from staticFields,
+ a. Perform ? DefineField(F, field).
+ ...
+
+ DefineField(receiver, fieldRecord)
+ 1. Assert: Type(receiver) is Object.
+ 2. Assert: fieldRecord is a Record as created by ClassFieldDefinitionEvaluation.
+ 3. Let name be fieldRecord.[[Name]].
+ 4. Let initializer be fieldRecord.[[Initializer]].
+ 5. If initializer is not empty, then
+ a. Let initValue be ? Call(initializer, receiver).
+ 6. Else, let initValue be undefined.
+ 7. If fieldRecord.[[IsAnonymousFunctionDefinition]] is true, then
+ a. Let hasNameProperty be ? HasOwnProperty(initValue, "name").
+ b. If hasNameProperty is false, perform SetFunctionName(initValue, fieldName).
+ 8. If fieldName is a Private Name,
+ a. Perform ? PrivateFieldAdd(fieldName, receiver, initValue).
+ 9. Else,
+ a. Assert: IsPropertyKey(fieldName) is true.
+ b. Perform ? CreateDataPropertyOrThrow(receiver, fieldName, initValue).
+ 10. Return.
+
+---*/
+
+
+class C {
+ static f = () => this;
+}
+
+assert.sameValue(C.f(), C);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/static-field-init-with-this.js b/js/src/tests/test262/language/statements/class/elements/static-field-init-with-this.js
new file mode 100644
index 0000000000..17541878f8
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/static-field-init-with-this.js
@@ -0,0 +1,69 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/static-field-init-with-this.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: Static fields initializer has `this` biding (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-static-fields-public, class]
+flags: [generated]
+info: |
+ Updated Productions
+
+ ClassElement :
+ ...
+ static FieldDefinition ;
+
+ FieldDefinition :
+ ClassElementName Initializer_opt
+
+ ClassDefinitionEvaluation:
+ ...
+
+ 27. Let staticFields be a new empty List.
+ 28. For each ClassElement e in order from elements,
+ a. If IsStatic of e is false, then
+ ...
+ b. Else,
+ i. Let field be the result of performing PropertyDefinitionEvaluation for m ClassElementEvaluation for e with arguments F and false.
+ c. If field is an abrupt completion, then
+ ...
+ d. If field is not empty,
+ i. If IsStatic of e is false, append field to instanceFields.
+ ii. Otherwise, append field to staticFields.
+
+ 34. For each item fieldRecord in order from staticFields,
+ a. Perform ? DefineField(F, field).
+ ...
+
+ DefineField(receiver, fieldRecord)
+ 1. Assert: Type(receiver) is Object.
+ 2. Assert: fieldRecord is a Record as created by ClassFieldDefinitionEvaluation.
+ 3. Let name be fieldRecord.[[Name]].
+ 4. Let initializer be fieldRecord.[[Initializer]].
+ 5. If initializer is not empty, then
+ a. Let initValue be ? Call(initializer, receiver).
+ 6. Else, let initValue be undefined.
+ 7. If fieldRecord.[[IsAnonymousFunctionDefinition]] is true, then
+ a. Let hasNameProperty be ? HasOwnProperty(initValue, "name").
+ b. If hasNameProperty is false, perform SetFunctionName(initValue, fieldName).
+ 8. If fieldName is a Private Name,
+ a. Perform ? PrivateFieldAdd(fieldName, receiver, initValue).
+ 9. Else,
+ a. Assert: IsPropertyKey(fieldName) is true.
+ b. Perform ? CreateDataPropertyOrThrow(receiver, fieldName, initValue).
+ 10. Return.
+
+---*/
+
+
+class C {
+ static f = 'test';
+ static g = this.f + '262';
+ static h = eval('this.g') + 'test';
+}
+
+assert.sameValue(C.f, 'test');
+assert.sameValue(C.g, 'test262');
+assert.sameValue(C.h, 'test262test');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/static-field-initializer-error.js b/js/src/tests/test262/language/statements/class/elements/static-field-initializer-error.js
new file mode 100644
index 0000000000..e15ee8a192
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/static-field-initializer-error.js
@@ -0,0 +1,60 @@
+// Copyright (C) 2019 Caio Lima (Igalia SL). All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: Class evaluation is incomplete when initializer resutls in an abrupt completition
+esid: sec-define-field
+info: |
+ ClassDefinitionEvaluation:
+ ...
+
+ 27. Let staticFields be a new empty List.
+ 28. For each ClassElement e in order from elements,
+ a. If IsStatic of e is false, then
+ ...
+ b. Else,
+ i. Let field be the result of performing PropertyDefinitionEvaluation for m ClassElementEvaluation for e with arguments F and false.
+ c. If field is an abrupt completion, then
+ ...
+ d. If field is not empty,
+ i. If IsStatic of e is false, append field to instanceFields.
+ ii. Otherwise, append field to staticFields.
+
+ 34. For each item fieldRecord in order from staticFields,
+ a. Perform ? DefineField(F, field).
+ ...
+
+ DefineField(receiver, fieldRecord)
+ 1. Assert: Type(receiver) is Object.
+ 2. Assert: fieldRecord is a Record as created by ClassFieldDefinitionEvaluation.
+ 3. Let name be fieldRecord.[[Name]].
+ 4. Let initializer be fieldRecord.[[Initializer]].
+ 5. If initializer is not empty, then
+ a. Let initValue be ? Call(initializer, receiver).
+ 6. Else, let initValue be undefined.
+ 7. If fieldRecord.[[IsAnonymousFunctionDefinition]] is true, then
+ a. Let hasNameProperty be ? HasOwnProperty(initValue, "name").
+ b. If hasNameProperty is false, perform SetFunctionName(initValue, fieldName).
+ 8. If fieldName is a Private Name,
+ a. Perform ? PrivateFieldAdd(fieldName, receiver, initValue).
+ 9. Else,
+ a. Assert: IsPropertyKey(fieldName) is true.
+ b. Perform ? CreateDataPropertyOrThrow(receiver, fieldName, initValue).
+ 10. Return.
+features: [class-static-fields-public, class]
+---*/
+
+function initThrows() {
+ throw new Test262Error();
+}
+
+assert.throws(Test262Error, function() {
+ class C {
+ static f = initThrows();
+ static g;
+ };
+
+ assert(false, 'this should never execute');
+}, 'static field initializer should throw exception');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/static-field-redeclaration.js b/js/src/tests/test262/language/statements/class/elements/static-field-redeclaration.js
new file mode 100644
index 0000000000..8dc0da889a
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/static-field-redeclaration.js
@@ -0,0 +1,71 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/static-field-redeclaration.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: Static fields can be redeclared (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-static-fields-public, class]
+flags: [generated]
+info: |
+ Updated Productions
+
+ ClassElement :
+ ...
+ static FieldDefinition ;
+
+ FieldDefinition :
+ ClassElementName Initializer_opt
+
+ ClassDefinitionEvaluation:
+ ...
+
+ 27. Let staticFields be a new empty List.
+ 28. For each ClassElement e in order from elements,
+ a. If IsStatic of e is false, then
+ ...
+ b. Else,
+ i. Let field be the result of performing PropertyDefinitionEvaluation for m ClassElementEvaluation for e with arguments F and false.
+ c. If field is an abrupt completion, then
+ ...
+ d. If field is not empty,
+ i. If IsStatic of e is false, append field to instanceFields.
+ ii. Otherwise, append field to staticFields.
+
+ 34. For each item fieldRecord in order from staticFields,
+ a. Perform ? DefineField(F, field).
+ ...
+
+ DefineField(receiver, fieldRecord)
+ 1. Assert: Type(receiver) is Object.
+ 2. Assert: fieldRecord is a Record as created by ClassFieldDefinitionEvaluation.
+ 3. Let name be fieldRecord.[[Name]].
+ 4. Let initializer be fieldRecord.[[Initializer]].
+ 5. If initializer is not empty, then
+ a. Let initValue be ? Call(initializer, receiver).
+ 6. Else, let initValue be undefined.
+ 7. If fieldRecord.[[IsAnonymousFunctionDefinition]] is true, then
+ a. Let hasNameProperty be ? HasOwnProperty(initValue, "name").
+ b. If hasNameProperty is false, perform SetFunctionName(initValue, fieldName).
+ 8. If fieldName is a Private Name,
+ a. Perform ? PrivateFieldAdd(fieldName, receiver, initValue).
+ 9. Else,
+ a. Assert: IsPropertyKey(fieldName) is true.
+ b. Perform ? CreateDataPropertyOrThrow(receiver, fieldName, initValue).
+ 10. Return.
+
+---*/
+
+
+class C {
+ static f = 'test';
+ static f = this.f + '262';
+ static g() {
+ return 45;
+ };
+ static g = this.g();
+}
+
+assert.sameValue(C.f, 'test262');
+assert.sameValue(C.g, 45);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/static-fielddefinition-initializer-abrupt-completion.js b/js/src/tests/test262/language/statements/class/elements/static-fielddefinition-initializer-abrupt-completion.js
new file mode 100644
index 0000000000..c5985614d7
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/static-fielddefinition-initializer-abrupt-completion.js
@@ -0,0 +1,35 @@
+// Copyright (C) 2017 Valerie Young. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: Class construction should error if evaluation of static field initializer errors
+esid: runtime-semantics-class-definition-evaluation
+info: |
+ Runtime Semantics: ClassDefinitionEvaluation
+ ...
+ 27. For each ClassElement e in order from elements
+ a. If IsStatic of e is false, then
+ i. Let fields be the result of performing ClassElementEvaluation
+ for e with arguments proto and false.
+ b. Else,
+ i. Let fields be the result of performing ClassElementEvaluation
+ for e with arguments F and false.
+ c. If fields is an abrupt completion, then
+ i. Set the running execution context's LexicalEnvironment to lex.
+ ii. Set the running execution context's PrivateNameEnvironment to outerPrivateEnvironment.
+ iii. Return Completion(status).
+
+features: [class-static-fields-public]
+---*/
+
+function f() {
+ throw new Test262Error();
+}
+
+assert.throws(Test262Error, function() {
+ class C {
+ static x = f();
+ }
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/static-literal-init-err-contains-arguments.js b/js/src/tests/test262/language/statements/class/elements/static-literal-init-err-contains-arguments.js
new file mode 100644
index 0000000000..5cd2212101
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/static-literal-init-err-contains-arguments.js
@@ -0,0 +1,35 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/init-err-contains-arguments.case
+// - src/class-elements/initializer-error/cls-decl-fields-static-literal-name.template
+/*---
+description: Syntax error if `arguments` used in class field (static literal ClassElementName)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-public, class-static-fields-public]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ FieldDefinition:
+ PropertyNameInitializeropt
+
+ - It is a Syntax Error if ContainsArguments of Initializer is true.
+
+ Static Semantics: ContainsArguments
+ IdentifierReference : Identifier
+
+ 1. If the StringValue of Identifier is "arguments", return true.
+ ...
+ For all other grammatical productions, recurse on all nonterminals. If any piece returns true, then return true. Otherwise return false.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ static x = arguments;
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/static-literal-init-err-contains-super.js b/js/src/tests/test262/language/statements/class/elements/static-literal-init-err-contains-super.js
new file mode 100644
index 0000000000..562c076edc
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/static-literal-init-err-contains-super.js
@@ -0,0 +1,28 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/init-err-contains-super.case
+// - src/class-elements/initializer-error/cls-decl-fields-static-literal-name.template
+/*---
+description: Syntax error if `super()` used in class field (static literal ClassElementName)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-public, class-static-fields-public]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ FieldDefinition:
+ PropertyNameInitializeropt
+
+ - It is a Syntax Error if Initializer is present and Initializer Contains SuperCall is true.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ static x = super();
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/static-private-fields-proxy-default-handler-throws.js b/js/src/tests/test262/language/statements/class/elements/static-private-fields-proxy-default-handler-throws.js
new file mode 100644
index 0000000000..8752878264
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/static-private-fields-proxy-default-handler-throws.js
@@ -0,0 +1,30 @@
+// Copyright (C) 2018 Rick Waldron. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-privatefieldget
+description: Static private fields not accessible via default Proxy handler
+info: |
+ 1. Assert: P is a Private Name value.
+ 2. If O is not an object, throw a TypeError exception.
+ 3. Let entry be PrivateFieldFind(P, O).
+ 4. If entry is empty, throw a TypeError exception.
+
+features: [class, class-static-fields-private]
+---*/
+
+class C {
+ static #x = 1;
+ static x() {
+ return this.#x;
+ }
+}
+
+var P = new Proxy(C, {});
+
+assert.sameValue(C.x(), 1);
+assert.throws(TypeError, function() {
+ P.x();
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/static-private-getter-access-on-inner-arrow-function.js b/js/src/tests/test262/language/statements/class/elements/static-private-getter-access-on-inner-arrow-function.js
new file mode 100644
index 0000000000..d316074af0
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/static-private-getter-access-on-inner-arrow-function.js
@@ -0,0 +1,46 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/static-private-getter-access-on-inner-arrow-function.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: static private getter access inside of an arrow function (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class]
+flags: [generated]
+info: |
+ PrivateFieldGet (P, O)
+ 1. Assert: P is a Private Name.
+ 2. If O is not an object, throw a TypeError exception.
+ 3. If P.[[Kind]] is "field",
+ ...
+ 4. Perform ? PrivateBrandCheck(O, P).
+ 5. If P.[[Kind]] is "method",
+ a. Return P.[[Value]].
+ ...
+
+ PrivateBrandCheck(O, P)
+ 1. If O.[[PrivateBrands]] does not contain an entry e such that SameValue(e, P.[[Brand]]) is true,
+ a. Throw a TypeError exception.
+
+---*/
+
+
+class C {
+ static get #f() {
+ return 'Test262';
+ }
+
+ static access() {
+ const arrowFunction = () => {
+ return this.#f;
+ };
+
+ return arrowFunction();
+ }
+}
+
+assert.sameValue(C.access(), 'Test262');
+assert.throws(TypeError, function() {
+ C.access.call({});
+}, 'Accessed static private getter from an object which did not contain it');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/static-private-getter-access-on-inner-class.js b/js/src/tests/test262/language/statements/class/elements/static-private-getter-access-on-inner-class.js
new file mode 100644
index 0000000000..5242a5170e
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/static-private-getter-access-on-inner-class.js
@@ -0,0 +1,44 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/static-private-getter-access-on-inner-class.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: static private getter access inside of an inner class (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class-static-fields-public, class]
+flags: [generated]
+info: |
+ PrivateFieldGet (P, O)
+ 1. Assert: P is a Private Name.
+ 2. If O is not an object, throw a TypeError exception.
+ 3. If P.[[Kind]] is "field",
+ ...
+ 4. Perform ? PrivateBrandCheck(O, P).
+ 5. If P.[[Kind]] is "method",
+ a. Return P.[[Value]].
+ ...
+
+ PrivateBrandCheck(O, P)
+ 1. If O.[[PrivateBrands]] does not contain an entry e such that SameValue(e, P.[[Brand]]) is true,
+ a. Throw a TypeError exception.
+
+---*/
+
+
+class C {
+ static get #f() {
+ return 'Test262';
+ }
+
+ static Inner = class {
+ static access(o) {
+ return o.#f;
+ }
+ }
+}
+
+assert.sameValue(C.Inner.access(C), 'Test262');
+assert.throws(TypeError, function() {
+ C.Inner.access(C.Inner);
+}, 'Accessed static private getter from an object which did not contain it');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/static-private-getter-access-on-inner-function.js b/js/src/tests/test262/language/statements/class/elements/static-private-getter-access-on-inner-function.js
new file mode 100644
index 0000000000..f1556f68b0
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/static-private-getter-access-on-inner-function.js
@@ -0,0 +1,48 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/static-private-getter-access-on-inner-function.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: static private getter access inside of a nested function (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class]
+flags: [generated]
+info: |
+ PrivateFieldGet (P, O)
+ 1. Assert: P is a Private Name.
+ 2. If O is not an object, throw a TypeError exception.
+ 3. If P.[[Kind]] is "field",
+ ...
+ 4. Perform ? PrivateBrandCheck(O, P).
+ 5. If P.[[Kind]] is "method",
+ a. Return P.[[Value]].
+ ...
+
+ PrivateBrandCheck(O, P)
+ 1. If O.[[PrivateBrands]] does not contain an entry e such that SameValue(e, P.[[Brand]]) is true,
+ a. Throw a TypeError exception.
+
+---*/
+
+
+class C {
+ static get #f() {
+ return 'Test262';
+ }
+
+ static access() {
+ const self = this;
+
+ function innerFunction() {
+ return self.#f;
+ }
+
+ return innerFunction();
+ }
+}
+
+assert.sameValue(C.access(), 'Test262');
+assert.throws(TypeError, function() {
+ C.access.call({});
+}, 'Accessed static private getter from an arbitrary object');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/static-private-getter.js b/js/src/tests/test262/language/statements/class/elements/static-private-getter.js
new file mode 100644
index 0000000000..cf40d3fd0e
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/static-private-getter.js
@@ -0,0 +1,57 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/static-private-getter.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: static private getter declaration and usage (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class]
+flags: [generated]
+info: |
+ MethodDefinition :
+ get ClassElementName () { FunctionBody }
+ set ClassElementName ( PropertySetParameterList ) { FunctionBody }
+
+ ClassTail : ClassHeritage { ClassBody }
+ ...
+ 33. If PrivateBoundIdentifiers of ClassBody contains a Private Name P such that P's [[Kind]] field is either "method" or "accessor" and P's [[Brand]] is F,
+ a. PrivateBrandAdd(F, F).
+ 34. For each item fieldRecord in order from staticFields,
+ a. Perform ? DefineField(F, field).
+
+ PrivateFieldGet (P, O)
+ 1. Assert: P is a Private Name.
+ 2. If O is not an object, throw a TypeError exception.
+ 3. If P.[[Kind]] is "field",
+ ...
+ 4. Perform ? PrivateBrandCheck(O, P).
+ 5. If P.[[Kind]] is "method",
+ ...
+ 6. Else,
+ a. Assert: P.[[Kind]] is "accessor".
+ b. If P does not have a [[Get]] field, throw a TypeError exception.
+ c. Let getter be P.[[Get]].
+ d. Return ? Call(getter, O).
+
+ PrivateBrandCheck(O, P)
+ 1. If O.[[PrivateBrands]] does not contain an entry e such that SameValue(e, P.[[Brand]]) is true,
+ a. Throw a TypeError exception.
+
+---*/
+
+
+class C {
+ static get #f() {
+ return 'Test262';
+ }
+
+ static access() {
+ return this.#f;
+ }
+}
+
+assert.sameValue(C.access(), 'Test262');
+assert.throws(TypeError, function() {
+ C.access.call({});
+}, 'Accessed static private getter from an arbitrary object');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/static-private-init-err-contains-arguments.js b/js/src/tests/test262/language/statements/class/elements/static-private-init-err-contains-arguments.js
new file mode 100644
index 0000000000..30ee50c855
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/static-private-init-err-contains-arguments.js
@@ -0,0 +1,35 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/init-err-contains-arguments.case
+// - src/class-elements/initializer-error/cls-decl-fields-static-private-name.template
+/*---
+description: Syntax error if `arguments` used in class field (static PrivateName)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-public, class-static-fields-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ FieldDefinition:
+ PropertyNameInitializeropt
+
+ - It is a Syntax Error if ContainsArguments of Initializer is true.
+
+ Static Semantics: ContainsArguments
+ IdentifierReference : Identifier
+
+ 1. If the StringValue of Identifier is "arguments", return true.
+ ...
+ For all other grammatical productions, recurse on all nonterminals. If any piece returns true, then return true. Otherwise return false.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ static #x = arguments;
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/static-private-init-err-contains-super.js b/js/src/tests/test262/language/statements/class/elements/static-private-init-err-contains-super.js
new file mode 100644
index 0000000000..114c6d7109
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/static-private-init-err-contains-super.js
@@ -0,0 +1,28 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/init-err-contains-super.case
+// - src/class-elements/initializer-error/cls-decl-fields-static-private-name.template
+/*---
+description: Syntax error if `super()` used in class field (static PrivateName)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-public, class-static-fields-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ FieldDefinition:
+ PropertyNameInitializeropt
+
+ - It is a Syntax Error if Initializer is present and Initializer Contains SuperCall is true.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ static #x = super();
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/static-private-method-access-on-inner-arrow-function.js b/js/src/tests/test262/language/statements/class/elements/static-private-method-access-on-inner-arrow-function.js
new file mode 100644
index 0000000000..2145cefe5a
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/static-private-method-access-on-inner-arrow-function.js
@@ -0,0 +1,44 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/static-private-method-access-on-inner-arrow-function.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: Static private method access inside of an arrow function (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class]
+flags: [generated]
+info: |
+ PrivateFieldGet (P, O)
+ 1. Assert: P is a Private Name.
+ 2. If O is not an object, throw a TypeError exception.
+ 3. If P.[[Kind]] is "field",
+ ...
+ 4. Perform ? PrivateBrandCheck(O, P).
+ 5. If P.[[Kind]] is "method",
+ a. Return P.[[Value]].
+ ...
+
+ PrivateBrandCheck(O, P)
+ 1. If O.[[PrivateBrands]] does not contain an entry e such that SameValue(e, P.[[Brand]]) is true,
+ a. Throw a TypeError exception.
+
+---*/
+
+
+class C {
+ static #f() { return 42; }
+ static g() {
+ const arrowFunction = () => {
+ return this.#f();
+ };
+
+ return arrowFunction();
+ }
+
+}
+
+assert.sameValue(C.g(), 42);
+assert.throws(TypeError, function() {
+ C.g.call({});
+}, 'Accessed static private method from an object which did not contain it');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/static-private-method-access-on-inner-function.js b/js/src/tests/test262/language/statements/class/elements/static-private-method-access-on-inner-function.js
new file mode 100644
index 0000000000..7e4d1b3a4a
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/static-private-method-access-on-inner-function.js
@@ -0,0 +1,46 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/static-private-method-access-on-inner-function.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: Static private method access inside of a nested function (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class]
+flags: [generated]
+info: |
+ PrivateFieldGet (P, O)
+ 1. Assert: P is a Private Name.
+ 2. If O is not an object, throw a TypeError exception.
+ 3. If P.[[Kind]] is "field",
+ ...
+ 4. Perform ? PrivateBrandCheck(O, P).
+ 5. If P.[[Kind]] is "method",
+ a. Return P.[[Value]].
+ ...
+
+ PrivateBrandCheck(O, P)
+ 1. If O.[[PrivateBrands]] does not contain an entry e such that SameValue(e, P.[[Brand]]) is true,
+ a. Throw a TypeError exception.
+
+---*/
+
+
+class C {
+ static #f() { return 42; }
+ static g() {
+ const self = this;
+
+ function innerFunction() {
+ return self.#f();
+ }
+
+ return innerFunction();
+ }
+
+}
+
+assert.sameValue(C.g(), 42);
+assert.throws(TypeError, function() {
+ C.g.call({});
+}, 'Accessed static private method from an object which did not contain it');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/static-private-method-and-instance-method-brand-check.js b/js/src/tests/test262/language/statements/class/elements/static-private-method-and-instance-method-brand-check.js
new file mode 100644
index 0000000000..21a112a88c
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/static-private-method-and-instance-method-brand-check.js
@@ -0,0 +1,66 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/static-private-method-and-instance-method-brand-check.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: Brand for static private names and instance private names are different (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class-methods-private, class]
+flags: [generated]
+info: |
+ ClassTail : ClassHeritage { ClassBody }
+ ...
+ 32. If PrivateBoundIdentifiers of ClassBody contains a Private Name P such that P's [[Kind]] field is either "method" or "accessor" and P's [[Brand]] field is proto,
+ a. Set F.[[PrivateBrand]] to proto.
+ 33. If PrivateBoundIdentifiers of ClassBody contains a Private Name P such that P's [[Kind]] field is either "method" or "accessor" and P's [[Brand]] is F,
+ a. PrivateBrandAdd(F, F).
+ ...
+
+ PrivateFieldGet (P, O)
+ 1. Assert: P is a Private Name.
+ 2. If O is not an object, throw a TypeError exception.
+ 3. If P.[[Kind]] is "field",
+ ...
+ 4. Perform ? PrivateBrandCheck(O, P).
+ 5. If P.[[Kind]] is "method",
+ a. Return P.[[Value]].
+ ...
+
+ PrivateBrandCheck(O, P)
+ 1. If O.[[PrivateBrands]] does not contain an entry e such that SameValue(e, P.[[Brand]]) is true,
+ a. Throw a TypeError exception.
+
+---*/
+
+
+class C {
+ static #f() {
+ return 'static';
+ }
+
+ static access() {
+ return this.#f();
+ }
+
+ #instanceMethod() {
+ return 'instance';
+ }
+
+ instanceAccess() {
+ return this.#instanceMethod();
+ }
+}
+
+let c = new C();
+assert.sameValue(C.access(), 'static');
+assert.sameValue(c.instanceAccess(), 'instance');
+
+assert.throws(TypeError, function() {
+ C.access.call(c);
+}, 'Accessed static private method from instance of C');
+
+assert.throws(TypeError, function() {
+ c.instanceAccess.call(C);
+}, 'Accessed instance private method from C');
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/static-private-method-referenced-from-instance-method.js b/js/src/tests/test262/language/statements/class/elements/static-private-method-referenced-from-instance-method.js
new file mode 100644
index 0000000000..380b6409a7
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/static-private-method-referenced-from-instance-method.js
@@ -0,0 +1,40 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/static-private-method-referenced-from-instance-method.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: Static private method referenced from an instance method (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class]
+flags: [generated]
+info: |
+ PrivateFieldGet (P, O)
+ 1. Assert: P is a Private Name.
+ 2. If O is not an object, throw a TypeError exception.
+ 3. If P.[[Kind]] is "field",
+ ...
+ 4. Perform ? PrivateBrandCheck(O, P).
+ 5. If P.[[Kind]] is "method",
+ a. Return P.[[Value]].
+ ...
+
+ PrivateBrandCheck(O, P)
+ 1. If O.[[PrivateBrands]] does not contain an entry e such that SameValue(e, P.[[Brand]]) is true,
+ a. Throw a TypeError exception.
+
+---*/
+
+
+class C {
+ static #f() { return 42; }
+ g() {
+ return this.#f();
+ }
+
+}
+
+assert.sameValue(new C().g.call(C), 42);
+assert.throws(TypeError, function() {
+ new C().g();
+}, 'Accessed static private method from an object which did not contain it');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/static-private-method-subclass-receiver.js b/js/src/tests/test262/language/statements/class/elements/static-private-method-subclass-receiver.js
new file mode 100644
index 0000000000..cf7c904247
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/static-private-method-subclass-receiver.js
@@ -0,0 +1,39 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/static-private-method-subclass-receiver.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: Static private methods on the super-class cannot be called with sub-class as the receiver (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class]
+flags: [generated]
+info: |
+ PrivateFieldGet (P, O)
+ 1. Assert: P is a Private Name.
+ 2. If O is not an object, throw a TypeError exception.
+ 3. If P.[[Kind]] is "field",
+ ...
+ 4. Perform ? PrivateBrandCheck(O, P).
+ 5. If P.[[Kind]] is "method",
+ a. Return P.[[Value]].
+ ...
+
+ PrivateBrandCheck(O, P)
+ 1. If O.[[PrivateBrands]] does not contain an entry e such that SameValue(e, P.[[Brand]]) is true,
+ a. Throw a TypeError exception.
+
+---*/
+
+
+class C {
+ static f() { return this.#g(); }
+ static #g() { return 42; }
+
+}
+
+class D extends C {}
+assert.sameValue(C.f(), 42);
+assert.throws(TypeError, function() {
+ D.f();
+}, 'D does not contain static private method #g');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/static-private-setter-access-on-inner-arrow-function.js b/js/src/tests/test262/language/statements/class/elements/static-private-setter-access-on-inner-arrow-function.js
new file mode 100644
index 0000000000..224f85738b
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/static-private-setter-access-on-inner-arrow-function.js
@@ -0,0 +1,47 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/static-private-setter-access-on-inner-arrow-function.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: static private setter access inside of an arrow function (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class]
+flags: [generated]
+info: |
+ PrivateFieldGet (P, O)
+ 1. Assert: P is a Private Name.
+ 2. If O is not an object, throw a TypeError exception.
+ 3. If P.[[Kind]] is "field",
+ ...
+ 4. Perform ? PrivateBrandCheck(O, P).
+ 5. If P.[[Kind]] is "method",
+ a. Return P.[[Value]].
+ ...
+
+ PrivateBrandCheck(O, P)
+ 1. If O.[[PrivateBrands]] does not contain an entry e such that SameValue(e, P.[[Brand]]) is true,
+ a. Throw a TypeError exception.
+
+---*/
+
+
+class C {
+ static set #f(v) {
+ this._v = v;
+ }
+
+ static access() {
+ const arrowFunction = () => {
+ this.#f = 'Test262';
+ };
+
+ arrowFunction();
+ }
+}
+
+C.access();
+assert.sameValue(C._v, 'Test262');
+assert.throws(TypeError, function() {
+ C.access.call({});
+}, 'Accessed static private setter from an object which did not contain it');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/static-private-setter-access-on-inner-class.js b/js/src/tests/test262/language/statements/class/elements/static-private-setter-access-on-inner-class.js
new file mode 100644
index 0000000000..77fcb12d4e
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/static-private-setter-access-on-inner-class.js
@@ -0,0 +1,46 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/static-private-setter-access-on-inner-class.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: static private setter access inside of an inner class (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class-static-fields-public, class]
+flags: [generated]
+info: |
+ PrivateFieldGet (P, O)
+ 1. Assert: P is a Private Name.
+ 2. If O is not an object, throw a TypeError exception.
+ 3. If P.[[Kind]] is "field",
+ ...
+ 4. Perform ? PrivateBrandCheck(O, P).
+ 5. If P.[[Kind]] is "method",
+ a. Return P.[[Value]].
+ ...
+
+ PrivateBrandCheck(O, P)
+ 1. If O.[[PrivateBrands]] does not contain an entry e such that SameValue(e, P.[[Brand]]) is true,
+ a. Throw a TypeError exception.
+
+---*/
+
+
+class C {
+ static set #f(v) {
+ return this._v = v;
+ }
+
+ static Inner = class {
+ static access(o) {
+ o.#f = 'Test262';
+ }
+ }
+
+}
+
+C.Inner.access(C)
+assert.sameValue(C._v, 'Test262');
+assert.throws(TypeError, function() {
+ C.Inner.access(C.Inner);
+}, 'Accessed static private setter from an object which did not contain it');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/static-private-setter-access-on-inner-function.js b/js/src/tests/test262/language/statements/class/elements/static-private-setter-access-on-inner-function.js
new file mode 100644
index 0000000000..3781181dd7
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/static-private-setter-access-on-inner-function.js
@@ -0,0 +1,49 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/static-private-setter-access-on-inner-function.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: static private setter access inside of a nested function (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class]
+flags: [generated]
+info: |
+ PrivateFieldGet (P, O)
+ 1. Assert: P is a Private Name.
+ 2. If O is not an object, throw a TypeError exception.
+ 3. If P.[[Kind]] is "field",
+ ...
+ 4. Perform ? PrivateBrandCheck(O, P).
+ 5. If P.[[Kind]] is "method",
+ a. Return P.[[Value]].
+ ...
+
+ PrivateBrandCheck(O, P)
+ 1. If O.[[PrivateBrands]] does not contain an entry e such that SameValue(e, P.[[Brand]]) is true,
+ a. Throw a TypeError exception.
+
+---*/
+
+
+class C {
+ static set #f(v) {
+ this._v = v;
+ }
+
+ static access() {
+ const self = this;
+
+ function innerFunction() {
+ self.#f = 'Test262';
+ }
+
+ innerFunction();
+ }
+}
+
+C.access();
+assert.sameValue(C._v, 'Test262');
+assert.throws(TypeError, function() {
+ C.access.call({});
+}, 'Accessed static private setter from an arbitrary object');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/static-private-setter.js b/js/src/tests/test262/language/statements/class/elements/static-private-setter.js
new file mode 100644
index 0000000000..c39699206f
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/static-private-setter.js
@@ -0,0 +1,58 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/static-private-setter.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: static private setter declaration and usage (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class]
+flags: [generated]
+info: |
+ MethodDefinition :
+ get ClassElementName () { FunctionBody }
+ set ClassElementName ( PropertySetParameterList ) { FunctionBody }
+
+ ClassTail : ClassHeritage { ClassBody }
+ ...
+ 33. If PrivateBoundIdentifiers of ClassBody contains a Private Name P such that P's [[Kind]] field is either "method" or "accessor" and P's [[Brand]] is F,
+ a. PrivateBrandAdd(F, F).
+ 34. For each item fieldRecord in order from staticFields,
+ a. Perform ? DefineField(F, field).
+
+ PrivateFieldGet (P, O)
+ 1. Assert: P is a Private Name.
+ 2. If O is not an object, throw a TypeError exception.
+ 3. If P.[[Kind]] is "field",
+ ...
+ 4. Perform ? PrivateBrandCheck(O, P).
+ 5. If P.[[Kind]] is "method",
+ ...
+ 6. Else,
+ a. Assert: P.[[Kind]] is "accessor".
+ b. If P does not have a [[Get]] field, throw a TypeError exception.
+ c. Let getter be P.[[Get]].
+ d. Return ? Call(getter, O).
+
+ PrivateBrandCheck(O, P)
+ 1. If O.[[PrivateBrands]] does not contain an entry e such that SameValue(e, P.[[Brand]]) is true,
+ a. Throw a TypeError exception.
+
+---*/
+
+
+class C {
+ static set #f(v) {
+ this._v = v;
+ }
+
+ static access() {
+ this.#f = 'Test262';
+ }
+}
+
+C.access();
+assert.sameValue(C._v, 'Test262');
+assert.throws(TypeError, function() {
+ C.access.call({});
+}, 'Accessed static private setter from an arbitrary object');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/static-string-literal-name-init-err-contains-arguments.js b/js/src/tests/test262/language/statements/class/elements/static-string-literal-name-init-err-contains-arguments.js
new file mode 100644
index 0000000000..9be6b18025
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/static-string-literal-name-init-err-contains-arguments.js
@@ -0,0 +1,35 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/init-err-contains-arguments.case
+// - src/class-elements/initializer-error/cls-decl-fields-static-string-literal-name.template
+/*---
+description: Syntax error if `arguments` used in class field (static string literal ClassElementName)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-public, class-static-fields-public]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ FieldDefinition:
+ PropertyNameInitializeropt
+
+ - It is a Syntax Error if ContainsArguments of Initializer is true.
+
+ Static Semantics: ContainsArguments
+ IdentifierReference : Identifier
+
+ 1. If the StringValue of Identifier is "arguments", return true.
+ ...
+ For all other grammatical productions, recurse on all nonterminals. If any piece returns true, then return true. Otherwise return false.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ static 'x' = arguments;
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/static-string-literal-name-init-err-contains-super.js b/js/src/tests/test262/language/statements/class/elements/static-string-literal-name-init-err-contains-super.js
new file mode 100644
index 0000000000..6cbe221dcc
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/static-string-literal-name-init-err-contains-super.js
@@ -0,0 +1,28 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/init-err-contains-super.case
+// - src/class-elements/initializer-error/cls-decl-fields-static-string-literal-name.template
+/*---
+description: Syntax error if `super()` used in class field (static string literal ClassElementName)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-public, class-static-fields-public]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ FieldDefinition:
+ PropertyNameInitializeropt
+
+ - It is a Syntax Error if Initializer is present and Initializer Contains SuperCall is true.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ static 'x' = super();
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/string-literal-name-init-err-contains-arguments.js b/js/src/tests/test262/language/statements/class/elements/string-literal-name-init-err-contains-arguments.js
new file mode 100644
index 0000000000..efdb64b913
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/string-literal-name-init-err-contains-arguments.js
@@ -0,0 +1,35 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/init-err-contains-arguments.case
+// - src/class-elements/initializer-error/cls-decl-fields-string-literal-name.template
+/*---
+description: Syntax error if `arguments` used in class field (string literal ClassElementName)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-public]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ FieldDefinition:
+ PropertyNameInitializeropt
+
+ - It is a Syntax Error if ContainsArguments of Initializer is true.
+
+ Static Semantics: ContainsArguments
+ IdentifierReference : Identifier
+
+ 1. If the StringValue of Identifier is "arguments", return true.
+ ...
+ For all other grammatical productions, recurse on all nonterminals. If any piece returns true, then return true. Otherwise return false.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ 'x' = arguments;
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/string-literal-name-init-err-contains-super.js b/js/src/tests/test262/language/statements/class/elements/string-literal-name-init-err-contains-super.js
new file mode 100644
index 0000000000..d5bc2d2ddb
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/string-literal-name-init-err-contains-super.js
@@ -0,0 +1,28 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/init-err-contains-super.case
+// - src/class-elements/initializer-error/cls-decl-fields-string-literal-name.template
+/*---
+description: Syntax error if `super()` used in class field (string literal ClassElementName)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-public]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ FieldDefinition:
+ PropertyNameInitializeropt
+
+ - It is a Syntax Error if Initializer is present and Initializer Contains SuperCall is true.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ 'x' = super();
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/super-access-from-arrow-func-on-field.js b/js/src/tests/test262/language/statements/class/elements/super-access-from-arrow-func-on-field.js
new file mode 100644
index 0000000000..39b381e1ea
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/super-access-from-arrow-func-on-field.js
@@ -0,0 +1,39 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/super-access-from-arrow-func-on-field.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: super inside arrow functions on field initializer resolves to class' super (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-fields-public, class-static-fields-public, class]
+flags: [generated]
+info: |
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ SuperProperty:
+ super[Expression]
+ super.IdentifierName
+
+---*/
+
+
+class C {
+ func = () => {
+ super.prop = 'test262';
+ }
+
+ static staticFunc = () => {
+ super.staticProp = 'static test262';
+ }
+}
+
+let c = new C();
+c.func();
+assert.sameValue(c.prop, 'test262');
+
+C.staticFunc();
+assert.sameValue(C.staticProp, 'static test262');
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/super-access-inside-a-private-getter.js b/js/src/tests/test262/language/statements/class/elements/super-access-inside-a-private-getter.js
new file mode 100644
index 0000000000..72cb666ec7
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/super-access-inside-a-private-getter.js
@@ -0,0 +1,52 @@
+// Copyright (C) 2019 Caio Lima (Igalia SL). All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: Private getter contains proper HomeObject
+esid: sec-method-definitions-runtime-semantics-classelementevaluation
+info: |
+ MethodDefinition : get ClassElementName () { FunctionBody }
+ 1. Let key be the result of evaluating ClassElementName.
+ 2. ReturnIfAbrupt(key).
+ 3. If the function code for this MethodDefinition is strict mode code, let strict be true. Otherwise let strict be false.
+ 4. Let scope be the running execution context's LexicalEnvironment.
+ 5. Let formalParameterList be an instance of the production FormalParameters:[empty] .
+ 6. Let closure be FunctionCreate(Method, formalParameterList, FunctionBody, scope, strict).
+ 7. Perform MakeMethod(closure, homeObject).
+ 8. Perform SetFunctionName(closure, key, "get").
+ 9. If key is a Private Name,
+ a. If key has a [[Kind]] field,
+ i. Assert: key.[[Kind]] is "accessor".
+ ii. Assert: key.[[Brand]] is homeObject.
+ iii. Assert: key does not have a [[Get]] field.
+ iv. Set key.[[Get]] to closure.
+ b. Otherwise,
+ i. Set key.[[Kind]] to "accessor".
+ ii. Set key.[[Brand]] to homeObject.
+ iii. Set key.[[Get]] to closure.
+ 10. Else,
+ a. Let desc be the PropertyDescriptor{[[Get]]: closure, [[Enumerable]]: enumerable, [[Configurable]]: true}.
+ b. Perform ? DefinePropertyOrThrow(homeObject, key, desc).
+features: [class-methods-private, class]
+---*/
+
+class A {
+ method() {
+ return "Test262";
+ }
+}
+
+class C extends A {
+ get #m() {
+ return super.method();
+ }
+
+ access() {
+ return this.#m;
+ }
+}
+
+let c = new C();
+assert.sameValue(c.access(), "Test262");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/super-access-inside-a-private-method.js b/js/src/tests/test262/language/statements/class/elements/super-access-inside-a-private-method.js
new file mode 100644
index 0000000000..df4478828f
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/super-access-inside-a-private-method.js
@@ -0,0 +1,52 @@
+// Copyright (C) 2019 Caio Lima (Igalia SL). All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: Private method contains proper HomeObject
+esid: sec-method-definitions-runtime-semantics-classelementevaluation
+info: |
+ MethodDefinition : ClassElementName ( UniqueFormalParameters ) { FunctionBody }
+ 1. Let methodDef be DefineMethod of MethodDefinition with argument homeObject.
+ 2. ReturnIfAbrupt(methodDef).
+ 3. Perform ? DefineOrdinaryMethod(methodDef.[[Key]], homeObject, methodDef.[[Closure]], _enumerable).
+
+ MethodDefinition : PropertyName ( UniqueFormalParameters ) { FunctionBody }
+ 1. Let propKey be the result of evaluating PropertyName.
+ 2. ReturnIfAbrupt(propKey).
+ 3. Let scope be the running execution context's LexicalEnvironment.
+ 4. If functionPrototype is present as a parameter, then
+ a. Let kind be Normal.
+ b. Let prototype be functionPrototype.
+ 5. Else,
+ a. Let kind be Method.
+ b. Let prototype be the intrinsic object %FunctionPrototype%.
+ 6. Let closure be FunctionCreate(kind, UniqueFormalParameters, FunctionBody, scope, prototype).
+ 7. Perform MakeMethod(closure, object).
+ 8. Set closure.[[SourceText]] to the source text matched by MethodDefinition.
+ 9. Return the Record { [[Key]]: propKey, [[Closure]]: closure }.
+features: [class-methods-private, class]
+---*/
+
+class A {
+ method() {
+ return "Test262";
+ }
+}
+
+class C extends A {
+ #m() {
+ return super.method();
+ }
+
+ access(o) {
+ return this.#m.call(o);
+ }
+}
+
+let c = new C();
+assert.sameValue(c.access(c), "Test262");
+
+let o = {};
+assert.sameValue(c.access(o), "Test262");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/super-access-inside-a-private-setter.js b/js/src/tests/test262/language/statements/class/elements/super-access-inside-a-private-setter.js
new file mode 100644
index 0000000000..3a95d15c89
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/super-access-inside-a-private-setter.js
@@ -0,0 +1,52 @@
+// Copyright (C) 2019 Caio Lima (Igalia SL). All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: Private setter contains proper HomeObject
+esid: sec-method-definitions-runtime-semantics-classelementevaluation
+info: |
+ MethodDefinition : set ClassElementName ( PropertySetParameterList ) { FunctionBody }
+ 1. Let key be the result of evaluating ClassElementName.
+ 2. ReturnIfAbrupt(key).
+ 3. If the function code for this MethodDefinition is strict mode code, let strict be true. Otherwise let strict be false.
+ 4. Let scope be the running execution context's LexicalEnvironment.
+ 5. Let closure be FunctionCreate(Method, PropertySetParameterList, FunctionBody, scope, strict).
+ 6. Perform MakeMethod(closure, homeObject).
+ 7. Perform SetFunctionName(closure, key, "set").
+ 8. If key is a Private Name,
+ a. If key has a [[Kind]] field,
+ i. Assert: key.[[Kind]] is "accessor".
+ ii. Assert: key.[[Brand]] is homeObject.
+ iii. Assert: key does not have a [[Set]] field.
+ iv. Set key.[[Set]] to closure.
+ b. Otherwise,
+ i. Set key.[[Kind]] to "accessor".
+ ii. Set key.[[Brand]] to homeObject.
+ iii. Set key.[[Set]] to closure.
+ 9. Else,
+ a. Let desc be the PropertyDescriptor{[[Set]]: closure, [[Enumerable]]: enumerable, [[Configurable]]: true}.
+ b. Perform ? DefinePropertyOrThrow(homeObject, key, desc).
+features: [class-methods-private, class]
+---*/
+
+class A {
+ method(v) {
+ return v;
+ }
+}
+
+class C extends A {
+ set #m(v) {
+ this._v = super.method(v);
+ }
+
+ access() {
+ return this.#m = "Test262";
+ }
+}
+
+let c = new C();
+c.access();
+assert.sameValue(c._v, "Test262");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/super-fielddefinition-initializer-abrupt-completion.js b/js/src/tests/test262/language/statements/class/elements/super-fielddefinition-initializer-abrupt-completion.js
new file mode 100644
index 0000000000..f19282782f
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/super-fielddefinition-initializer-abrupt-completion.js
@@ -0,0 +1,58 @@
+// Copyright (C) 2017 Valerie Young. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: Class construction should error if evaluation of field initializer in super errors
+esid: sec-super-keyword-runtime-semantics-evaluation
+info: |
+ Runtime Semantics: Evaluation
+ SuperCall : superArguments
+ 1. Let newTarget be GetNewTarget().
+ 2. If newTarget is undefined, throw a ReferenceError exception.
+ 3. Let func be ? GetSuperConstructor().
+ 4. Let argList be ArgumentListEvaluation of Arguments.
+ 5. ReturnIfAbrupt(argList).
+ 6. Let result be ? Construct(func, argList, newTarget).
+ 7. Let thisER be GetThisEnvironment( ).
+ 8. Let F be thisER.[[FunctionObject]].
+ 9. Assert: F is an ECMAScript function object.
+ 10. Perform ? InitializeInstanceFields(result, F).
+
+ InitializeInstanceFields ( O, constructor )
+ 1. Assert: Type ( O ) is Object.
+ 2. Assert: Assert constructor is an ECMAScript function object.
+ 3. Let fieldRecords be the value of constructor's [[Fields]] internal slot.
+ 4. For each item fieldRecord in order from fieldRecords,
+ a. If fieldRecord.[[static]] is false, then
+ i. Perform ? DefineField(O, fieldRecord).
+
+ DefineField(receiver, fieldRecord)
+ 1. Assert: Type(receiver) is Object.
+ 2. Assert: fieldRecord is a Record as created by ClassFieldDefinitionEvaluation.
+ 3. Let fieldName be fieldRecord.[[Name]].
+ 4. Let initializer be fieldRecord.[[Initializer]].
+ 5. If initializer is not empty, then
+ a.Let initValue be ? Call(initializer, receiver).
+
+features: [class, class-fields-public]
+---*/
+
+function f() {
+ throw new Test262Error();
+}
+
+class A {
+ x = f();
+}
+
+class C extends A {
+ constructor() {
+ super();
+ }
+}
+
+assert.throws(Test262Error, function() {
+ new C();
+})
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/browser.js b/js/src/tests/test262/language/statements/class/elements/syntax/browser.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/browser.js
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/browser.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/browser.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/browser.js
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/class-heritage-array-literal-arrow-heritage.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/class-heritage-array-literal-arrow-heritage.js
new file mode 100644
index 0000000000..725572fa81
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/class-heritage-array-literal-arrow-heritage.js
@@ -0,0 +1,26 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/class-heritage-array-literal-arrow-heritage.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: It's a SyntaxError if an array literal evaluated on ClassHeritage uses a private name. (class declaration)
+esid: prod-ClassElement
+features: [class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ClassTail : ClassHeritage { ClassBody }
+
+ ClassHeritage :
+ extends LeftHandSideExpression
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C extends () => {} {
+
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/class-heritage-array-literal-async-arrow-heritage.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/class-heritage-array-literal-async-arrow-heritage.js
new file mode 100644
index 0000000000..64b65965ed
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/class-heritage-array-literal-async-arrow-heritage.js
@@ -0,0 +1,26 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/class-heritage-array-literal-async-arrow-heritage.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: It's a SyntaxError if an array literal evaluated on ClassHeritage uses a private name. (class declaration)
+esid: prod-ClassElement
+features: [class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ClassTail : ClassHeritage { ClassBody }
+
+ ClassHeritage :
+ extends LeftHandSideExpression
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C extends async () => {} {
+
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/browser.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/browser.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/browser.js
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-call-expression-private-method-accessor-get.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-call-expression-private-method-accessor-get.js
new file mode 100644
index 0000000000..048f87ae90
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-call-expression-private-method-accessor-get.js
@@ -0,0 +1,42 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-call-expression-private-method-accessor-get.case
+// - src/class-elements/delete-error/cls-decl-field-delete-covered.template
+/*---
+description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName accessor get method (in field, covered)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class-methods-private, class-fields-public, class, class-fields-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+ It is a Syntax Error if the derived UnaryExpression is
+ PrimaryExpression : CoverParenthesizedExpressionAndArrowParameterList and
+ CoverParenthesizedExpressionAndArrowParameterList ultimately derives a
+ phrase that, if used in place of UnaryExpression, would produce a
+ Syntax Error according to these rules. This rule is recursively applied.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+ g = this.f;
+ x = delete (g().#m);
+ f() {
+ return this;
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-call-expression-private-method-accessor-set.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-call-expression-private-method-accessor-set.js
new file mode 100644
index 0000000000..f1e82d4242
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-call-expression-private-method-accessor-set.js
@@ -0,0 +1,42 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-call-expression-private-method-accessor-set.case
+// - src/class-elements/delete-error/cls-decl-field-delete-covered.template
+/*---
+description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName accessor set method (in field, covered)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-private, class-methods-private, class-fields-public]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+ It is a Syntax Error if the derived UnaryExpression is
+ PrimaryExpression : CoverParenthesizedExpressionAndArrowParameterList and
+ CoverParenthesizedExpressionAndArrowParameterList ultimately derives a
+ phrase that, if used in place of UnaryExpression, would produce a
+ Syntax Error according to these rules. This rule is recursively applied.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+ g = this.f;
+ x = delete (g().#m);
+ f() {
+ return this;
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-call-expression-private-method-async-gen.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-call-expression-private-method-async-gen.js
new file mode 100644
index 0000000000..c01c57926d
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-call-expression-private-method-async-gen.js
@@ -0,0 +1,42 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-call-expression-private-method-async-gen.case
+// - src/class-elements/delete-error/cls-decl-field-delete-covered.template
+/*---
+description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName async generator (in field, covered)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class-methods-private, async-iteration, class, class-fields-private, class-fields-public]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+ It is a Syntax Error if the derived UnaryExpression is
+ PrimaryExpression : CoverParenthesizedExpressionAndArrowParameterList and
+ CoverParenthesizedExpressionAndArrowParameterList ultimately derives a
+ phrase that, if used in place of UnaryExpression, would produce a
+ Syntax Error according to these rules. This rule is recursively applied.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+ g = this.f;
+ x = delete (g().#m);
+ f() {
+ return this;
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-call-expression-private-method-async.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-call-expression-private-method-async.js
new file mode 100644
index 0000000000..b1680d7470
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-call-expression-private-method-async.js
@@ -0,0 +1,42 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-call-expression-private-method-async.case
+// - src/class-elements/delete-error/cls-decl-field-delete-covered.template
+/*---
+description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName async method (in field, covered)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class-methods-private, async-functions, class, class-fields-private, class-fields-public]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+ It is a Syntax Error if the derived UnaryExpression is
+ PrimaryExpression : CoverParenthesizedExpressionAndArrowParameterList and
+ CoverParenthesizedExpressionAndArrowParameterList ultimately derives a
+ phrase that, if used in place of UnaryExpression, would produce a
+ Syntax Error according to these rules. This rule is recursively applied.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+ g = this.f;
+ x = delete (g().#m);
+ f() {
+ return this;
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-call-expression-private-method-gen.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-call-expression-private-method-gen.js
new file mode 100644
index 0000000000..8bc33c89ba
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-call-expression-private-method-gen.js
@@ -0,0 +1,42 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-call-expression-private-method-gen.case
+// - src/class-elements/delete-error/cls-decl-field-delete-covered.template
+/*---
+description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName generator (in field, covered)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class-methods-private, generators, class, class-fields-private, class-fields-public]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+ It is a Syntax Error if the derived UnaryExpression is
+ PrimaryExpression : CoverParenthesizedExpressionAndArrowParameterList and
+ CoverParenthesizedExpressionAndArrowParameterList ultimately derives a
+ phrase that, if used in place of UnaryExpression, would produce a
+ Syntax Error according to these rules. This rule is recursively applied.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+ g = this.f;
+ x = delete (g().#m);
+ f() {
+ return this;
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-call-expression-private-method.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-call-expression-private-method.js
new file mode 100644
index 0000000000..792f66b899
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-call-expression-private-method.js
@@ -0,0 +1,42 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-call-expression-private-method.case
+// - src/class-elements/delete-error/cls-decl-field-delete-covered.template
+/*---
+description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName private ordinary method (in field, covered)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class-methods-private, class, class-fields-private, class-fields-public]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+ It is a Syntax Error if the derived UnaryExpression is
+ PrimaryExpression : CoverParenthesizedExpressionAndArrowParameterList and
+ CoverParenthesizedExpressionAndArrowParameterList ultimately derives a
+ phrase that, if used in place of UnaryExpression, would produce a
+ Syntax Error according to these rules. This rule is recursively applied.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+ g = this.f;
+ x = delete (g().#m);
+ f() {
+ return this;
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-call-expression-private-no-reference.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-call-expression-private-no-reference.js
new file mode 100644
index 0000000000..3a2f9fc0ec
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-call-expression-private-no-reference.js
@@ -0,0 +1,42 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-call-expression-private-no-reference.case
+// - src/class-elements/delete-error/cls-decl-field-delete-covered.template
+/*---
+description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName no referencing class element (in field, covered)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-private, class-fields-public]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+ It is a Syntax Error if the derived UnaryExpression is
+ PrimaryExpression : CoverParenthesizedExpressionAndArrowParameterList and
+ CoverParenthesizedExpressionAndArrowParameterList ultimately derives a
+ phrase that, if used in place of UnaryExpression, would produce a
+ Syntax Error according to these rules. This rule is recursively applied.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+ g = this.f;
+ x = delete (g().#m);
+ f() {
+ return this;
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-call-expression-privatename.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-call-expression-privatename.js
new file mode 100644
index 0000000000..adcb626c91
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-call-expression-privatename.js
@@ -0,0 +1,42 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-call-expression-privatename.case
+// - src/class-elements/delete-error/cls-decl-field-delete-covered.template
+/*---
+description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName private field (in field, covered)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-private, class-fields-public]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+ It is a Syntax Error if the derived UnaryExpression is
+ PrimaryExpression : CoverParenthesizedExpressionAndArrowParameterList and
+ CoverParenthesizedExpressionAndArrowParameterList ultimately derives a
+ phrase that, if used in place of UnaryExpression, would produce a
+ Syntax Error according to these rules. This rule is recursively applied.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+ g = this.f;
+ x = delete (g().#x);
+ f() {
+ return this;
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-member-expression-private-method-accessor-get.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-member-expression-private-method-accessor-get.js
new file mode 100644
index 0000000000..d95a5b6e45
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-member-expression-private-method-accessor-get.js
@@ -0,0 +1,41 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-member-expression-private-method-accessor-get.case
+// - src/class-elements/delete-error/cls-decl-field-delete-covered.template
+/*---
+description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName accessor get method (in field, covered)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class-methods-private, class, class-fields-private, class-fields-public]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+ It is a Syntax Error if the derived UnaryExpression is
+ PrimaryExpression : CoverParenthesizedExpressionAndArrowParameterList and
+ CoverParenthesizedExpressionAndArrowParameterList ultimately derives a
+ phrase that, if used in place of UnaryExpression, would produce a
+ Syntax Error according to these rules. This rule is recursively applied.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+
+ x = delete (this.#m
+);
+
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-member-expression-private-method-accessor-set.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-member-expression-private-method-accessor-set.js
new file mode 100644
index 0000000000..76c28d6d14
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-member-expression-private-method-accessor-set.js
@@ -0,0 +1,41 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-member-expression-private-method-accessor-set.case
+// - src/class-elements/delete-error/cls-decl-field-delete-covered.template
+/*---
+description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName accessor set method (in field, covered)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class-methods-private, class, class-fields-private, class-fields-public]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+ It is a Syntax Error if the derived UnaryExpression is
+ PrimaryExpression : CoverParenthesizedExpressionAndArrowParameterList and
+ CoverParenthesizedExpressionAndArrowParameterList ultimately derives a
+ phrase that, if used in place of UnaryExpression, would produce a
+ Syntax Error according to these rules. This rule is recursively applied.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+
+ x = delete (this.#m
+);
+
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-member-expression-private-method-async-gen.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-member-expression-private-method-async-gen.js
new file mode 100644
index 0000000000..6716eb230d
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-member-expression-private-method-async-gen.js
@@ -0,0 +1,41 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-member-expression-private-method-async-gen.case
+// - src/class-elements/delete-error/cls-decl-field-delete-covered.template
+/*---
+description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName async generator (in field, covered)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class-methods-private, async-iteration, class, class-fields-private, class-fields-public]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+ It is a Syntax Error if the derived UnaryExpression is
+ PrimaryExpression : CoverParenthesizedExpressionAndArrowParameterList and
+ CoverParenthesizedExpressionAndArrowParameterList ultimately derives a
+ phrase that, if used in place of UnaryExpression, would produce a
+ Syntax Error according to these rules. This rule is recursively applied.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+
+ x = delete (this.#m
+);
+ async *#m() {}
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-member-expression-private-method-async.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-member-expression-private-method-async.js
new file mode 100644
index 0000000000..6e0de9f02e
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-member-expression-private-method-async.js
@@ -0,0 +1,41 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-member-expression-private-method-async.case
+// - src/class-elements/delete-error/cls-decl-field-delete-covered.template
+/*---
+description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName async method (in field, covered)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class-methods-private, async-functions, class, class-fields-private, class-fields-public]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+ It is a Syntax Error if the derived UnaryExpression is
+ PrimaryExpression : CoverParenthesizedExpressionAndArrowParameterList and
+ CoverParenthesizedExpressionAndArrowParameterList ultimately derives a
+ phrase that, if used in place of UnaryExpression, would produce a
+ Syntax Error according to these rules. This rule is recursively applied.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+
+ x = delete (this.#m
+);
+ async #m() {}
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-member-expression-private-method-gen.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-member-expression-private-method-gen.js
new file mode 100644
index 0000000000..34b4efadd9
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-member-expression-private-method-gen.js
@@ -0,0 +1,41 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-member-expression-private-method-gen.case
+// - src/class-elements/delete-error/cls-decl-field-delete-covered.template
+/*---
+description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName generator (in field, covered)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class-methods-private, generators, class, class-fields-private, class-fields-public]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+ It is a Syntax Error if the derived UnaryExpression is
+ PrimaryExpression : CoverParenthesizedExpressionAndArrowParameterList and
+ CoverParenthesizedExpressionAndArrowParameterList ultimately derives a
+ phrase that, if used in place of UnaryExpression, would produce a
+ Syntax Error according to these rules. This rule is recursively applied.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+
+ x = delete (this.#m
+);
+ *#m() {}
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-member-expression-private-method.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-member-expression-private-method.js
new file mode 100644
index 0000000000..2cfddf0c62
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-member-expression-private-method.js
@@ -0,0 +1,41 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-member-expression-private-method.case
+// - src/class-elements/delete-error/cls-decl-field-delete-covered.template
+/*---
+description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName private ordinary method (in field, covered)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class-methods-private, class, class-fields-private, class-fields-public]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+ It is a Syntax Error if the derived UnaryExpression is
+ PrimaryExpression : CoverParenthesizedExpressionAndArrowParameterList and
+ CoverParenthesizedExpressionAndArrowParameterList ultimately derives a
+ phrase that, if used in place of UnaryExpression, would produce a
+ Syntax Error according to these rules. This rule is recursively applied.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+
+ x = delete (this.#m
+);
+
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-member-expression-private-no-reference.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-member-expression-private-no-reference.js
new file mode 100644
index 0000000000..0b939313b7
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-member-expression-private-no-reference.js
@@ -0,0 +1,40 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-member-expression-private-no-reference.case
+// - src/class-elements/delete-error/cls-decl-field-delete-covered.template
+/*---
+description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName no referencing class element (in field, covered)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-private, class-fields-public]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+ It is a Syntax Error if the derived UnaryExpression is
+ PrimaryExpression : CoverParenthesizedExpressionAndArrowParameterList and
+ CoverParenthesizedExpressionAndArrowParameterList ultimately derives a
+ phrase that, if used in place of UnaryExpression, would produce a
+ Syntax Error according to these rules. This rule is recursively applied.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+
+ x = delete (this.#m);
+
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-member-expression-privatename.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-member-expression-privatename.js
new file mode 100644
index 0000000000..c532a4fa2d
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-member-expression-privatename.js
@@ -0,0 +1,40 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-member-expression-privatename.case
+// - src/class-elements/delete-error/cls-decl-field-delete-covered.template
+/*---
+description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName private field (in field, covered)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-private, class-fields-public]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+ It is a Syntax Error if the derived UnaryExpression is
+ PrimaryExpression : CoverParenthesizedExpressionAndArrowParameterList and
+ CoverParenthesizedExpressionAndArrowParameterList ultimately derives a
+ phrase that, if used in place of UnaryExpression, would produce a
+ Syntax Error according to these rules. This rule is recursively applied.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+
+ x = delete (this.#x);
+
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-call-expression-private-method-accessor-get.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-call-expression-private-method-accessor-get.js
new file mode 100644
index 0000000000..375e2833c8
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-call-expression-private-method-accessor-get.js
@@ -0,0 +1,39 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-call-expression-private-method-accessor-get.case
+// - src/class-elements/delete-error/cls-decl-field-delete.template
+/*---
+description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName accessor get method (in field)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class-methods-private, class-fields-public, class, class-fields-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ This file must never use the onlyStrict flag as the strict mode should always
+ be observed inside class bodies.
+
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+ g = this.f;
+ x = delete g().#m;
+ f() {
+ return this;
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-call-expression-private-method-accessor-set.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-call-expression-private-method-accessor-set.js
new file mode 100644
index 0000000000..b339bee24d
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-call-expression-private-method-accessor-set.js
@@ -0,0 +1,39 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-call-expression-private-method-accessor-set.case
+// - src/class-elements/delete-error/cls-decl-field-delete.template
+/*---
+description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName accessor set method (in field)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-private, class-methods-private, class-fields-public]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ This file must never use the onlyStrict flag as the strict mode should always
+ be observed inside class bodies.
+
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+ g = this.f;
+ x = delete g().#m;
+ f() {
+ return this;
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-call-expression-private-method-async-gen.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-call-expression-private-method-async-gen.js
new file mode 100644
index 0000000000..4d5768d06f
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-call-expression-private-method-async-gen.js
@@ -0,0 +1,39 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-call-expression-private-method-async-gen.case
+// - src/class-elements/delete-error/cls-decl-field-delete.template
+/*---
+description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName async generator (in field)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class-methods-private, async-iteration, class, class-fields-private, class-fields-public]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ This file must never use the onlyStrict flag as the strict mode should always
+ be observed inside class bodies.
+
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+ g = this.f;
+ x = delete g().#m;
+ f() {
+ return this;
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-call-expression-private-method-async.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-call-expression-private-method-async.js
new file mode 100644
index 0000000000..65f6b800af
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-call-expression-private-method-async.js
@@ -0,0 +1,39 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-call-expression-private-method-async.case
+// - src/class-elements/delete-error/cls-decl-field-delete.template
+/*---
+description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName async method (in field)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class-methods-private, async-functions, class, class-fields-private, class-fields-public]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ This file must never use the onlyStrict flag as the strict mode should always
+ be observed inside class bodies.
+
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+ g = this.f;
+ x = delete g().#m;
+ f() {
+ return this;
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-call-expression-private-method-gen.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-call-expression-private-method-gen.js
new file mode 100644
index 0000000000..e06dbede59
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-call-expression-private-method-gen.js
@@ -0,0 +1,39 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-call-expression-private-method-gen.case
+// - src/class-elements/delete-error/cls-decl-field-delete.template
+/*---
+description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName generator (in field)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class-methods-private, generators, class, class-fields-private, class-fields-public]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ This file must never use the onlyStrict flag as the strict mode should always
+ be observed inside class bodies.
+
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+ g = this.f;
+ x = delete g().#m;
+ f() {
+ return this;
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-call-expression-private-method.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-call-expression-private-method.js
new file mode 100644
index 0000000000..8de8b86e6e
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-call-expression-private-method.js
@@ -0,0 +1,39 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-call-expression-private-method.case
+// - src/class-elements/delete-error/cls-decl-field-delete.template
+/*---
+description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName private ordinary method (in field)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class-methods-private, class, class-fields-private, class-fields-public]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ This file must never use the onlyStrict flag as the strict mode should always
+ be observed inside class bodies.
+
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+ g = this.f;
+ x = delete g().#m;
+ f() {
+ return this;
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-call-expression-private-no-reference.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-call-expression-private-no-reference.js
new file mode 100644
index 0000000000..a4b681b2c0
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-call-expression-private-no-reference.js
@@ -0,0 +1,39 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-call-expression-private-no-reference.case
+// - src/class-elements/delete-error/cls-decl-field-delete.template
+/*---
+description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName no referencing class element (in field)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-private, class-fields-public]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ This file must never use the onlyStrict flag as the strict mode should always
+ be observed inside class bodies.
+
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+ g = this.f;
+ x = delete g().#m;
+ f() {
+ return this;
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-call-expression-privatename.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-call-expression-privatename.js
new file mode 100644
index 0000000000..23398a4b22
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-call-expression-privatename.js
@@ -0,0 +1,39 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-call-expression-privatename.case
+// - src/class-elements/delete-error/cls-decl-field-delete.template
+/*---
+description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName private field (in field)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-private, class-fields-public]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ This file must never use the onlyStrict flag as the strict mode should always
+ be observed inside class bodies.
+
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+ g = this.f;
+ x = delete g().#x;
+ f() {
+ return this;
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-member-expression-private-method-accessor-get.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-member-expression-private-method-accessor-get.js
new file mode 100644
index 0000000000..ff62273759
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-member-expression-private-method-accessor-get.js
@@ -0,0 +1,38 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-member-expression-private-method-accessor-get.case
+// - src/class-elements/delete-error/cls-decl-field-delete.template
+/*---
+description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName accessor get method (in field)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class-methods-private, class, class-fields-private, class-fields-public]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ This file must never use the onlyStrict flag as the strict mode should always
+ be observed inside class bodies.
+
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+
+ x = delete this.#m
+;
+
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-member-expression-private-method-accessor-set.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-member-expression-private-method-accessor-set.js
new file mode 100644
index 0000000000..443d044fe8
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-member-expression-private-method-accessor-set.js
@@ -0,0 +1,38 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-member-expression-private-method-accessor-set.case
+// - src/class-elements/delete-error/cls-decl-field-delete.template
+/*---
+description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName accessor set method (in field)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class-methods-private, class, class-fields-private, class-fields-public]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ This file must never use the onlyStrict flag as the strict mode should always
+ be observed inside class bodies.
+
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+
+ x = delete this.#m
+;
+
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-member-expression-private-method-async-gen.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-member-expression-private-method-async-gen.js
new file mode 100644
index 0000000000..957c608694
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-member-expression-private-method-async-gen.js
@@ -0,0 +1,38 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-member-expression-private-method-async-gen.case
+// - src/class-elements/delete-error/cls-decl-field-delete.template
+/*---
+description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName async generator (in field)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class-methods-private, async-iteration, class, class-fields-private, class-fields-public]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ This file must never use the onlyStrict flag as the strict mode should always
+ be observed inside class bodies.
+
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+
+ x = delete this.#m
+;
+ async *#m() {}
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-member-expression-private-method-async.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-member-expression-private-method-async.js
new file mode 100644
index 0000000000..9d3045d1fe
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-member-expression-private-method-async.js
@@ -0,0 +1,38 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-member-expression-private-method-async.case
+// - src/class-elements/delete-error/cls-decl-field-delete.template
+/*---
+description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName async method (in field)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class-methods-private, async-functions, class, class-fields-private, class-fields-public]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ This file must never use the onlyStrict flag as the strict mode should always
+ be observed inside class bodies.
+
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+
+ x = delete this.#m
+;
+ async #m() {}
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-member-expression-private-method-gen.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-member-expression-private-method-gen.js
new file mode 100644
index 0000000000..841b0e7a85
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-member-expression-private-method-gen.js
@@ -0,0 +1,38 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-member-expression-private-method-gen.case
+// - src/class-elements/delete-error/cls-decl-field-delete.template
+/*---
+description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName generator (in field)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class-methods-private, generators, class, class-fields-private, class-fields-public]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ This file must never use the onlyStrict flag as the strict mode should always
+ be observed inside class bodies.
+
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+
+ x = delete this.#m
+;
+ *#m() {}
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-member-expression-private-method.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-member-expression-private-method.js
new file mode 100644
index 0000000000..75017d0272
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-member-expression-private-method.js
@@ -0,0 +1,38 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-member-expression-private-method.case
+// - src/class-elements/delete-error/cls-decl-field-delete.template
+/*---
+description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName private ordinary method (in field)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class-methods-private, class, class-fields-private, class-fields-public]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ This file must never use the onlyStrict flag as the strict mode should always
+ be observed inside class bodies.
+
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+
+ x = delete this.#m
+;
+
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-member-expression-private-no-reference.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-member-expression-private-no-reference.js
new file mode 100644
index 0000000000..b36c9bfe9d
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-member-expression-private-no-reference.js
@@ -0,0 +1,37 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-member-expression-private-no-reference.case
+// - src/class-elements/delete-error/cls-decl-field-delete.template
+/*---
+description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName no referencing class element (in field)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-private, class-fields-public]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ This file must never use the onlyStrict flag as the strict mode should always
+ be observed inside class bodies.
+
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+
+ x = delete this.#m;
+
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-member-expression-privatename.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-member-expression-privatename.js
new file mode 100644
index 0000000000..f2abd8f4df
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-member-expression-privatename.js
@@ -0,0 +1,37 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-member-expression-privatename.case
+// - src/class-elements/delete-error/cls-decl-field-delete.template
+/*---
+description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName private field (in field)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-private, class-fields-public]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ This file must never use the onlyStrict flag as the strict mode should always
+ be observed inside class bodies.
+
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+
+ x = delete this.#x;
+
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-call-expression-private-method-accessor-get.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-call-expression-private-method-accessor-get.js
new file mode 100644
index 0000000000..b4cc315b32
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-call-expression-private-method-accessor-get.js
@@ -0,0 +1,43 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-call-expression-private-method-accessor-get.case
+// - src/class-elements/delete-error/cls-decl-field-delete-twice-covered.template
+/*---
+description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName accessor get method (in field, recursively covered)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class-methods-private, class-fields-public, class, class-fields-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+ It is a Syntax Error if the derived UnaryExpression is
+ PrimaryExpression : CoverParenthesizedExpressionAndArrowParameterList and
+ CoverParenthesizedExpressionAndArrowParameterList ultimately derives a
+ phrase that, if used in place of UnaryExpression, would produce a
+ Syntax Error according to these rules. This rule is recursively applied.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+ g = this.f;
+ x = delete ((g().#m));
+
+ f() {
+ return this;
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-call-expression-private-method-accessor-set.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-call-expression-private-method-accessor-set.js
new file mode 100644
index 0000000000..439cc8f1b3
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-call-expression-private-method-accessor-set.js
@@ -0,0 +1,43 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-call-expression-private-method-accessor-set.case
+// - src/class-elements/delete-error/cls-decl-field-delete-twice-covered.template
+/*---
+description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName accessor set method (in field, recursively covered)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-private, class-methods-private, class-fields-public]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+ It is a Syntax Error if the derived UnaryExpression is
+ PrimaryExpression : CoverParenthesizedExpressionAndArrowParameterList and
+ CoverParenthesizedExpressionAndArrowParameterList ultimately derives a
+ phrase that, if used in place of UnaryExpression, would produce a
+ Syntax Error according to these rules. This rule is recursively applied.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+ g = this.f;
+ x = delete ((g().#m));
+
+ f() {
+ return this;
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-call-expression-private-method-async-gen.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-call-expression-private-method-async-gen.js
new file mode 100644
index 0000000000..af61de31e4
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-call-expression-private-method-async-gen.js
@@ -0,0 +1,43 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-call-expression-private-method-async-gen.case
+// - src/class-elements/delete-error/cls-decl-field-delete-twice-covered.template
+/*---
+description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName async generator (in field, recursively covered)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class-methods-private, async-iteration, class, class-fields-private, class-fields-public]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+ It is a Syntax Error if the derived UnaryExpression is
+ PrimaryExpression : CoverParenthesizedExpressionAndArrowParameterList and
+ CoverParenthesizedExpressionAndArrowParameterList ultimately derives a
+ phrase that, if used in place of UnaryExpression, would produce a
+ Syntax Error according to these rules. This rule is recursively applied.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+ g = this.f;
+ x = delete ((g().#m));
+
+ f() {
+ return this;
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-call-expression-private-method-async.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-call-expression-private-method-async.js
new file mode 100644
index 0000000000..793a100152
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-call-expression-private-method-async.js
@@ -0,0 +1,43 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-call-expression-private-method-async.case
+// - src/class-elements/delete-error/cls-decl-field-delete-twice-covered.template
+/*---
+description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName async method (in field, recursively covered)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class-methods-private, async-functions, class, class-fields-private, class-fields-public]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+ It is a Syntax Error if the derived UnaryExpression is
+ PrimaryExpression : CoverParenthesizedExpressionAndArrowParameterList and
+ CoverParenthesizedExpressionAndArrowParameterList ultimately derives a
+ phrase that, if used in place of UnaryExpression, would produce a
+ Syntax Error according to these rules. This rule is recursively applied.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+ g = this.f;
+ x = delete ((g().#m));
+
+ f() {
+ return this;
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-call-expression-private-method-gen.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-call-expression-private-method-gen.js
new file mode 100644
index 0000000000..221b83ffa4
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-call-expression-private-method-gen.js
@@ -0,0 +1,43 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-call-expression-private-method-gen.case
+// - src/class-elements/delete-error/cls-decl-field-delete-twice-covered.template
+/*---
+description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName generator (in field, recursively covered)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class-methods-private, generators, class, class-fields-private, class-fields-public]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+ It is a Syntax Error if the derived UnaryExpression is
+ PrimaryExpression : CoverParenthesizedExpressionAndArrowParameterList and
+ CoverParenthesizedExpressionAndArrowParameterList ultimately derives a
+ phrase that, if used in place of UnaryExpression, would produce a
+ Syntax Error according to these rules. This rule is recursively applied.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+ g = this.f;
+ x = delete ((g().#m));
+
+ f() {
+ return this;
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-call-expression-private-method.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-call-expression-private-method.js
new file mode 100644
index 0000000000..52f0c2e2bb
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-call-expression-private-method.js
@@ -0,0 +1,43 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-call-expression-private-method.case
+// - src/class-elements/delete-error/cls-decl-field-delete-twice-covered.template
+/*---
+description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName private ordinary method (in field, recursively covered)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class-methods-private, class, class-fields-private, class-fields-public]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+ It is a Syntax Error if the derived UnaryExpression is
+ PrimaryExpression : CoverParenthesizedExpressionAndArrowParameterList and
+ CoverParenthesizedExpressionAndArrowParameterList ultimately derives a
+ phrase that, if used in place of UnaryExpression, would produce a
+ Syntax Error according to these rules. This rule is recursively applied.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+ g = this.f;
+ x = delete ((g().#m));
+
+ f() {
+ return this;
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-call-expression-private-no-reference.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-call-expression-private-no-reference.js
new file mode 100644
index 0000000000..4ef6ac94fa
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-call-expression-private-no-reference.js
@@ -0,0 +1,43 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-call-expression-private-no-reference.case
+// - src/class-elements/delete-error/cls-decl-field-delete-twice-covered.template
+/*---
+description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName no referencing class element (in field, recursively covered)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-private, class-fields-public]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+ It is a Syntax Error if the derived UnaryExpression is
+ PrimaryExpression : CoverParenthesizedExpressionAndArrowParameterList and
+ CoverParenthesizedExpressionAndArrowParameterList ultimately derives a
+ phrase that, if used in place of UnaryExpression, would produce a
+ Syntax Error according to these rules. This rule is recursively applied.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+ g = this.f;
+ x = delete ((g().#m));
+
+ f() {
+ return this;
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-call-expression-privatename.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-call-expression-privatename.js
new file mode 100644
index 0000000000..5bcb6fb949
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-call-expression-privatename.js
@@ -0,0 +1,43 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-call-expression-privatename.case
+// - src/class-elements/delete-error/cls-decl-field-delete-twice-covered.template
+/*---
+description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName private field (in field, recursively covered)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-private, class-fields-public]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+ It is a Syntax Error if the derived UnaryExpression is
+ PrimaryExpression : CoverParenthesizedExpressionAndArrowParameterList and
+ CoverParenthesizedExpressionAndArrowParameterList ultimately derives a
+ phrase that, if used in place of UnaryExpression, would produce a
+ Syntax Error according to these rules. This rule is recursively applied.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+ g = this.f;
+ x = delete ((g().#x));
+
+ f() {
+ return this;
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-member-expression-private-method-accessor-get.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-member-expression-private-method-accessor-get.js
new file mode 100644
index 0000000000..eaeb4e0774
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-member-expression-private-method-accessor-get.js
@@ -0,0 +1,42 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-member-expression-private-method-accessor-get.case
+// - src/class-elements/delete-error/cls-decl-field-delete-twice-covered.template
+/*---
+description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName accessor get method (in field, recursively covered)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class-methods-private, class, class-fields-private, class-fields-public]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+ It is a Syntax Error if the derived UnaryExpression is
+ PrimaryExpression : CoverParenthesizedExpressionAndArrowParameterList and
+ CoverParenthesizedExpressionAndArrowParameterList ultimately derives a
+ phrase that, if used in place of UnaryExpression, would produce a
+ Syntax Error according to these rules. This rule is recursively applied.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+
+ x = delete ((this.#m
+));
+
+
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-member-expression-private-method-accessor-set.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-member-expression-private-method-accessor-set.js
new file mode 100644
index 0000000000..4db71f1625
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-member-expression-private-method-accessor-set.js
@@ -0,0 +1,42 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-member-expression-private-method-accessor-set.case
+// - src/class-elements/delete-error/cls-decl-field-delete-twice-covered.template
+/*---
+description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName accessor set method (in field, recursively covered)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class-methods-private, class, class-fields-private, class-fields-public]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+ It is a Syntax Error if the derived UnaryExpression is
+ PrimaryExpression : CoverParenthesizedExpressionAndArrowParameterList and
+ CoverParenthesizedExpressionAndArrowParameterList ultimately derives a
+ phrase that, if used in place of UnaryExpression, would produce a
+ Syntax Error according to these rules. This rule is recursively applied.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+
+ x = delete ((this.#m
+));
+
+
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-member-expression-private-method-async-gen.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-member-expression-private-method-async-gen.js
new file mode 100644
index 0000000000..ef92e690b5
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-member-expression-private-method-async-gen.js
@@ -0,0 +1,42 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-member-expression-private-method-async-gen.case
+// - src/class-elements/delete-error/cls-decl-field-delete-twice-covered.template
+/*---
+description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName async generator (in field, recursively covered)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class-methods-private, async-iteration, class, class-fields-private, class-fields-public]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+ It is a Syntax Error if the derived UnaryExpression is
+ PrimaryExpression : CoverParenthesizedExpressionAndArrowParameterList and
+ CoverParenthesizedExpressionAndArrowParameterList ultimately derives a
+ phrase that, if used in place of UnaryExpression, would produce a
+ Syntax Error according to these rules. This rule is recursively applied.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+
+ x = delete ((this.#m
+));
+
+ async *#m() {}
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-member-expression-private-method-async.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-member-expression-private-method-async.js
new file mode 100644
index 0000000000..22ad4c627c
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-member-expression-private-method-async.js
@@ -0,0 +1,42 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-member-expression-private-method-async.case
+// - src/class-elements/delete-error/cls-decl-field-delete-twice-covered.template
+/*---
+description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName async method (in field, recursively covered)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class-methods-private, async-functions, class, class-fields-private, class-fields-public]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+ It is a Syntax Error if the derived UnaryExpression is
+ PrimaryExpression : CoverParenthesizedExpressionAndArrowParameterList and
+ CoverParenthesizedExpressionAndArrowParameterList ultimately derives a
+ phrase that, if used in place of UnaryExpression, would produce a
+ Syntax Error according to these rules. This rule is recursively applied.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+
+ x = delete ((this.#m
+));
+
+ async #m() {}
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-member-expression-private-method-gen.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-member-expression-private-method-gen.js
new file mode 100644
index 0000000000..f2fce899b8
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-member-expression-private-method-gen.js
@@ -0,0 +1,42 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-member-expression-private-method-gen.case
+// - src/class-elements/delete-error/cls-decl-field-delete-twice-covered.template
+/*---
+description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName generator (in field, recursively covered)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class-methods-private, generators, class, class-fields-private, class-fields-public]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+ It is a Syntax Error if the derived UnaryExpression is
+ PrimaryExpression : CoverParenthesizedExpressionAndArrowParameterList and
+ CoverParenthesizedExpressionAndArrowParameterList ultimately derives a
+ phrase that, if used in place of UnaryExpression, would produce a
+ Syntax Error according to these rules. This rule is recursively applied.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+
+ x = delete ((this.#m
+));
+
+ *#m() {}
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-member-expression-private-method.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-member-expression-private-method.js
new file mode 100644
index 0000000000..eaffab2464
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-member-expression-private-method.js
@@ -0,0 +1,42 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-member-expression-private-method.case
+// - src/class-elements/delete-error/cls-decl-field-delete-twice-covered.template
+/*---
+description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName private ordinary method (in field, recursively covered)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class-methods-private, class, class-fields-private, class-fields-public]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+ It is a Syntax Error if the derived UnaryExpression is
+ PrimaryExpression : CoverParenthesizedExpressionAndArrowParameterList and
+ CoverParenthesizedExpressionAndArrowParameterList ultimately derives a
+ phrase that, if used in place of UnaryExpression, would produce a
+ Syntax Error according to these rules. This rule is recursively applied.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+
+ x = delete ((this.#m
+));
+
+
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-member-expression-private-no-reference.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-member-expression-private-no-reference.js
new file mode 100644
index 0000000000..a8c4055cb7
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-member-expression-private-no-reference.js
@@ -0,0 +1,41 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-member-expression-private-no-reference.case
+// - src/class-elements/delete-error/cls-decl-field-delete-twice-covered.template
+/*---
+description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName no referencing class element (in field, recursively covered)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-private, class-fields-public]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+ It is a Syntax Error if the derived UnaryExpression is
+ PrimaryExpression : CoverParenthesizedExpressionAndArrowParameterList and
+ CoverParenthesizedExpressionAndArrowParameterList ultimately derives a
+ phrase that, if used in place of UnaryExpression, would produce a
+ Syntax Error according to these rules. This rule is recursively applied.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+
+ x = delete ((this.#m));
+
+
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-member-expression-privatename.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-member-expression-privatename.js
new file mode 100644
index 0000000000..e8279b2f45
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-member-expression-privatename.js
@@ -0,0 +1,41 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-member-expression-privatename.case
+// - src/class-elements/delete-error/cls-decl-field-delete-twice-covered.template
+/*---
+description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName private field (in field, recursively covered)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-private, class-fields-public]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+ It is a Syntax Error if the derived UnaryExpression is
+ PrimaryExpression : CoverParenthesizedExpressionAndArrowParameterList and
+ CoverParenthesizedExpressionAndArrowParameterList ultimately derives a
+ phrase that, if used in place of UnaryExpression, would produce a
+ Syntax Error according to these rules. This rule is recursively applied.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+
+ x = delete ((this.#x));
+
+
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-call-expression-private-method-accessor-get.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-call-expression-private-method-accessor-get.js
new file mode 100644
index 0000000000..2c5e260919
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-call-expression-private-method-accessor-get.js
@@ -0,0 +1,49 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-call-expression-private-method-accessor-get.case
+// - src/class-elements/delete-error/cls-decl-method-delete-covered.template
+/*---
+description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName accessor get method (in method, covered)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class-methods-private, class-fields-public, class, class-fields-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ This file must never use the onlyStrict flag as the strict mode should always
+ be observed inside class bodies.
+
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+ It is a Syntax Error if the derived UnaryExpression is
+ PrimaryExpression : CoverParenthesizedExpressionAndArrowParameterList and
+ CoverParenthesizedExpressionAndArrowParameterList ultimately derives a
+ phrase that, if used in place of UnaryExpression, would produce a
+ Syntax Error according to these rules. This rule is recursively applied.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+
+ x() {
+ var g = this.f;
+ delete (g().#m);
+ }
+
+ f() {
+ return this;
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-call-expression-private-method-accessor-set.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-call-expression-private-method-accessor-set.js
new file mode 100644
index 0000000000..851b778f9e
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-call-expression-private-method-accessor-set.js
@@ -0,0 +1,49 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-call-expression-private-method-accessor-set.case
+// - src/class-elements/delete-error/cls-decl-method-delete-covered.template
+/*---
+description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName accessor set method (in method, covered)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-private, class-methods-private, class-fields-public]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ This file must never use the onlyStrict flag as the strict mode should always
+ be observed inside class bodies.
+
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+ It is a Syntax Error if the derived UnaryExpression is
+ PrimaryExpression : CoverParenthesizedExpressionAndArrowParameterList and
+ CoverParenthesizedExpressionAndArrowParameterList ultimately derives a
+ phrase that, if used in place of UnaryExpression, would produce a
+ Syntax Error according to these rules. This rule is recursively applied.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+
+ x() {
+ var g = this.f;
+ delete (g().#m);
+ }
+
+ f() {
+ return this;
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-call-expression-private-method-async-gen.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-call-expression-private-method-async-gen.js
new file mode 100644
index 0000000000..8c8f1c8757
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-call-expression-private-method-async-gen.js
@@ -0,0 +1,49 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-call-expression-private-method-async-gen.case
+// - src/class-elements/delete-error/cls-decl-method-delete-covered.template
+/*---
+description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName async generator (in method, covered)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class-methods-private, async-iteration, class, class-fields-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ This file must never use the onlyStrict flag as the strict mode should always
+ be observed inside class bodies.
+
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+ It is a Syntax Error if the derived UnaryExpression is
+ PrimaryExpression : CoverParenthesizedExpressionAndArrowParameterList and
+ CoverParenthesizedExpressionAndArrowParameterList ultimately derives a
+ phrase that, if used in place of UnaryExpression, would produce a
+ Syntax Error according to these rules. This rule is recursively applied.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+
+ x() {
+ var g = this.f;
+ delete (g().#m);
+ }
+
+ f() {
+ return this;
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-call-expression-private-method-async.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-call-expression-private-method-async.js
new file mode 100644
index 0000000000..cb2f115354
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-call-expression-private-method-async.js
@@ -0,0 +1,49 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-call-expression-private-method-async.case
+// - src/class-elements/delete-error/cls-decl-method-delete-covered.template
+/*---
+description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName async method (in method, covered)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class-methods-private, async-functions, class, class-fields-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ This file must never use the onlyStrict flag as the strict mode should always
+ be observed inside class bodies.
+
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+ It is a Syntax Error if the derived UnaryExpression is
+ PrimaryExpression : CoverParenthesizedExpressionAndArrowParameterList and
+ CoverParenthesizedExpressionAndArrowParameterList ultimately derives a
+ phrase that, if used in place of UnaryExpression, would produce a
+ Syntax Error according to these rules. This rule is recursively applied.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+
+ x() {
+ var g = this.f;
+ delete (g().#m);
+ }
+
+ f() {
+ return this;
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-call-expression-private-method-gen.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-call-expression-private-method-gen.js
new file mode 100644
index 0000000000..a43392bdfa
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-call-expression-private-method-gen.js
@@ -0,0 +1,49 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-call-expression-private-method-gen.case
+// - src/class-elements/delete-error/cls-decl-method-delete-covered.template
+/*---
+description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName generator (in method, covered)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class-methods-private, generators, class, class-fields-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ This file must never use the onlyStrict flag as the strict mode should always
+ be observed inside class bodies.
+
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+ It is a Syntax Error if the derived UnaryExpression is
+ PrimaryExpression : CoverParenthesizedExpressionAndArrowParameterList and
+ CoverParenthesizedExpressionAndArrowParameterList ultimately derives a
+ phrase that, if used in place of UnaryExpression, would produce a
+ Syntax Error according to these rules. This rule is recursively applied.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+
+ x() {
+ var g = this.f;
+ delete (g().#m);
+ }
+
+ f() {
+ return this;
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-call-expression-private-method.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-call-expression-private-method.js
new file mode 100644
index 0000000000..e72c2385fc
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-call-expression-private-method.js
@@ -0,0 +1,49 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-call-expression-private-method.case
+// - src/class-elements/delete-error/cls-decl-method-delete-covered.template
+/*---
+description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName private ordinary method (in method, covered)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class-methods-private, class, class-fields-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ This file must never use the onlyStrict flag as the strict mode should always
+ be observed inside class bodies.
+
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+ It is a Syntax Error if the derived UnaryExpression is
+ PrimaryExpression : CoverParenthesizedExpressionAndArrowParameterList and
+ CoverParenthesizedExpressionAndArrowParameterList ultimately derives a
+ phrase that, if used in place of UnaryExpression, would produce a
+ Syntax Error according to these rules. This rule is recursively applied.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+
+ x() {
+ var g = this.f;
+ delete (g().#m);
+ }
+
+ f() {
+ return this;
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-call-expression-private-no-reference.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-call-expression-private-no-reference.js
new file mode 100644
index 0000000000..6d0fba7c35
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-call-expression-private-no-reference.js
@@ -0,0 +1,49 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-call-expression-private-no-reference.case
+// - src/class-elements/delete-error/cls-decl-method-delete-covered.template
+/*---
+description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName no referencing class element (in method, covered)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ This file must never use the onlyStrict flag as the strict mode should always
+ be observed inside class bodies.
+
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+ It is a Syntax Error if the derived UnaryExpression is
+ PrimaryExpression : CoverParenthesizedExpressionAndArrowParameterList and
+ CoverParenthesizedExpressionAndArrowParameterList ultimately derives a
+ phrase that, if used in place of UnaryExpression, would produce a
+ Syntax Error according to these rules. This rule is recursively applied.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+
+ x() {
+ var g = this.f;
+ delete (g().#m);
+ }
+
+ f() {
+ return this;
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-call-expression-privatename.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-call-expression-privatename.js
new file mode 100644
index 0000000000..be6e92d1f8
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-call-expression-privatename.js
@@ -0,0 +1,49 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-call-expression-privatename.case
+// - src/class-elements/delete-error/cls-decl-method-delete-covered.template
+/*---
+description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName private field (in method, covered)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ This file must never use the onlyStrict flag as the strict mode should always
+ be observed inside class bodies.
+
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+ It is a Syntax Error if the derived UnaryExpression is
+ PrimaryExpression : CoverParenthesizedExpressionAndArrowParameterList and
+ CoverParenthesizedExpressionAndArrowParameterList ultimately derives a
+ phrase that, if used in place of UnaryExpression, would produce a
+ Syntax Error according to these rules. This rule is recursively applied.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+
+ x() {
+ var g = this.f;
+ delete (g().#x);
+ }
+
+ f() {
+ return this;
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-member-expression-private-method-accessor-get.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-member-expression-private-method-accessor-get.js
new file mode 100644
index 0000000000..64dc052956
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-member-expression-private-method-accessor-get.js
@@ -0,0 +1,48 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-member-expression-private-method-accessor-get.case
+// - src/class-elements/delete-error/cls-decl-method-delete-covered.template
+/*---
+description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName accessor get method (in method, covered)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class-methods-private, class, class-fields-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ This file must never use the onlyStrict flag as the strict mode should always
+ be observed inside class bodies.
+
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+ It is a Syntax Error if the derived UnaryExpression is
+ PrimaryExpression : CoverParenthesizedExpressionAndArrowParameterList and
+ CoverParenthesizedExpressionAndArrowParameterList ultimately derives a
+ phrase that, if used in place of UnaryExpression, would produce a
+ Syntax Error according to these rules. This rule is recursively applied.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+
+ x() {
+
+ delete (this.#m
+);
+ }
+
+
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-member-expression-private-method-accessor-set.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-member-expression-private-method-accessor-set.js
new file mode 100644
index 0000000000..d9459ce491
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-member-expression-private-method-accessor-set.js
@@ -0,0 +1,48 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-member-expression-private-method-accessor-set.case
+// - src/class-elements/delete-error/cls-decl-method-delete-covered.template
+/*---
+description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName accessor set method (in method, covered)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class-methods-private, class, class-fields-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ This file must never use the onlyStrict flag as the strict mode should always
+ be observed inside class bodies.
+
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+ It is a Syntax Error if the derived UnaryExpression is
+ PrimaryExpression : CoverParenthesizedExpressionAndArrowParameterList and
+ CoverParenthesizedExpressionAndArrowParameterList ultimately derives a
+ phrase that, if used in place of UnaryExpression, would produce a
+ Syntax Error according to these rules. This rule is recursively applied.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+
+ x() {
+
+ delete (this.#m
+);
+ }
+
+
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-member-expression-private-method-async-gen.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-member-expression-private-method-async-gen.js
new file mode 100644
index 0000000000..21a539de83
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-member-expression-private-method-async-gen.js
@@ -0,0 +1,48 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-member-expression-private-method-async-gen.case
+// - src/class-elements/delete-error/cls-decl-method-delete-covered.template
+/*---
+description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName async generator (in method, covered)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class-methods-private, async-iteration, class, class-fields-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ This file must never use the onlyStrict flag as the strict mode should always
+ be observed inside class bodies.
+
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+ It is a Syntax Error if the derived UnaryExpression is
+ PrimaryExpression : CoverParenthesizedExpressionAndArrowParameterList and
+ CoverParenthesizedExpressionAndArrowParameterList ultimately derives a
+ phrase that, if used in place of UnaryExpression, would produce a
+ Syntax Error according to these rules. This rule is recursively applied.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+
+ x() {
+
+ delete (this.#m
+);
+ }
+
+ async *#m() {}
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-member-expression-private-method-async.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-member-expression-private-method-async.js
new file mode 100644
index 0000000000..a5094182f6
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-member-expression-private-method-async.js
@@ -0,0 +1,48 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-member-expression-private-method-async.case
+// - src/class-elements/delete-error/cls-decl-method-delete-covered.template
+/*---
+description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName async method (in method, covered)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class-methods-private, async-functions, class, class-fields-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ This file must never use the onlyStrict flag as the strict mode should always
+ be observed inside class bodies.
+
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+ It is a Syntax Error if the derived UnaryExpression is
+ PrimaryExpression : CoverParenthesizedExpressionAndArrowParameterList and
+ CoverParenthesizedExpressionAndArrowParameterList ultimately derives a
+ phrase that, if used in place of UnaryExpression, would produce a
+ Syntax Error according to these rules. This rule is recursively applied.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+
+ x() {
+
+ delete (this.#m
+);
+ }
+
+ async #m() {}
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-member-expression-private-method-gen.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-member-expression-private-method-gen.js
new file mode 100644
index 0000000000..9b60741fed
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-member-expression-private-method-gen.js
@@ -0,0 +1,48 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-member-expression-private-method-gen.case
+// - src/class-elements/delete-error/cls-decl-method-delete-covered.template
+/*---
+description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName generator (in method, covered)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class-methods-private, generators, class, class-fields-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ This file must never use the onlyStrict flag as the strict mode should always
+ be observed inside class bodies.
+
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+ It is a Syntax Error if the derived UnaryExpression is
+ PrimaryExpression : CoverParenthesizedExpressionAndArrowParameterList and
+ CoverParenthesizedExpressionAndArrowParameterList ultimately derives a
+ phrase that, if used in place of UnaryExpression, would produce a
+ Syntax Error according to these rules. This rule is recursively applied.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+
+ x() {
+
+ delete (this.#m
+);
+ }
+
+ *#m() {}
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-member-expression-private-method.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-member-expression-private-method.js
new file mode 100644
index 0000000000..dcb09ae291
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-member-expression-private-method.js
@@ -0,0 +1,48 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-member-expression-private-method.case
+// - src/class-elements/delete-error/cls-decl-method-delete-covered.template
+/*---
+description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName private ordinary method (in method, covered)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class-methods-private, class, class-fields-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ This file must never use the onlyStrict flag as the strict mode should always
+ be observed inside class bodies.
+
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+ It is a Syntax Error if the derived UnaryExpression is
+ PrimaryExpression : CoverParenthesizedExpressionAndArrowParameterList and
+ CoverParenthesizedExpressionAndArrowParameterList ultimately derives a
+ phrase that, if used in place of UnaryExpression, would produce a
+ Syntax Error according to these rules. This rule is recursively applied.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+
+ x() {
+
+ delete (this.#m
+);
+ }
+
+
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-member-expression-private-no-reference.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-member-expression-private-no-reference.js
new file mode 100644
index 0000000000..ef2bbcd031
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-member-expression-private-no-reference.js
@@ -0,0 +1,47 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-member-expression-private-no-reference.case
+// - src/class-elements/delete-error/cls-decl-method-delete-covered.template
+/*---
+description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName no referencing class element (in method, covered)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ This file must never use the onlyStrict flag as the strict mode should always
+ be observed inside class bodies.
+
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+ It is a Syntax Error if the derived UnaryExpression is
+ PrimaryExpression : CoverParenthesizedExpressionAndArrowParameterList and
+ CoverParenthesizedExpressionAndArrowParameterList ultimately derives a
+ phrase that, if used in place of UnaryExpression, would produce a
+ Syntax Error according to these rules. This rule is recursively applied.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+
+ x() {
+
+ delete (this.#m);
+ }
+
+
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-member-expression-privatename.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-member-expression-privatename.js
new file mode 100644
index 0000000000..07c1c079c6
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-member-expression-privatename.js
@@ -0,0 +1,47 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-member-expression-privatename.case
+// - src/class-elements/delete-error/cls-decl-method-delete-covered.template
+/*---
+description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName private field (in method, covered)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ This file must never use the onlyStrict flag as the strict mode should always
+ be observed inside class bodies.
+
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+ It is a Syntax Error if the derived UnaryExpression is
+ PrimaryExpression : CoverParenthesizedExpressionAndArrowParameterList and
+ CoverParenthesizedExpressionAndArrowParameterList ultimately derives a
+ phrase that, if used in place of UnaryExpression, would produce a
+ Syntax Error according to these rules. This rule is recursively applied.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+
+ x() {
+
+ delete (this.#x);
+ }
+
+
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-call-expression-private-method-accessor-get.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-call-expression-private-method-accessor-get.js
new file mode 100644
index 0000000000..53d75c453b
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-call-expression-private-method-accessor-get.js
@@ -0,0 +1,43 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-call-expression-private-method-accessor-get.case
+// - src/class-elements/delete-error/cls-decl-method-delete.template
+/*---
+description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName accessor get method (in method)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class-methods-private, class-fields-public, class, class-fields-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ This file must never use the onlyStrict flag as the strict mode should always
+ be observed inside class bodies.
+
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+
+ x() {
+ var g = this.f;
+ delete g().#m;
+ }
+
+ f() {
+ return this;
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-call-expression-private-method-accessor-set.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-call-expression-private-method-accessor-set.js
new file mode 100644
index 0000000000..6f2aa7fd92
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-call-expression-private-method-accessor-set.js
@@ -0,0 +1,43 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-call-expression-private-method-accessor-set.case
+// - src/class-elements/delete-error/cls-decl-method-delete.template
+/*---
+description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName accessor set method (in method)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-private, class-methods-private, class-fields-public]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ This file must never use the onlyStrict flag as the strict mode should always
+ be observed inside class bodies.
+
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+
+ x() {
+ var g = this.f;
+ delete g().#m;
+ }
+
+ f() {
+ return this;
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-call-expression-private-method-async-gen.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-call-expression-private-method-async-gen.js
new file mode 100644
index 0000000000..7e393a5f54
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-call-expression-private-method-async-gen.js
@@ -0,0 +1,43 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-call-expression-private-method-async-gen.case
+// - src/class-elements/delete-error/cls-decl-method-delete.template
+/*---
+description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName async generator (in method)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class-methods-private, async-iteration, class, class-fields-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ This file must never use the onlyStrict flag as the strict mode should always
+ be observed inside class bodies.
+
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+
+ x() {
+ var g = this.f;
+ delete g().#m;
+ }
+
+ f() {
+ return this;
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-call-expression-private-method-async.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-call-expression-private-method-async.js
new file mode 100644
index 0000000000..d9e120e502
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-call-expression-private-method-async.js
@@ -0,0 +1,43 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-call-expression-private-method-async.case
+// - src/class-elements/delete-error/cls-decl-method-delete.template
+/*---
+description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName async method (in method)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class-methods-private, async-functions, class, class-fields-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ This file must never use the onlyStrict flag as the strict mode should always
+ be observed inside class bodies.
+
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+
+ x() {
+ var g = this.f;
+ delete g().#m;
+ }
+
+ f() {
+ return this;
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-call-expression-private-method-gen.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-call-expression-private-method-gen.js
new file mode 100644
index 0000000000..93c7464d97
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-call-expression-private-method-gen.js
@@ -0,0 +1,43 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-call-expression-private-method-gen.case
+// - src/class-elements/delete-error/cls-decl-method-delete.template
+/*---
+description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName generator (in method)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class-methods-private, generators, class, class-fields-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ This file must never use the onlyStrict flag as the strict mode should always
+ be observed inside class bodies.
+
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+
+ x() {
+ var g = this.f;
+ delete g().#m;
+ }
+
+ f() {
+ return this;
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-call-expression-private-method.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-call-expression-private-method.js
new file mode 100644
index 0000000000..c42ec89007
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-call-expression-private-method.js
@@ -0,0 +1,43 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-call-expression-private-method.case
+// - src/class-elements/delete-error/cls-decl-method-delete.template
+/*---
+description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName private ordinary method (in method)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class-methods-private, class, class-fields-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ This file must never use the onlyStrict flag as the strict mode should always
+ be observed inside class bodies.
+
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+
+ x() {
+ var g = this.f;
+ delete g().#m;
+ }
+
+ f() {
+ return this;
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-call-expression-private-no-reference.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-call-expression-private-no-reference.js
new file mode 100644
index 0000000000..195ace594a
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-call-expression-private-no-reference.js
@@ -0,0 +1,43 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-call-expression-private-no-reference.case
+// - src/class-elements/delete-error/cls-decl-method-delete.template
+/*---
+description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName no referencing class element (in method)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ This file must never use the onlyStrict flag as the strict mode should always
+ be observed inside class bodies.
+
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+
+ x() {
+ var g = this.f;
+ delete g().#m;
+ }
+
+ f() {
+ return this;
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-call-expression-privatename.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-call-expression-privatename.js
new file mode 100644
index 0000000000..3b157abf71
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-call-expression-privatename.js
@@ -0,0 +1,43 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-call-expression-privatename.case
+// - src/class-elements/delete-error/cls-decl-method-delete.template
+/*---
+description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName private field (in method)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ This file must never use the onlyStrict flag as the strict mode should always
+ be observed inside class bodies.
+
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+
+ x() {
+ var g = this.f;
+ delete g().#x;
+ }
+
+ f() {
+ return this;
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-member-expression-private-method-accessor-get.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-member-expression-private-method-accessor-get.js
new file mode 100644
index 0000000000..145d32372d
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-member-expression-private-method-accessor-get.js
@@ -0,0 +1,42 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-member-expression-private-method-accessor-get.case
+// - src/class-elements/delete-error/cls-decl-method-delete.template
+/*---
+description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName accessor get method (in method)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class-methods-private, class, class-fields-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ This file must never use the onlyStrict flag as the strict mode should always
+ be observed inside class bodies.
+
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+
+ x() {
+
+ delete this.#m
+;
+ }
+
+
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-member-expression-private-method-accessor-set.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-member-expression-private-method-accessor-set.js
new file mode 100644
index 0000000000..478d90b58e
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-member-expression-private-method-accessor-set.js
@@ -0,0 +1,42 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-member-expression-private-method-accessor-set.case
+// - src/class-elements/delete-error/cls-decl-method-delete.template
+/*---
+description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName accessor set method (in method)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class-methods-private, class, class-fields-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ This file must never use the onlyStrict flag as the strict mode should always
+ be observed inside class bodies.
+
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+
+ x() {
+
+ delete this.#m
+;
+ }
+
+
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-member-expression-private-method-async-gen.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-member-expression-private-method-async-gen.js
new file mode 100644
index 0000000000..ed9a763511
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-member-expression-private-method-async-gen.js
@@ -0,0 +1,42 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-member-expression-private-method-async-gen.case
+// - src/class-elements/delete-error/cls-decl-method-delete.template
+/*---
+description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName async generator (in method)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class-methods-private, async-iteration, class, class-fields-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ This file must never use the onlyStrict flag as the strict mode should always
+ be observed inside class bodies.
+
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+
+ x() {
+
+ delete this.#m
+;
+ }
+
+ async *#m() {}
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-member-expression-private-method-async.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-member-expression-private-method-async.js
new file mode 100644
index 0000000000..235ef7cafe
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-member-expression-private-method-async.js
@@ -0,0 +1,42 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-member-expression-private-method-async.case
+// - src/class-elements/delete-error/cls-decl-method-delete.template
+/*---
+description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName async method (in method)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class-methods-private, async-functions, class, class-fields-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ This file must never use the onlyStrict flag as the strict mode should always
+ be observed inside class bodies.
+
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+
+ x() {
+
+ delete this.#m
+;
+ }
+
+ async #m() {}
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-member-expression-private-method-gen.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-member-expression-private-method-gen.js
new file mode 100644
index 0000000000..2fef15be78
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-member-expression-private-method-gen.js
@@ -0,0 +1,42 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-member-expression-private-method-gen.case
+// - src/class-elements/delete-error/cls-decl-method-delete.template
+/*---
+description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName generator (in method)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class-methods-private, generators, class, class-fields-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ This file must never use the onlyStrict flag as the strict mode should always
+ be observed inside class bodies.
+
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+
+ x() {
+
+ delete this.#m
+;
+ }
+
+ *#m() {}
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-member-expression-private-method.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-member-expression-private-method.js
new file mode 100644
index 0000000000..baf9e90077
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-member-expression-private-method.js
@@ -0,0 +1,42 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-member-expression-private-method.case
+// - src/class-elements/delete-error/cls-decl-method-delete.template
+/*---
+description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName private ordinary method (in method)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class-methods-private, class, class-fields-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ This file must never use the onlyStrict flag as the strict mode should always
+ be observed inside class bodies.
+
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+
+ x() {
+
+ delete this.#m
+;
+ }
+
+
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-member-expression-private-no-reference.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-member-expression-private-no-reference.js
new file mode 100644
index 0000000000..eb8974ebbd
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-member-expression-private-no-reference.js
@@ -0,0 +1,41 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-member-expression-private-no-reference.case
+// - src/class-elements/delete-error/cls-decl-method-delete.template
+/*---
+description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName no referencing class element (in method)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ This file must never use the onlyStrict flag as the strict mode should always
+ be observed inside class bodies.
+
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+
+ x() {
+
+ delete this.#m;
+ }
+
+
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-member-expression-privatename.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-member-expression-privatename.js
new file mode 100644
index 0000000000..452281c26f
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-member-expression-privatename.js
@@ -0,0 +1,41 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-member-expression-privatename.case
+// - src/class-elements/delete-error/cls-decl-method-delete.template
+/*---
+description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName private field (in method)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ This file must never use the onlyStrict flag as the strict mode should always
+ be observed inside class bodies.
+
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+
+ x() {
+
+ delete this.#x;
+ }
+
+
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-call-expression-private-method-accessor-get.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-call-expression-private-method-accessor-get.js
new file mode 100644
index 0000000000..92d223ff91
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-call-expression-private-method-accessor-get.js
@@ -0,0 +1,49 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-call-expression-private-method-accessor-get.case
+// - src/class-elements/delete-error/cls-decl-method-delete-twice-covered.template
+/*---
+description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName accessor get method (in method, recursively covered)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class-methods-private, class-fields-public, class, class-fields-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ This file must never use the onlyStrict flag as the strict mode should always
+ be observed inside class bodies.
+
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+ It is a Syntax Error if the derived UnaryExpression is
+ PrimaryExpression : CoverParenthesizedExpressionAndArrowParameterList and
+ CoverParenthesizedExpressionAndArrowParameterList ultimately derives a
+ phrase that, if used in place of UnaryExpression, would produce a
+ Syntax Error according to these rules. This rule is recursively applied.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+
+ x() {
+ var g = this.f;
+ delete ((g().#m));
+ }
+
+ f() {
+ return this;
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-call-expression-private-method-accessor-set.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-call-expression-private-method-accessor-set.js
new file mode 100644
index 0000000000..8ff0ddbe26
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-call-expression-private-method-accessor-set.js
@@ -0,0 +1,49 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-call-expression-private-method-accessor-set.case
+// - src/class-elements/delete-error/cls-decl-method-delete-twice-covered.template
+/*---
+description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName accessor set method (in method, recursively covered)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-private, class-methods-private, class-fields-public]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ This file must never use the onlyStrict flag as the strict mode should always
+ be observed inside class bodies.
+
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+ It is a Syntax Error if the derived UnaryExpression is
+ PrimaryExpression : CoverParenthesizedExpressionAndArrowParameterList and
+ CoverParenthesizedExpressionAndArrowParameterList ultimately derives a
+ phrase that, if used in place of UnaryExpression, would produce a
+ Syntax Error according to these rules. This rule is recursively applied.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+
+ x() {
+ var g = this.f;
+ delete ((g().#m));
+ }
+
+ f() {
+ return this;
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-call-expression-private-method-async-gen.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-call-expression-private-method-async-gen.js
new file mode 100644
index 0000000000..3416671362
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-call-expression-private-method-async-gen.js
@@ -0,0 +1,49 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-call-expression-private-method-async-gen.case
+// - src/class-elements/delete-error/cls-decl-method-delete-twice-covered.template
+/*---
+description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName async generator (in method, recursively covered)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class-methods-private, async-iteration, class, class-fields-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ This file must never use the onlyStrict flag as the strict mode should always
+ be observed inside class bodies.
+
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+ It is a Syntax Error if the derived UnaryExpression is
+ PrimaryExpression : CoverParenthesizedExpressionAndArrowParameterList and
+ CoverParenthesizedExpressionAndArrowParameterList ultimately derives a
+ phrase that, if used in place of UnaryExpression, would produce a
+ Syntax Error according to these rules. This rule is recursively applied.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+
+ x() {
+ var g = this.f;
+ delete ((g().#m));
+ }
+
+ f() {
+ return this;
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-call-expression-private-method-async.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-call-expression-private-method-async.js
new file mode 100644
index 0000000000..159cc68a91
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-call-expression-private-method-async.js
@@ -0,0 +1,49 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-call-expression-private-method-async.case
+// - src/class-elements/delete-error/cls-decl-method-delete-twice-covered.template
+/*---
+description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName async method (in method, recursively covered)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class-methods-private, async-functions, class, class-fields-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ This file must never use the onlyStrict flag as the strict mode should always
+ be observed inside class bodies.
+
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+ It is a Syntax Error if the derived UnaryExpression is
+ PrimaryExpression : CoverParenthesizedExpressionAndArrowParameterList and
+ CoverParenthesizedExpressionAndArrowParameterList ultimately derives a
+ phrase that, if used in place of UnaryExpression, would produce a
+ Syntax Error according to these rules. This rule is recursively applied.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+
+ x() {
+ var g = this.f;
+ delete ((g().#m));
+ }
+
+ f() {
+ return this;
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-call-expression-private-method-gen.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-call-expression-private-method-gen.js
new file mode 100644
index 0000000000..7b67503b9c
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-call-expression-private-method-gen.js
@@ -0,0 +1,49 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-call-expression-private-method-gen.case
+// - src/class-elements/delete-error/cls-decl-method-delete-twice-covered.template
+/*---
+description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName generator (in method, recursively covered)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class-methods-private, generators, class, class-fields-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ This file must never use the onlyStrict flag as the strict mode should always
+ be observed inside class bodies.
+
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+ It is a Syntax Error if the derived UnaryExpression is
+ PrimaryExpression : CoverParenthesizedExpressionAndArrowParameterList and
+ CoverParenthesizedExpressionAndArrowParameterList ultimately derives a
+ phrase that, if used in place of UnaryExpression, would produce a
+ Syntax Error according to these rules. This rule is recursively applied.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+
+ x() {
+ var g = this.f;
+ delete ((g().#m));
+ }
+
+ f() {
+ return this;
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-call-expression-private-method.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-call-expression-private-method.js
new file mode 100644
index 0000000000..e42ca69e69
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-call-expression-private-method.js
@@ -0,0 +1,49 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-call-expression-private-method.case
+// - src/class-elements/delete-error/cls-decl-method-delete-twice-covered.template
+/*---
+description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName private ordinary method (in method, recursively covered)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class-methods-private, class, class-fields-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ This file must never use the onlyStrict flag as the strict mode should always
+ be observed inside class bodies.
+
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+ It is a Syntax Error if the derived UnaryExpression is
+ PrimaryExpression : CoverParenthesizedExpressionAndArrowParameterList and
+ CoverParenthesizedExpressionAndArrowParameterList ultimately derives a
+ phrase that, if used in place of UnaryExpression, would produce a
+ Syntax Error according to these rules. This rule is recursively applied.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+
+ x() {
+ var g = this.f;
+ delete ((g().#m));
+ }
+
+ f() {
+ return this;
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-call-expression-private-no-reference.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-call-expression-private-no-reference.js
new file mode 100644
index 0000000000..894e6dec11
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-call-expression-private-no-reference.js
@@ -0,0 +1,49 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-call-expression-private-no-reference.case
+// - src/class-elements/delete-error/cls-decl-method-delete-twice-covered.template
+/*---
+description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName no referencing class element (in method, recursively covered)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ This file must never use the onlyStrict flag as the strict mode should always
+ be observed inside class bodies.
+
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+ It is a Syntax Error if the derived UnaryExpression is
+ PrimaryExpression : CoverParenthesizedExpressionAndArrowParameterList and
+ CoverParenthesizedExpressionAndArrowParameterList ultimately derives a
+ phrase that, if used in place of UnaryExpression, would produce a
+ Syntax Error according to these rules. This rule is recursively applied.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+
+ x() {
+ var g = this.f;
+ delete ((g().#m));
+ }
+
+ f() {
+ return this;
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-call-expression-privatename.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-call-expression-privatename.js
new file mode 100644
index 0000000000..3369ed7036
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-call-expression-privatename.js
@@ -0,0 +1,49 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-call-expression-privatename.case
+// - src/class-elements/delete-error/cls-decl-method-delete-twice-covered.template
+/*---
+description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName private field (in method, recursively covered)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ This file must never use the onlyStrict flag as the strict mode should always
+ be observed inside class bodies.
+
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+ It is a Syntax Error if the derived UnaryExpression is
+ PrimaryExpression : CoverParenthesizedExpressionAndArrowParameterList and
+ CoverParenthesizedExpressionAndArrowParameterList ultimately derives a
+ phrase that, if used in place of UnaryExpression, would produce a
+ Syntax Error according to these rules. This rule is recursively applied.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+
+ x() {
+ var g = this.f;
+ delete ((g().#x));
+ }
+
+ f() {
+ return this;
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-member-expression-private-method-accessor-get.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-member-expression-private-method-accessor-get.js
new file mode 100644
index 0000000000..f2d177b212
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-member-expression-private-method-accessor-get.js
@@ -0,0 +1,48 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-member-expression-private-method-accessor-get.case
+// - src/class-elements/delete-error/cls-decl-method-delete-twice-covered.template
+/*---
+description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName accessor get method (in method, recursively covered)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class-methods-private, class, class-fields-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ This file must never use the onlyStrict flag as the strict mode should always
+ be observed inside class bodies.
+
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+ It is a Syntax Error if the derived UnaryExpression is
+ PrimaryExpression : CoverParenthesizedExpressionAndArrowParameterList and
+ CoverParenthesizedExpressionAndArrowParameterList ultimately derives a
+ phrase that, if used in place of UnaryExpression, would produce a
+ Syntax Error according to these rules. This rule is recursively applied.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+
+ x() {
+
+ delete ((this.#m
+));
+ }
+
+
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-member-expression-private-method-accessor-set.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-member-expression-private-method-accessor-set.js
new file mode 100644
index 0000000000..5dc1a2ce6b
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-member-expression-private-method-accessor-set.js
@@ -0,0 +1,48 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-member-expression-private-method-accessor-set.case
+// - src/class-elements/delete-error/cls-decl-method-delete-twice-covered.template
+/*---
+description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName accessor set method (in method, recursively covered)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class-methods-private, class, class-fields-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ This file must never use the onlyStrict flag as the strict mode should always
+ be observed inside class bodies.
+
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+ It is a Syntax Error if the derived UnaryExpression is
+ PrimaryExpression : CoverParenthesizedExpressionAndArrowParameterList and
+ CoverParenthesizedExpressionAndArrowParameterList ultimately derives a
+ phrase that, if used in place of UnaryExpression, would produce a
+ Syntax Error according to these rules. This rule is recursively applied.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+
+ x() {
+
+ delete ((this.#m
+));
+ }
+
+
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-member-expression-private-method-async-gen.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-member-expression-private-method-async-gen.js
new file mode 100644
index 0000000000..587b65efaa
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-member-expression-private-method-async-gen.js
@@ -0,0 +1,48 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-member-expression-private-method-async-gen.case
+// - src/class-elements/delete-error/cls-decl-method-delete-twice-covered.template
+/*---
+description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName async generator (in method, recursively covered)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class-methods-private, async-iteration, class, class-fields-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ This file must never use the onlyStrict flag as the strict mode should always
+ be observed inside class bodies.
+
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+ It is a Syntax Error if the derived UnaryExpression is
+ PrimaryExpression : CoverParenthesizedExpressionAndArrowParameterList and
+ CoverParenthesizedExpressionAndArrowParameterList ultimately derives a
+ phrase that, if used in place of UnaryExpression, would produce a
+ Syntax Error according to these rules. This rule is recursively applied.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+
+ x() {
+
+ delete ((this.#m
+));
+ }
+
+ async *#m() {}
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-member-expression-private-method-async.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-member-expression-private-method-async.js
new file mode 100644
index 0000000000..f76f8015b9
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-member-expression-private-method-async.js
@@ -0,0 +1,48 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-member-expression-private-method-async.case
+// - src/class-elements/delete-error/cls-decl-method-delete-twice-covered.template
+/*---
+description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName async method (in method, recursively covered)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class-methods-private, async-functions, class, class-fields-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ This file must never use the onlyStrict flag as the strict mode should always
+ be observed inside class bodies.
+
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+ It is a Syntax Error if the derived UnaryExpression is
+ PrimaryExpression : CoverParenthesizedExpressionAndArrowParameterList and
+ CoverParenthesizedExpressionAndArrowParameterList ultimately derives a
+ phrase that, if used in place of UnaryExpression, would produce a
+ Syntax Error according to these rules. This rule is recursively applied.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+
+ x() {
+
+ delete ((this.#m
+));
+ }
+
+ async #m() {}
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-member-expression-private-method-gen.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-member-expression-private-method-gen.js
new file mode 100644
index 0000000000..573901042b
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-member-expression-private-method-gen.js
@@ -0,0 +1,48 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-member-expression-private-method-gen.case
+// - src/class-elements/delete-error/cls-decl-method-delete-twice-covered.template
+/*---
+description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName generator (in method, recursively covered)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class-methods-private, generators, class, class-fields-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ This file must never use the onlyStrict flag as the strict mode should always
+ be observed inside class bodies.
+
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+ It is a Syntax Error if the derived UnaryExpression is
+ PrimaryExpression : CoverParenthesizedExpressionAndArrowParameterList and
+ CoverParenthesizedExpressionAndArrowParameterList ultimately derives a
+ phrase that, if used in place of UnaryExpression, would produce a
+ Syntax Error according to these rules. This rule is recursively applied.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+
+ x() {
+
+ delete ((this.#m
+));
+ }
+
+ *#m() {}
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-member-expression-private-method.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-member-expression-private-method.js
new file mode 100644
index 0000000000..e5467a13e3
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-member-expression-private-method.js
@@ -0,0 +1,48 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-member-expression-private-method.case
+// - src/class-elements/delete-error/cls-decl-method-delete-twice-covered.template
+/*---
+description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName private ordinary method (in method, recursively covered)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class-methods-private, class, class-fields-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ This file must never use the onlyStrict flag as the strict mode should always
+ be observed inside class bodies.
+
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+ It is a Syntax Error if the derived UnaryExpression is
+ PrimaryExpression : CoverParenthesizedExpressionAndArrowParameterList and
+ CoverParenthesizedExpressionAndArrowParameterList ultimately derives a
+ phrase that, if used in place of UnaryExpression, would produce a
+ Syntax Error according to these rules. This rule is recursively applied.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+
+ x() {
+
+ delete ((this.#m
+));
+ }
+
+
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-member-expression-private-no-reference.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-member-expression-private-no-reference.js
new file mode 100644
index 0000000000..568d177eaf
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-member-expression-private-no-reference.js
@@ -0,0 +1,47 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-member-expression-private-no-reference.case
+// - src/class-elements/delete-error/cls-decl-method-delete-twice-covered.template
+/*---
+description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName no referencing class element (in method, recursively covered)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ This file must never use the onlyStrict flag as the strict mode should always
+ be observed inside class bodies.
+
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+ It is a Syntax Error if the derived UnaryExpression is
+ PrimaryExpression : CoverParenthesizedExpressionAndArrowParameterList and
+ CoverParenthesizedExpressionAndArrowParameterList ultimately derives a
+ phrase that, if used in place of UnaryExpression, would produce a
+ Syntax Error according to these rules. This rule is recursively applied.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+
+ x() {
+
+ delete ((this.#m));
+ }
+
+
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-member-expression-privatename.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-member-expression-privatename.js
new file mode 100644
index 0000000000..60ba271d21
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-member-expression-privatename.js
@@ -0,0 +1,47 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/err-delete-member-expression-privatename.case
+// - src/class-elements/delete-error/cls-decl-method-delete-twice-covered.template
+/*---
+description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName private field (in method, recursively covered)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-private]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ This file must never use the onlyStrict flag as the strict mode should always
+ be observed inside class bodies.
+
+ Static Semantics: Early Errors
+
+ UnaryExpression : delete UnaryExpression
+
+ It is a Syntax Error if the UnaryExpression is contained in strict mode
+ code and the derived UnaryExpression is
+ PrimaryExpression : IdentifierReference ,
+ MemberExpression : MemberExpression.PrivateName , or
+ CallExpression : CallExpression.PrivateName .
+
+ It is a Syntax Error if the derived UnaryExpression is
+ PrimaryExpression : CoverParenthesizedExpressionAndArrowParameterList and
+ CoverParenthesizedExpressionAndArrowParameterList ultimately derives a
+ phrase that, if used in place of UnaryExpression, would produce a
+ Syntax Error according to these rules. This rule is recursively applied.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+
+ x() {
+
+ delete ((this.#x));
+ }
+
+
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/shell.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/shell.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/shell.js
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-class-body-ctor-duplicate.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-class-body-ctor-duplicate.js
new file mode 100644
index 0000000000..db30575dd6
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-class-body-ctor-duplicate.js
@@ -0,0 +1,26 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-class-body-ctor-duplicate.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: It is a SyntaxError if the class body has more than one constructor (class declaration)
+esid: prod-ClassElement
+features: [class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ClassBody : ClassElementList
+ It is a Syntax Error if PrototypePropertyNameList of ClassElementList contains more
+ than one occurrence of "constructor".
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ constructor() {}
+ constructor() {}
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-ctor-super-no-heritage.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-ctor-super-no-heritage.js
new file mode 100644
index 0000000000..70fbce6ef2
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-ctor-super-no-heritage.js
@@ -0,0 +1,30 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-ctor-super-no-heritage.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: It is a SyntaxError if class has no heritage and constructor has a direct super (class declaration)
+esid: prod-ClassElement
+features: [class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ClassTail : ClassHeritageopt { ClassBody }
+
+ It is a Syntax Error if ClassHeritage is not present and the following algorithm evaluates to true:
+ 1. Let constructor be ConstructorMethod of ClassBody.
+ 2. If constructor is empty, return false.
+ 3. Return HasDirectSuper of constructor.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ constructor() {
+ super();
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-field-identifier-invalid-ues-error.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-field-identifier-invalid-ues-error.js
new file mode 100644
index 0000000000..8da16c9904
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-field-identifier-invalid-ues-error.js
@@ -0,0 +1,71 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-field-identifier-invalid-ues-error.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: Invalid FieldDefinition, ClassElementName, PropertyName Syntax (class declaration)
+esid: prod-ClassElement
+features: [class-fields-public, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PropertyName :
+ LiteralPropertyName
+ ComputedPropertyName
+
+ LiteralPropertyName :
+ IdentifierName
+ StringLiteral
+ NumericLiteral
+
+ 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".
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ \u0000;
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-field-identifier-invalid-zwj-error.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-field-identifier-invalid-zwj-error.js
new file mode 100644
index 0000000000..6b445d097d
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-field-identifier-invalid-zwj-error.js
@@ -0,0 +1,71 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-field-identifier-invalid-zwj-error.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: Invalid FieldDefinition, ClassElementName, PropertyName Syntax (class declaration)
+esid: prod-ClassElement
+features: [class-fields-public, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PropertyName :
+ LiteralPropertyName
+ ComputedPropertyName
+
+ LiteralPropertyName :
+ IdentifierName
+ StringLiteral
+ NumericLiteral
+
+ 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".
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ \u200D_ZWJ;
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-field-identifier-invalid-zwnj-error.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-field-identifier-invalid-zwnj-error.js
new file mode 100644
index 0000000000..da49b2eddb
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-field-identifier-invalid-zwnj-error.js
@@ -0,0 +1,71 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-field-identifier-invalid-zwnj-error.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: Invalid FieldDefinition, ClassElementName, PropertyName Syntax (class declaration)
+esid: prod-ClassElement
+features: [class-fields-public, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PropertyName :
+ LiteralPropertyName
+ ComputedPropertyName
+
+ LiteralPropertyName :
+ IdentifierName
+ StringLiteral
+ NumericLiteral
+
+ 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".
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ \u200C_ZWNJ;
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-fields-same-line-error.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-fields-same-line-error.js
new file mode 100644
index 0000000000..be7608def1
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-fields-same-line-error.js
@@ -0,0 +1,34 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-fields-same-line-error.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: SyntaxError (class declaration)
+esid: prod-ClassElement
+features: [class-fields-public, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ x y
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-private-environment-on-class-heritage-array-literal.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-private-environment-on-class-heritage-array-literal.js
new file mode 100644
index 0000000000..de14f96cd7
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-private-environment-on-class-heritage-array-literal.js
@@ -0,0 +1,40 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-private-environment-on-class-heritage-array-literal.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: It's a SyntaxError if an array literal evaluated on ClassHeritage uses a private name. (class declaration)
+esid: prod-ClassElement
+features: [class-fields-private, class-fields-public, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Runtime Semantics: ClassDefinitionEvaluation
+
+ ClassTail : ClassHeritage { ClassBody }
+ ...
+ 5. Let outerPrivateEnvironment be the PrivateEnvironment of the running execution context.
+ 6. Let classPrivateEnvironment be NewDeclarativeEnvironment(outerPrivateEnvironment).
+ 7. Let classPrivateEnvRec be classPrivateEnvironment's EnvironmentRecord.
+ 8. If ClassBodyopt is present, then
+ a. For each element dn of the PrivateBoundIdentifiers of ClassBodyopt,
+ i. Perform classPrivateEnvRec.CreateImmutableBinding(dn, true).
+ 9. If ClassHeritageopt is not present, then
+ a. Let protoParent be the intrinsic object %ObjectPrototype%.
+ b. Let constructorParent be the intrinsic object %FunctionPrototype%.
+ 10. Else,
+ a. Set the running execution context's LexicalEnvironment to classScope.
+ b. NOTE: The running execution context's PrivateEnvironment is outerPrivateEnvironment when evaluating ClassHeritage.
+ ...
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C extends (o) => [o.#foo]
+{
+ #foo;
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-private-environment-on-class-heritage-chained-usage.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-private-environment-on-class-heritage-chained-usage.js
new file mode 100644
index 0000000000..94986520f9
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-private-environment-on-class-heritage-chained-usage.js
@@ -0,0 +1,40 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-private-environment-on-class-heritage-chained-usage.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: It's a SyntaxError if a class expression evaluated on ClassHeritage uses an private name declared on subclass. (class declaration)
+esid: prod-ClassElement
+features: [class-fields-private, class-fields-public, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Runtime Semantics: ClassDefinitionEvaluation
+
+ ClassTail : ClassHeritage { ClassBody }
+ ...
+ 5. Let outerPrivateEnvironment be the PrivateEnvironment of the running execution context.
+ 6. Let classPrivateEnvironment be NewDeclarativeEnvironment(outerPrivateEnvironment).
+ 7. Let classPrivateEnvRec be classPrivateEnvironment's EnvironmentRecord.
+ 8. If ClassBodyopt is present, then
+ a. For each element dn of the PrivateBoundIdentifiers of ClassBodyopt,
+ i. Perform classPrivateEnvRec.CreateImmutableBinding(dn, true).
+ 9. If ClassHeritageopt is not present, then
+ a. Let protoParent be the intrinsic object %ObjectPrototype%.
+ b. Let constructorParent be the intrinsic object %FunctionPrototype%.
+ 10. Else,
+ a. Set the running execution context's LexicalEnvironment to classScope.
+ b. NOTE: The running execution context's PrivateEnvironment is outerPrivateEnvironment when evaluating ClassHeritage.
+ ...
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C extends class extends class extends class { x = this.#foo; } { #foo; x = this.#bar; } { #bar; x = this.#fuz; }
+{
+ #fuz;
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-private-environment-on-class-heritage-function-expression.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-private-environment-on-class-heritage-function-expression.js
new file mode 100644
index 0000000000..2d65e00933
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-private-environment-on-class-heritage-function-expression.js
@@ -0,0 +1,40 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-private-environment-on-class-heritage-function-expression.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: It's a SyntaxError if a function expression evaluated on ClassHeritage uses a private name. (class declaration)
+esid: prod-ClassElement
+features: [class-fields-private, class-fields-public, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Runtime Semantics: ClassDefinitionEvaluation
+
+ ClassTail : ClassHeritage { ClassBody }
+ ...
+ 5. Let outerPrivateEnvironment be the PrivateEnvironment of the running execution context.
+ 6. Let classPrivateEnvironment be NewDeclarativeEnvironment(outerPrivateEnvironment).
+ 7. Let classPrivateEnvRec be classPrivateEnvironment's EnvironmentRecord.
+ 8. If ClassBodyopt is present, then
+ a. For each element dn of the PrivateBoundIdentifiers of ClassBodyopt,
+ i. Perform classPrivateEnvRec.CreateImmutableBinding(dn, true).
+ 9. If ClassHeritageopt is not present, then
+ a. Let protoParent be the intrinsic object %ObjectPrototype%.
+ b. Let constructorParent be the intrinsic object %FunctionPrototype%.
+ 10. Else,
+ a. Set the running execution context's LexicalEnvironment to classScope.
+ b. NOTE: The running execution context's PrivateEnvironment is outerPrivateEnvironment when evaluating ClassHeritage.
+ ...
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C extends function() { x = this.#foo; }
+{
+ #foo;
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-private-environment-on-class-heritage-obj-literal.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-private-environment-on-class-heritage-obj-literal.js
new file mode 100644
index 0000000000..014716a774
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-private-environment-on-class-heritage-obj-literal.js
@@ -0,0 +1,40 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-private-environment-on-class-heritage-obj-literal.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: It's a SyntaxError if a object literal evaluated on ClassHeritage uses a private name. (class declaration)
+esid: prod-ClassElement
+features: [class-fields-private, class-fields-public, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Runtime Semantics: ClassDefinitionEvaluation
+
+ ClassTail : ClassHeritage { ClassBody }
+ ...
+ 5. Let outerPrivateEnvironment be the PrivateEnvironment of the running execution context.
+ 6. Let classPrivateEnvironment be NewDeclarativeEnvironment(outerPrivateEnvironment).
+ 7. Let classPrivateEnvRec be classPrivateEnvironment's EnvironmentRecord.
+ 8. If ClassBodyopt is present, then
+ a. For each element dn of the PrivateBoundIdentifiers of ClassBodyopt,
+ i. Perform classPrivateEnvRec.CreateImmutableBinding(dn, true).
+ 9. If ClassHeritageopt is not present, then
+ a. Let protoParent be the intrinsic object %ObjectPrototype%.
+ b. Let constructorParent be the intrinsic object %FunctionPrototype%.
+ 10. Else,
+ a. Set the running execution context's LexicalEnvironment to classScope.
+ b. NOTE: The running execution context's PrivateEnvironment is outerPrivateEnvironment when evaluating ClassHeritage.
+ ...
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C extends (o) => {x: o.#foo}
+{
+ #foo;
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-private-environment-on-class-heritage-recursive.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-private-environment-on-class-heritage-recursive.js
new file mode 100644
index 0000000000..0b8435a1a0
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-private-environment-on-class-heritage-recursive.js
@@ -0,0 +1,40 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-private-environment-on-class-heritage-recursive.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: It's a SyntaxError if a class expression evaluated on ClassHeritage of a ClassHeritage uses an undeclared private name. (class declaration)
+esid: prod-ClassElement
+features: [class-fields-private, class-fields-public, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Runtime Semantics: ClassDefinitionEvaluation
+
+ ClassTail : ClassHeritage { ClassBody }
+ ...
+ 5. Let outerPrivateEnvironment be the PrivateEnvironment of the running execution context.
+ 6. Let classPrivateEnvironment be NewDeclarativeEnvironment(outerPrivateEnvironment).
+ 7. Let classPrivateEnvRec be classPrivateEnvironment's EnvironmentRecord.
+ 8. If ClassBodyopt is present, then
+ a. For each element dn of the PrivateBoundIdentifiers of ClassBodyopt,
+ i. Perform classPrivateEnvRec.CreateImmutableBinding(dn, true).
+ 9. If ClassHeritageopt is not present, then
+ a. Let protoParent be the intrinsic object %ObjectPrototype%.
+ b. Let constructorParent be the intrinsic object %FunctionPrototype%.
+ 10. Else,
+ a. Set the running execution context's LexicalEnvironment to classScope.
+ b. NOTE: The running execution context's PrivateEnvironment is outerPrivateEnvironment when evaluating ClassHeritage.
+ ...
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C extends class extends class { x = this.#foo; } {}
+{
+ #foo;
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-private-environment-on-class-heritage.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-private-environment-on-class-heritage.js
new file mode 100644
index 0000000000..b981b75d32
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-private-environment-on-class-heritage.js
@@ -0,0 +1,40 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-private-environment-on-class-heritage.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: It's a SyntaxError if a class expression evaluated on ClassHeritage uses an undeclared private name. (class declaration)
+esid: prod-ClassElement
+features: [class-fields-private, class-fields-public, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Runtime Semantics: ClassDefinitionEvaluation
+
+ ClassTail : ClassHeritage { ClassBody }
+ ...
+ 5. Let outerPrivateEnvironment be the PrivateEnvironment of the running execution context.
+ 6. Let classPrivateEnvironment be NewDeclarativeEnvironment(outerPrivateEnvironment).
+ 7. Let classPrivateEnvRec be classPrivateEnvironment's EnvironmentRecord.
+ 8. If ClassBodyopt is present, then
+ a. For each element dn of the PrivateBoundIdentifiers of ClassBodyopt,
+ i. Perform classPrivateEnvRec.CreateImmutableBinding(dn, true).
+ 9. If ClassHeritageopt is not present, then
+ a. Let protoParent be the intrinsic object %ObjectPrototype%.
+ b. Let constructorParent be the intrinsic object %FunctionPrototype%.
+ 10. Else,
+ a. Set the running execution context's LexicalEnvironment to classScope.
+ b. NOTE: The running execution context's PrivateEnvironment is outerPrivateEnvironment when evaluating ClassHeritage.
+ ...
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C extends class { x = this.#foo; }
+{
+ #foo;
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-private-field-on-object-destructuring.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-private-field-on-object-destructuring.js
new file mode 100644
index 0000000000..8254217109
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-private-field-on-object-destructuring.js
@@ -0,0 +1,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;
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-private-field-super-access.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-private-field-super-access.js
new file mode 100644
index 0000000000..e690edec34
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-private-field-super-access.js
@@ -0,0 +1,36 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-private-field-super-access.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: Acessing private field from super is not a valid syntax (class declaration)
+esid: prod-ClassElement
+features: [class-fields-private, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Updated Productions
+
+ MemberExpression[Yield]:
+ MemberExpression[?Yield].PrivateName
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #m = function() { return 'test262'; };
+
+ Child = class extends C {
+ access() {
+ return super.#m;
+ }
+
+ method() {
+ return super.#m();
+ }
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-async-gen.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-async-gen.js
new file mode 100644
index 0000000000..2e03782e03
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-async-gen.js
@@ -0,0 +1,27 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-privatemeth-duplicate-async-gen.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: It's a SyntaxError if a class contains a private async generator and a private field with the same name (class declaration)
+esid: prod-ClassElement
+features: [class-methods-private, class-fields-private, async-iteration, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ ClassBody : ClassElementList
+ It is a Syntax Error if PrivateBoundNames of ClassBody contains any duplicate entries, unless the name is used once for a getter and once for a setter and in no other entries.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #m;
+ async * #m() {}
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-async.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-async.js
new file mode 100644
index 0000000000..17162a0fa1
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-async.js
@@ -0,0 +1,27 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-privatemeth-duplicate-async.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: It's a SyntaxError if a class contains a private async function and a private field with the same name (class declaration)
+esid: prod-ClassElement
+features: [class-methods-private, class-fields-private, async-functions, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ ClassBody : ClassElementList
+ It is a Syntax Error if PrivateBoundNames of ClassBody contains any duplicate entries, unless the name is used once for a getter and once for a setter and in no other entries.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #m;
+ async #m() {}
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-gen.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-gen.js
new file mode 100644
index 0000000000..446d1695c8
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-gen.js
@@ -0,0 +1,27 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-privatemeth-duplicate-gen.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: It's a SyntaxError if a class contains a private generator and a private field with the same name (class declaration)
+esid: prod-ClassElement
+features: [class-methods-private, class-fields-private, generators, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ ClassBody : ClassElementList
+ It is a Syntax Error if PrivateBoundNames of ClassBody contains any duplicate entries, unless the name is used once for a getter and once for a setter and in no other entries.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #m;
+ * #m() {}
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-get-field.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-get-field.js
new file mode 100644
index 0000000000..a8f957f57a
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-get-field.js
@@ -0,0 +1,27 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-privatemeth-duplicate-get-field.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: It's a SyntaxError if a class contains a private getter and a private field with the same name (class declaration)
+esid: prod-ClassElement
+features: [class-methods-private, class-fields-private, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ ClassBody : ClassElementList
+ It is a Syntax Error if PrivateBoundNames of ClassBody contains any duplicate entries, unless the name is used once for a getter and once for a setter and in no other entries.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #m;
+ get #m() {}
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-get-get.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-get-get.js
new file mode 100644
index 0000000000..e9267a0cb9
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-get-get.js
@@ -0,0 +1,27 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-privatemeth-duplicate-get-get.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: It's a SyntaxError if a class contains multiple private getters with the same name (class declaration)
+esid: prod-ClassElement
+features: [class-methods-private, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ ClassBody : ClassElementList
+ It is a Syntax Error if PrivateBoundNames of ClassBody contains any duplicate entries, unless the name is used once for a getter and once for a setter and in no other entries.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ get #m() {}
+ get #m() {}
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-meth-field.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-meth-field.js
new file mode 100644
index 0000000000..063ae79cf2
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-meth-field.js
@@ -0,0 +1,27 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-privatemeth-duplicate-meth-field.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: It's a SyntaxError if a class contains a private method and a private field with the same name (class declaration)
+esid: prod-ClassElement
+features: [class-methods-private, class-fields-private, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ ClassBody : ClassElementList
+ It is a Syntax Error if PrivateBoundNames of ClassBody contains any duplicate entries, unless the name is used once for a getter and once for a setter and in no other entries.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #m;
+ #m() {}
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-meth-get.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-meth-get.js
new file mode 100644
index 0000000000..e7ceedf914
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-meth-get.js
@@ -0,0 +1,27 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-privatemeth-duplicate-meth-get.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: It's a SyntaxError if a class contains a private method and a private getter with the same name (class declaration)
+esid: prod-ClassElement
+features: [class-methods-private, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ ClassBody : ClassElementList
+ It is a Syntax Error if PrivateBoundNames of ClassBody contains any duplicate entries, unless the name is used once for a getter and once for a setter and in no other entries.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ get #m() {}
+ #m() {}
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-meth-meth.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-meth-meth.js
new file mode 100644
index 0000000000..9b67e895f7
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-meth-meth.js
@@ -0,0 +1,27 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-privatemeth-duplicate-meth-meth.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: It's a SyntaxError if a class contains multiple private methods with the same name (class declaration)
+esid: prod-ClassElement
+features: [class-methods-private, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ ClassBody : ClassElementList
+ It is a Syntax Error if PrivateBoundNames of ClassBody contains any duplicate entries, unless the name is used once for a getter and once for a setter and in no other entries.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #m() {}
+ #m() {}
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-meth-set.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-meth-set.js
new file mode 100644
index 0000000000..732c8f0717
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-meth-set.js
@@ -0,0 +1,27 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-privatemeth-duplicate-meth-set.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: It's a SyntaxError if a class contains a private method and a private setter with the same name (class declaration)
+esid: prod-ClassElement
+features: [class-methods-private, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ ClassBody : ClassElementList
+ It is a Syntax Error if PrivateBoundNames of ClassBody contains any duplicate entries, unless the name is used once for a getter and once for a setter and in no other entries.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ set #m(_) {}
+ #m() {}
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-meth-staticfield.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-meth-staticfield.js
new file mode 100644
index 0000000000..2a4f444bb7
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-meth-staticfield.js
@@ -0,0 +1,27 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-privatemeth-duplicate-meth-staticfield.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: It's a SyntaxError if a class contains a private method and a private static field with the same name (class declaration)
+esid: prod-ClassElement
+features: [class-methods-private, class-static-fields-private, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ ClassBody : ClassElementList
+ It is a Syntax Error if PrivateBoundNames of ClassBody contains any duplicate entries, unless the name is used once for a getter and once for a setter and in no other entries.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ static #m;
+ #m() {}
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-meth-staticmeth.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-meth-staticmeth.js
new file mode 100644
index 0000000000..c505a7eac5
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-meth-staticmeth.js
@@ -0,0 +1,27 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-privatemeth-duplicate-meth-staticmeth.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: It's a SyntaxError if a class contains a private method and a private static method with the same name (class declaration)
+esid: prod-ClassElement
+features: [class-methods-private, class-static-methods-private, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ ClassBody : ClassElementList
+ It is a Syntax Error if PrivateBoundNames of ClassBody contains any duplicate entries, unless the name is used once for a getter and once for a setter and in no other entries.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ static #m() {}
+ #m() {}
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-set-field.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-set-field.js
new file mode 100644
index 0000000000..42710bd0d7
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-set-field.js
@@ -0,0 +1,27 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-privatemeth-duplicate-set-field.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: It's a SyntaxError if a class contains a private setter and a private field with the same name (class declaration)
+esid: prod-ClassElement
+features: [class-methods-private, class-fields-private, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ ClassBody : ClassElementList
+ It is a Syntax Error if PrivateBoundNames of ClassBody contains any duplicate entries, unless the name is used once for a getter and once for a setter and in no other entries.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #m;
+ set #m(_) {}
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-set-set.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-set-set.js
new file mode 100644
index 0000000000..209cf3c7be
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-set-set.js
@@ -0,0 +1,27 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-privatemeth-duplicate-set-set.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: It's a SyntaxError if a class contains multiple private setters with the same name (class declaration)
+esid: prod-ClassElement
+features: [class-methods-private, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ ClassBody : ClassElementList
+ It is a Syntax Error if PrivateBoundNames of ClassBody contains any duplicate entries, unless the name is used once for a getter and once for a setter and in no other entries.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ set #m(_) {}
+ set #m(_) {}
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-constructor.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-constructor.js
new file mode 100644
index 0000000000..2662c8dc9a
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-constructor.js
@@ -0,0 +1,26 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-privatename-constructor.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: Private Fields cannot be named constructor (class declaration)
+esid: prod-ClassElement
+features: [class-fields-private, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Class Definitions / Static Semantics: Early Errors
+
+ ClassElementName : PrivateName ;
+ It is a Syntax Error if StringValue of PrivateName is "#constructor"
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #constructor
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-error.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-error.js
new file mode 100644
index 0000000000..1dd4589a4a
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-error.js
@@ -0,0 +1,37 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-privatename-error.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: No space allowed between sigial and IdentifierName (class declaration)
+esid: prod-ClassElement
+features: [class-fields-private, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ # x
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-identifier-invalid-ues.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-identifier-invalid-ues.js
new file mode 100644
index 0000000000..a30cc3819d
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-identifier-invalid-ues.js
@@ -0,0 +1,65 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-privatename-identifier-invalid-ues.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: Valid PrivateName Syntax (class declaration)
+esid: prod-ClassElement
+features: [class-fields-private, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #\u0000;
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-identifier-invalid-zwj-error.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-identifier-invalid-zwj-error.js
new file mode 100644
index 0000000000..03d1346bc9
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-identifier-invalid-zwj-error.js
@@ -0,0 +1,66 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-privatename-identifier-invalid-zwj-error.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: Valid PrivateName Syntax (class declaration)
+esid: prod-ClassElement
+features: [class-fields-private, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #\u200D_ZWJ;
+
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-identifier-invalid-zwnj-error.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-identifier-invalid-zwnj-error.js
new file mode 100644
index 0000000000..d08d92b990
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-identifier-invalid-zwnj-error.js
@@ -0,0 +1,66 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-privatename-identifier-invalid-zwnj-error.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: Valid PrivateName Syntax (class declaration)
+esid: prod-ClassElement
+features: [class-fields-private, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #\u200C_ZWNJ;
+
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-in-computed-property-missing.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-in-computed-property-missing.js
new file mode 100644
index 0000000000..ea4682b234
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-in-computed-property-missing.js
@@ -0,0 +1,53 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-privatename-in-computed-property-missing.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: Use of undeclared PrivateName in ComputedProperty is a syntax error (class declaration)
+esid: prod-ClassElement
+features: [class-fields-private, class-fields-public, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ClassElementName:
+ PropertyName
+ PrivateIdentifier
+
+ PropertyName:
+ LiteralPropertyName
+ ComputedPropertyName
+
+ ComputedPropertyName:
+ [ AssignmentExpression ]
+
+ AssignmentExpression ... MemberExpression
+
+ MemberExpression:
+ MemberExpression . PrivateName
+
+ Static Semantics: AllPrivateIdentifiersValid
+ AllPrivateIdentifiersValid is an abstract operation which takes names as an argument.
+
+ MemberExpression : MemberExpression . PrivateIdentifier
+ 1. If StringValue of PrivateIdentifier is in names, return true.
+ 2. Return false.
+
+ ClassBody : ClassElementList
+ 1. Let newNames be the concatenation of names with PrivateBoundIdentifiers of ClassBody.
+ 2. Return AllPrivateIdentifiersValid of ClassElementList with the argument newNames.
+
+ Static Semantics: Early Errors
+
+ ScriptBody : StatementList
+ It is a Syntax Error if AllPrivateIdentifiersValid of StatementList with an empty List as an argument is false unless the source code is eval code that is being processed by a direct eval.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ [this.#f] = 'Test262'
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-whitespace-error-accessor-get-meth.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-whitespace-error-accessor-get-meth.js
new file mode 100644
index 0000000000..cff10054a3
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-whitespace-error-accessor-get-meth.js
@@ -0,0 +1,30 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-privatename-whitespace-error-accessor-get-meth.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: No space allowed between sigil and IdentifierName () (class declaration)
+esid: prod-ClassElement
+features: [class-methods-private, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Updated Productions
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ get # m() {}
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-whitespace-error-accessor-set-meth.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-whitespace-error-accessor-set-meth.js
new file mode 100644
index 0000000000..0868afc3c9
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-whitespace-error-accessor-set-meth.js
@@ -0,0 +1,30 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-privatename-whitespace-error-accessor-set-meth.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: No space allowed between sigil and IdentifierName (Accessor set Method) (class declaration)
+esid: prod-ClassElement
+features: [class-methods-private, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Updated Productions
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ set # m(_) {}
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-whitespace-error-async-gen-meth.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-whitespace-error-async-gen-meth.js
new file mode 100644
index 0000000000..0eb87b2265
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-whitespace-error-async-gen-meth.js
@@ -0,0 +1,30 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-privatename-whitespace-error-async-gen-meth.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: No space allowed between sigil and IdentifierName (Async Generator Method) (class declaration)
+esid: prod-ClassElement
+features: [async-iteration, class-methods-private, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Updated Productions
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ async * # m() {}
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-whitespace-error-async-meth.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-whitespace-error-async-meth.js
new file mode 100644
index 0000000000..4faf4f22df
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-whitespace-error-async-meth.js
@@ -0,0 +1,30 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-privatename-whitespace-error-async-meth.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: No space allowed between sigil and IdentifierName (Async Method) (class declaration)
+esid: prod-ClassElement
+features: [async-functions, class-methods-private, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Updated Productions
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ async # m() {}
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-whitespace-error-call-expr.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-whitespace-error-call-expr.js
new file mode 100644
index 0000000000..a458dfd915
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-whitespace-error-call-expr.js
@@ -0,0 +1,40 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-privatename-whitespace-error-call-expr.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: No space allowed between sigil and IdentifierName (CallExpression) (class declaration)
+esid: prod-ClassElement
+features: [class-fields-private, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Updated Productions
+
+ MemberExpression :
+ MemberExpression . PrivateName
+
+ CallExpression :
+ CallExpression . PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+
+ f() {
+ return this;
+ }
+
+ m() {
+ this.f().# x;
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-whitespace-error-field-init.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-whitespace-error-field-init.js
new file mode 100644
index 0000000000..4dc6ea1095
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-whitespace-error-field-init.js
@@ -0,0 +1,30 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-privatename-whitespace-error-field-init.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: No space allowed between sigil and IdentifierName (Field with Initializer) (class declaration)
+esid: prod-ClassElement
+features: [class-fields-private, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Updated Productions
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ # x = 1;
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-whitespace-error-field.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-whitespace-error-field.js
new file mode 100644
index 0000000000..ca62d39397
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-whitespace-error-field.js
@@ -0,0 +1,30 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-privatename-whitespace-error-field.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: No space allowed between sigil and IdentifierName (Field) (class declaration)
+esid: prod-ClassElement
+features: [class-fields-private, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Updated Productions
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ # x;
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-whitespace-error-gen-meth.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-whitespace-error-gen-meth.js
new file mode 100644
index 0000000000..d16e23ef6f
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-whitespace-error-gen-meth.js
@@ -0,0 +1,30 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-privatename-whitespace-error-gen-meth.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: No space allowed between sigil and IdentifierName (Generator Method) (class declaration)
+esid: prod-ClassElement
+features: [generators, class-methods-private, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Updated Productions
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ * # m() {}
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-whitespace-error-member-expr.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-whitespace-error-member-expr.js
new file mode 100644
index 0000000000..34dd6ab17d
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-whitespace-error-member-expr.js
@@ -0,0 +1,35 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-privatename-whitespace-error-member-expr.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: No space allowed between sigil and IdentifierName (MemberExpression) (class declaration)
+esid: prod-ClassElement
+features: [class-fields-private, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Updated Productions
+
+ MemberExpression :
+ MemberExpression . PrivateName
+
+ CallExpression :
+ CallExpression . PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x;
+ m() {
+ this.# x;
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-whitespace-error-meth.case.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-whitespace-error-meth.case.js
new file mode 100644
index 0000000000..b43126fdf4
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-whitespace-error-meth.case.js
@@ -0,0 +1,30 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-privatename-whitespace-error-meth.case.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: No space allowed between sigil and IdentifierName (Method) (class declaration)
+esid: prod-ClassElement
+features: [class-methods-private, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Updated Productions
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ # m() {}
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-whitespace-error-static-accessor-get-meth.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-whitespace-error-static-accessor-get-meth.js
new file mode 100644
index 0000000000..baf73f5c4c
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-whitespace-error-static-accessor-get-meth.js
@@ -0,0 +1,30 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-privatename-whitespace-error-static-accessor-get-meth.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: No space allowed between sigil and IdentifierName (Static Accessor get Method) (class declaration)
+esid: prod-ClassElement
+features: [class-static-methods-private, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Updated Productions
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ static get # m() {}
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-whitespace-error-static-accessor-set-meth.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-whitespace-error-static-accessor-set-meth.js
new file mode 100644
index 0000000000..1bdb780ff9
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-whitespace-error-static-accessor-set-meth.js
@@ -0,0 +1,30 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-privatename-whitespace-error-static-accessor-set-meth.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: No space allowed between sigil and IdentifierName (Static Accessor set Method) (class declaration)
+esid: prod-ClassElement
+features: [class-static-methods-private, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Updated Productions
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ static set # m(_) {}
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-whitespace-error-static-async-gen-meth.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-whitespace-error-static-async-gen-meth.js
new file mode 100644
index 0000000000..dba900b549
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-whitespace-error-static-async-gen-meth.js
@@ -0,0 +1,30 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-privatename-whitespace-error-static-async-gen-meth.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: No space allowed between sigil and IdentifierName (Static Async Generator Method) (class declaration)
+esid: prod-ClassElement
+features: [async-iteration, class-static-methods-private, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Updated Productions
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ static async * # m() {}
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-whitespace-error-static-async-meth.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-whitespace-error-static-async-meth.js
new file mode 100644
index 0000000000..9f6173efa6
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-whitespace-error-static-async-meth.js
@@ -0,0 +1,30 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-privatename-whitespace-error-static-async-meth.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: No space allowed between sigil and IdentifierName (Async Method) (class declaration)
+esid: prod-ClassElement
+features: [class-static-methods-private, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Updated Productions
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ static async # m() {}
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-whitespace-error-static-field-init.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-whitespace-error-static-field-init.js
new file mode 100644
index 0000000000..0ad5d4d5ad
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-whitespace-error-static-field-init.js
@@ -0,0 +1,30 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-privatename-whitespace-error-static-field-init.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: No space allowed between sigil and IdentifierName (Static Field with Initializer) (class declaration)
+esid: prod-ClassElement
+features: [class-static-fields-private, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Updated Productions
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ static # x = 1;
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-whitespace-error-static-field.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-whitespace-error-static-field.js
new file mode 100644
index 0000000000..eb8f843799
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-whitespace-error-static-field.js
@@ -0,0 +1,30 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-privatename-whitespace-error-static-field.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: No space allowed between sigil and IdentifierName (Static Field) (class declaration)
+esid: prod-ClassElement
+features: [class-static-fields-private, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Updated Productions
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ static # x;
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-whitespace-error-static-gen-meth.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-whitespace-error-static-gen-meth.js
new file mode 100644
index 0000000000..54b6ecabcc
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-whitespace-error-static-gen-meth.js
@@ -0,0 +1,30 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-privatename-whitespace-error-static-gen-meth.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: No space allowed between sigil and IdentifierName (Static Generator Method) (class declaration)
+esid: prod-ClassElement
+features: [generators, class-static-methods-private, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Updated Productions
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ static * # m() {}
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-whitespace-error-static-meth.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-whitespace-error-static-meth.js
new file mode 100644
index 0000000000..36eeb8909e
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatename-whitespace-error-static-meth.js
@@ -0,0 +1,30 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-privatename-whitespace-error-static-meth.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: No space allowed between sigil and IdentifierName (Static Method) (class declaration)
+esid: prod-ClassElement
+features: [class-static-methods-private, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Updated Productions
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ static # m() {}
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatenames-same-line-error.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatenames-same-line-error.js
new file mode 100644
index 0000000000..c8864ba6d1
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-privatenames-same-line-error.js
@@ -0,0 +1,37 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-privatenames-same-line-error.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: SyntaxError (class declaration)
+esid: prod-ClassElement
+features: [class-fields-private, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ #x #y
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-special-meth-contains-super-async-gen.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-special-meth-contains-super-async-gen.js
new file mode 100644
index 0000000000..aab8077de5
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-special-meth-contains-super-async-gen.js
@@ -0,0 +1,28 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-special-meth-contains-super-async-gen.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: Async Generator Methods cannot contain direct super (class declaration)
+esid: prod-ClassElement
+features: [async-iteration, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Class Definitions / Static Semantics: Early Errors
+
+ ClassElement : MethodDefinition
+ It is a Syntax Error if PropName of MethodDefinition is not "constructor" and HasDirectSuper of MethodDefinition is true.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C extends Function{
+ async * method() {
+ super();
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-special-meth-contains-super-async.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-special-meth-contains-super-async.js
new file mode 100644
index 0000000000..747a8d620c
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-special-meth-contains-super-async.js
@@ -0,0 +1,28 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-special-meth-contains-super-async.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: Async Methods cannot contain direct super (class declaration)
+esid: prod-ClassElement
+features: [async-functions, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Class Definitions / Static Semantics: Early Errors
+
+ ClassElement : MethodDefinition
+ It is a Syntax Error if PropName of MethodDefinition is not "constructor" and HasDirectSuper of MethodDefinition is true.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C extends Function{
+ async method() {
+ super();
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-special-meth-contains-super-gen.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-special-meth-contains-super-gen.js
new file mode 100644
index 0000000000..99f1e7063c
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-special-meth-contains-super-gen.js
@@ -0,0 +1,28 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-special-meth-contains-super-gen.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: Generator Methods cannot contain direct super (class declaration)
+esid: prod-ClassElement
+features: [generators, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Class Definitions / Static Semantics: Early Errors
+
+ ClassElement : MethodDefinition
+ It is a Syntax Error if PropName of MethodDefinition is not "constructor" and HasDirectSuper of MethodDefinition is true.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C extends Function{
+ * method() {
+ super();
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-special-meth-contains-super-get.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-special-meth-contains-super-get.js
new file mode 100644
index 0000000000..a048d184b3
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-special-meth-contains-super-get.js
@@ -0,0 +1,28 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-special-meth-contains-super-get.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: Accessor get Methods cannot contain direct super (class declaration)
+esid: prod-ClassElement
+features: [class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Class Definitions / Static Semantics: Early Errors
+
+ ClassElement : MethodDefinition
+ It is a Syntax Error if PropName of MethodDefinition is not "constructor" and HasDirectSuper of MethodDefinition is true.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C extends Function{
+ get method() {
+ super();
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-special-meth-contains-super-method.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-special-meth-contains-super-method.js
new file mode 100644
index 0000000000..0875eaebee
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-special-meth-contains-super-method.js
@@ -0,0 +1,28 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-special-meth-contains-super-method.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: Methods cannot contain direct super (class declaration)
+esid: prod-ClassElement
+features: [class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Class Definitions / Static Semantics: Early Errors
+
+ ClassElement : MethodDefinition
+ It is a Syntax Error if PropName of MethodDefinition is not "constructor" and HasDirectSuper of MethodDefinition is true.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C extends Function{
+ method() {
+ super();
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-special-meth-contains-super-private-async-gen.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-special-meth-contains-super-private-async-gen.js
new file mode 100644
index 0000000000..3e917f35d0
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-special-meth-contains-super-private-async-gen.js
@@ -0,0 +1,28 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-special-meth-contains-super-private-async-gen.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: Private Async Generators Methods cannot contain direct super (class declaration)
+esid: prod-ClassElement
+features: [async-iteration, class-methods-private, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Class Definitions / Static Semantics: Early Errors
+
+ ClassElement : MethodDefinition
+ It is a Syntax Error if PropName of MethodDefinition is not "constructor" and HasDirectSuper of MethodDefinition is true.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C extends Function{
+ async * #method() {
+ super();
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-special-meth-contains-super-private-async.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-special-meth-contains-super-private-async.js
new file mode 100644
index 0000000000..fc85b76c65
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-special-meth-contains-super-private-async.js
@@ -0,0 +1,28 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-special-meth-contains-super-private-async.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: Private Async Methods cannot contain direct super (class declaration)
+esid: prod-ClassElement
+features: [async-functions, class-methods-private, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Class Definitions / Static Semantics: Early Errors
+
+ ClassElement : MethodDefinition
+ It is a Syntax Error if PropName of MethodDefinition is not "constructor" and HasDirectSuper of MethodDefinition is true.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C extends Function{
+ async #method() {
+ super();
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-special-meth-contains-super-private-gen.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-special-meth-contains-super-private-gen.js
new file mode 100644
index 0000000000..fedbf4f537
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-special-meth-contains-super-private-gen.js
@@ -0,0 +1,28 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-special-meth-contains-super-private-gen.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: Private Generators Methods cannot contain direct super (class declaration)
+esid: prod-ClassElement
+features: [generators, class-methods-private, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Class Definitions / Static Semantics: Early Errors
+
+ ClassElement : MethodDefinition
+ It is a Syntax Error if PropName of MethodDefinition is not "constructor" and HasDirectSuper of MethodDefinition is true.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C extends Function{
+ * #method() {
+ super();
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-special-meth-contains-super-private-method.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-special-meth-contains-super-private-method.js
new file mode 100644
index 0000000000..225be8c596
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-special-meth-contains-super-private-method.js
@@ -0,0 +1,28 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-special-meth-contains-super-private-method.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: Private Methods cannot contain direct super (class declaration)
+esid: prod-ClassElement
+features: [class-methods-private, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Class Definitions / Static Semantics: Early Errors
+
+ ClassElement : MethodDefinition
+ It is a Syntax Error if PropName of MethodDefinition is not "constructor" and HasDirectSuper of MethodDefinition is true.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C extends Function{
+ #method() {
+ super();
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-special-meth-contains-super-set.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-special-meth-contains-super-set.js
new file mode 100644
index 0000000000..61e1a5822d
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-special-meth-contains-super-set.js
@@ -0,0 +1,28 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-special-meth-contains-super-set.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: Accessor set Methods cannot contain direct super (class declaration)
+esid: prod-ClassElement
+features: [class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Class Definitions / Static Semantics: Early Errors
+
+ ClassElement : MethodDefinition
+ It is a Syntax Error if PropName of MethodDefinition is not "constructor" and HasDirectSuper of MethodDefinition is true.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C extends Function{
+ set method(_) {
+ super();
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-special-meth-ctor-async-gen.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-special-meth-ctor-async-gen.js
new file mode 100644
index 0000000000..dd194f37ca
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-special-meth-ctor-async-gen.js
@@ -0,0 +1,26 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-special-meth-ctor-async-gen.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: Async Generator Methods cannot be named "constructor" (class declaration)
+esid: prod-ClassElement
+features: [async-iteration, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Class Definitions / Static Semantics: Early Errors
+
+ ClassElement : MethodDefinition
+ It is a Syntax Error if PropName of MethodDefinition is "constructor" and SpecialMethod of MethodDefinition is true.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ async * constructor() {}
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-special-meth-ctor-async-meth.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-special-meth-ctor-async-meth.js
new file mode 100644
index 0000000000..060b9ba43b
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-special-meth-ctor-async-meth.js
@@ -0,0 +1,26 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-special-meth-ctor-async-meth.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: Async Methods cannot be named "constructor" (class declaration)
+esid: prod-ClassElement
+features: [async-functions, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Class Definitions / Static Semantics: Early Errors
+
+ ClassElement : MethodDefinition
+ It is a Syntax Error if PropName of MethodDefinition is "constructor" and SpecialMethod of MethodDefinition is true.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ async constructor() {}
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-special-meth-ctor-gen.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-special-meth-ctor-gen.js
new file mode 100644
index 0000000000..450de53c77
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-special-meth-ctor-gen.js
@@ -0,0 +1,26 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-special-meth-ctor-gen.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: Generator Methods cannot be named "constructor" (class declaration)
+esid: prod-ClassElement
+features: [generators, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Class Definitions / Static Semantics: Early Errors
+
+ ClassElement : MethodDefinition
+ It is a Syntax Error if PropName of MethodDefinition is "constructor" and SpecialMethod of MethodDefinition is true.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ * constructor() {}
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-special-meth-ctor-get.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-special-meth-ctor-get.js
new file mode 100644
index 0000000000..00c65e6241
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-special-meth-ctor-get.js
@@ -0,0 +1,26 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-special-meth-ctor-get.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: Accessor get Methods cannot be named "constructor" (class declaration)
+esid: prod-ClassElement
+features: [class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Class Definitions / Static Semantics: Early Errors
+
+ ClassElement : MethodDefinition
+ It is a Syntax Error if PropName of MethodDefinition is "constructor" and SpecialMethod of MethodDefinition is true.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ get constructor() {}
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-special-meth-ctor-set.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-special-meth-ctor-set.js
new file mode 100644
index 0000000000..8f256e51c3
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-special-meth-ctor-set.js
@@ -0,0 +1,26 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-special-meth-ctor-set.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: Accessor set Methods cannot be named "constructor" (class declaration)
+esid: prod-ClassElement
+features: [class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Class Definitions / Static Semantics: Early Errors
+
+ ClassElement : MethodDefinition
+ It is a Syntax Error if PropName of MethodDefinition is "constructor" and SpecialMethod of MethodDefinition is true.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ set constructor(_) {}
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-async-gen-meth-prototype.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-async-gen-meth-prototype.js
new file mode 100644
index 0000000000..2441d89e52
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-async-gen-meth-prototype.js
@@ -0,0 +1,26 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-static-async-gen-meth-prototype.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: Static Async Generator Methods cannot be named prototype (class declaration)
+esid: prod-ClassElement
+features: [async-iteration, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Class Definitions / Static Semantics: Early Errors
+
+ ClassElement : static MethodDefinition
+ It is a Syntax Error if PropName of MethodDefinition is "prototype"
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ static async * prototype() {}
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-async-gen-meth-super.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-async-gen-meth-super.js
new file mode 100644
index 0000000000..25c654dfb0
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-async-gen-meth-super.js
@@ -0,0 +1,28 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-static-async-gen-meth-super.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: Static Async Generator Methods cannot contain direct super (class declaration)
+esid: prod-ClassElement
+features: [async-iteration, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Class Definitions / Static Semantics: Early Errors
+
+ ClassElement : static MethodDefinition
+ It is a Syntax Error if HasDirectSuper of MethodDefinition is true.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C extends Function{
+ static async * method() {
+ super();
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-async-meth-prototype.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-async-meth-prototype.js
new file mode 100644
index 0000000000..dc9adf1f87
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-async-meth-prototype.js
@@ -0,0 +1,26 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-static-async-meth-prototype.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: Static Async Methods cannot be named prototype (class declaration)
+esid: prod-ClassElement
+features: [async-functions, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Class Definitions / Static Semantics: Early Errors
+
+ ClassElement : static MethodDefinition
+ It is a Syntax Error if PropName of MethodDefinition is "prototype"
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ static async prototype() {}
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-async-meth-super.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-async-meth-super.js
new file mode 100644
index 0000000000..04d2fce7c7
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-async-meth-super.js
@@ -0,0 +1,28 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-static-async-meth-super.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: Static Async Methods cannot contain direct super (class declaration)
+esid: prod-ClassElement
+features: [async-functions, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Class Definitions / Static Semantics: Early Errors
+
+ ClassElement : static MethodDefinition
+ It is a Syntax Error if HasDirectSuper of MethodDefinition is true.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C extends Function{
+ static async method() {
+ super();
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-gen-meth-prototype.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-gen-meth-prototype.js
new file mode 100644
index 0000000000..9b9c8652eb
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-gen-meth-prototype.js
@@ -0,0 +1,26 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-static-gen-meth-prototype.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: Static Generator Methods cannot be named prototype (class declaration)
+esid: prod-ClassElement
+features: [generators, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Class Definitions / Static Semantics: Early Errors
+
+ ClassElement : static MethodDefinition
+ It is a Syntax Error if PropName of MethodDefinition is "prototype"
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ static * prototype() {}
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-gen-meth-super.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-gen-meth-super.js
new file mode 100644
index 0000000000..d24645e094
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-gen-meth-super.js
@@ -0,0 +1,28 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-static-gen-meth-super.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: Static Generator Methods cannot contain direct super (class declaration)
+esid: prod-ClassElement
+features: [generators, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Class Definitions / Static Semantics: Early Errors
+
+ ClassElement : static MethodDefinition
+ It is a Syntax Error if HasDirectSuper of MethodDefinition is true.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C extends Function{
+ static * method() {
+ super();
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-get-meth-prototype.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-get-meth-prototype.js
new file mode 100644
index 0000000000..bec83f9f53
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-get-meth-prototype.js
@@ -0,0 +1,26 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-static-get-meth-prototype.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: Static Accessor get Methods cannot be named prototype (class declaration)
+esid: prod-ClassElement
+features: [class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Class Definitions / Static Semantics: Early Errors
+
+ ClassElement : static MethodDefinition
+ It is a Syntax Error if PropName of MethodDefinition is "prototype"
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ static get prototype() {}
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-get-meth-super.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-get-meth-super.js
new file mode 100644
index 0000000000..9512bc196d
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-get-meth-super.js
@@ -0,0 +1,28 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-static-get-meth-super.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: Static Accessor get Methods cannot contain direct super (class declaration)
+esid: prod-ClassElement
+features: [class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Class Definitions / Static Semantics: Early Errors
+
+ ClassElement : static MethodDefinition
+ It is a Syntax Error if HasDirectSuper of MethodDefinition is true.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C extends Function{
+ static get method() {
+ super();
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-meth-prototype.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-meth-prototype.js
new file mode 100644
index 0000000000..1266ed80d5
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-meth-prototype.js
@@ -0,0 +1,26 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-static-meth-prototype.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: Static Methods cannot be named prototype (class declaration)
+esid: prod-ClassElement
+features: [class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Class Definitions / Static Semantics: Early Errors
+
+ ClassElement : static MethodDefinition
+ It is a Syntax Error if PropName of MethodDefinition is "prototype"
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ static prototype() {}
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-meth-super.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-meth-super.js
new file mode 100644
index 0000000000..8ae98066f7
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-meth-super.js
@@ -0,0 +1,28 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-static-meth-super.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: Static Methods cannot contain direct super (class declaration)
+esid: prod-ClassElement
+features: [class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Class Definitions / Static Semantics: Early Errors
+
+ ClassElement : static MethodDefinition
+ It is a Syntax Error if HasDirectSuper of MethodDefinition is true.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C extends Function{
+ static method() {
+ super();
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-private-async-gen-meth-constructor.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-private-async-gen-meth-constructor.js
new file mode 100644
index 0000000000..758ef67cb1
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-private-async-gen-meth-constructor.js
@@ -0,0 +1,26 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-static-private-async-gen-meth-constructor.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: Static Async Generator Private Methods cannot be named constructor (class declaration)
+esid: prod-ClassElement
+features: [async-iteration, class-static-methods-private, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Class Definitions / Static Semantics: Early Errors
+
+ ClassElementName : PrivateName ;
+ It is a Syntax Error if StringValue of PrivateName is "#constructor"
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ static async * #constructor() {}
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-private-async-gen-meth-super.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-private-async-gen-meth-super.js
new file mode 100644
index 0000000000..19b6d5b5d8
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-private-async-gen-meth-super.js
@@ -0,0 +1,28 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-static-private-async-gen-meth-super.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: Static Async Generator Private Methods cannot contain direct super (class declaration)
+esid: prod-ClassElement
+features: [async-iteration, class-static-methods-private, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Class Definitions / Static Semantics: Early Errors
+
+ ClassElement : static MethodDefinition
+ It is a Syntax Error if HasDirectSuper of MethodDefinition is true.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C extends Function{
+ static async * #method() {
+ super();
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-private-async-meth-constructor.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-private-async-meth-constructor.js
new file mode 100644
index 0000000000..da9f303bc8
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-private-async-meth-constructor.js
@@ -0,0 +1,26 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-static-private-async-meth-constructor.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: Static Async Private Methods cannot be named constructor (class declaration)
+esid: prod-ClassElement
+features: [async-functions, class-static-methods-private, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Class Definitions / Static Semantics: Early Errors
+
+ ClassElementName : PrivateName ;
+ It is a Syntax Error if StringValue of PrivateName is "#constructor"
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ static async #constructor() {}
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-private-async-meth-super.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-private-async-meth-super.js
new file mode 100644
index 0000000000..cf74261edd
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-private-async-meth-super.js
@@ -0,0 +1,28 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-static-private-async-meth-super.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: Static Async Private Methods cannot contain direct super (class declaration)
+esid: prod-ClassElement
+features: [async-functions, class-static-methods-private, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Class Definitions / Static Semantics: Early Errors
+
+ ClassElement : static MethodDefinition
+ It is a Syntax Error if HasDirectSuper of MethodDefinition is true.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C extends Function{
+ static async #method() {
+ super();
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-private-gen-meth-constructor.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-private-gen-meth-constructor.js
new file mode 100644
index 0000000000..4f5d06c598
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-private-gen-meth-constructor.js
@@ -0,0 +1,26 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-static-private-gen-meth-constructor.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: Static Generator Private Methods cannot be named constructor (class declaration)
+esid: prod-ClassElement
+features: [generators, class-static-methods-private, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Class Definitions / Static Semantics: Early Errors
+
+ ClassElementName : PrivateName ;
+ It is a Syntax Error if StringValue of PrivateName is "#constructor"
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ static * #constructor() {}
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-private-gen-meth-super.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-private-gen-meth-super.js
new file mode 100644
index 0000000000..e325b10007
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-private-gen-meth-super.js
@@ -0,0 +1,28 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-static-private-gen-meth-super.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: Static Generator Private Methods cannot contain direct super (class declaration)
+esid: prod-ClassElement
+features: [generators, class-static-methods-private, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Class Definitions / Static Semantics: Early Errors
+
+ ClassElement : static MethodDefinition
+ It is a Syntax Error if HasDirectSuper of MethodDefinition is true.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C extends Function{
+ static * #method() {
+ super();
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-private-meth-constructor.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-private-meth-constructor.js
new file mode 100644
index 0000000000..e1631c7cf4
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-private-meth-constructor.js
@@ -0,0 +1,26 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-static-private-meth-constructor.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: Static Private Methods cannot be named constructor (class declaration)
+esid: prod-ClassElement
+features: [class-static-methods-private, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Class Definitions / Static Semantics: Early Errors
+
+ ClassElementName : PrivateName ;
+ It is a Syntax Error if StringValue of PrivateName is "#constructor"
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ static #constructor() {}
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-private-meth-super.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-private-meth-super.js
new file mode 100644
index 0000000000..9518ab56ff
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-private-meth-super.js
@@ -0,0 +1,28 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-static-private-meth-super.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: Static Private Methods cannot contain direct super (class declaration)
+esid: prod-ClassElement
+features: [class-static-methods-private, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Class Definitions / Static Semantics: Early Errors
+
+ ClassElement : static MethodDefinition
+ It is a Syntax Error if HasDirectSuper of MethodDefinition is true.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C extends Function{
+ static #method() {
+ super();
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-privatename-constructor.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-privatename-constructor.js
new file mode 100644
index 0000000000..5384df5dfe
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-privatename-constructor.js
@@ -0,0 +1,26 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-static-privatename-constructor.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: Static Private Fields cannot be named constructor (class declaration)
+esid: prod-ClassElement
+features: [class-static-fields-private, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Class Definitions / Static Semantics: Early Errors
+
+ ClassElementName : PrivateName ;
+ It is a Syntax Error if StringValue of PrivateName is "#constructor"
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ static #constructor
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-set-meth-prototype.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-set-meth-prototype.js
new file mode 100644
index 0000000000..24c099802d
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-set-meth-prototype.js
@@ -0,0 +1,26 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-static-set-meth-prototype.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: Static Accessor set Methods cannot be named prototype (class declaration)
+esid: prod-ClassElement
+features: [class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Class Definitions / Static Semantics: Early Errors
+
+ ClassElement : static MethodDefinition
+ It is a Syntax Error if PropName of MethodDefinition is "prototype"
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ static set prototype(_) {}
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-set-meth-super.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-set-meth-super.js
new file mode 100644
index 0000000000..66475a758c
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-set-meth-super.js
@@ -0,0 +1,28 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-static-set-meth-super.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: Static Accessor set Methods cannot contain direct super (class declaration)
+esid: prod-ClassElement
+features: [class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Class Definitions / Static Semantics: Early Errors
+
+ ClassElement : static MethodDefinition
+ It is a Syntax Error if HasDirectSuper of MethodDefinition is true.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C extends Function{
+ static set method(_) {
+ super();
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/browser.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/browser.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/browser.js
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/field-init-call-expression-bad-reference.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/field-init-call-expression-bad-reference.js
new file mode 100644
index 0000000000..40c53ece98
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/field-init-call-expression-bad-reference.js
@@ -0,0 +1,43 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/invalid-private-names/call-expression-bad-reference.case
+// - src/invalid-private-names/default/cls-decl-field-initializer.template
+/*---
+description: bad reference in call expression (Invalid private names should throw a SyntaxError, class field initializer in class declaration)
+esid: sec-static-semantics-early-errors
+features: [class-fields-private, class, class-fields-public]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ScriptBody:StatementList
+ It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
+ as an argument is false unless the source code is eval code that is being
+ processed by a direct eval.
+
+ ModuleBody:ModuleItemList
+ It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
+ as an argument is false.
+
+
+ Static Semantics: AllPrivateNamesValid
+
+ MemberExpression : MemberExpression . PrivateName
+
+ 1. If StringValue of PrivateName is in names, return true.
+ 2. Return false.
+
+ CallExpression : CallExpression . PrivateName
+
+ 1. If StringValue of PrivateName is in names, return true.
+ 2. Return false.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ f = (() => {})().#x
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/field-init-call-expression-this.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/field-init-call-expression-this.js
new file mode 100644
index 0000000000..68341532c1
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/field-init-call-expression-this.js
@@ -0,0 +1,43 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/invalid-private-names/call-expression-this.case
+// - src/invalid-private-names/default/cls-decl-field-initializer.template
+/*---
+description: this evaluated in call expression (Invalid private names should throw a SyntaxError, class field initializer in class declaration)
+esid: sec-static-semantics-early-errors
+features: [class-fields-private, class, class-fields-public]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ScriptBody:StatementList
+ It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
+ as an argument is false unless the source code is eval code that is being
+ processed by a direct eval.
+
+ ModuleBody:ModuleItemList
+ It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
+ as an argument is false.
+
+
+ Static Semantics: AllPrivateNamesValid
+
+ MemberExpression : MemberExpression . PrivateName
+
+ 1. If StringValue of PrivateName is in names, return true.
+ 2. Return false.
+
+ CallExpression : CallExpression . PrivateName
+
+ 1. If StringValue of PrivateName is in names, return true.
+ 2. Return false.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ f = (() => this)().#x
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/field-init-fn-call-expression-bad-reference.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/field-init-fn-call-expression-bad-reference.js
new file mode 100644
index 0000000000..615c5a91d8
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/field-init-fn-call-expression-bad-reference.js
@@ -0,0 +1,43 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/invalid-private-names/call-expression-bad-reference.case
+// - src/invalid-private-names/default/cls-decl-field-initializer-fn.template
+/*---
+description: bad reference in call expression (Invalid private names should throw a SyntaxError, function in class field initializer in class declaration)
+esid: sec-static-semantics-early-errors
+features: [class-fields-private, class, class-fields-public]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ScriptBody:StatementList
+ It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
+ as an argument is false unless the source code is eval code that is being
+ processed by a direct eval.
+
+ ModuleBody:ModuleItemList
+ It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
+ as an argument is false.
+
+
+ Static Semantics: AllPrivateNamesValid
+
+ MemberExpression : MemberExpression . PrivateName
+
+ 1. If StringValue of PrivateName is in names, return true.
+ 2. Return false.
+
+ CallExpression : CallExpression . PrivateName
+
+ 1. If StringValue of PrivateName is in names, return true.
+ 2. Return false.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ f = function() { (() => {})().#x }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/field-init-fn-call-expression-this.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/field-init-fn-call-expression-this.js
new file mode 100644
index 0000000000..953d7c6f8f
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/field-init-fn-call-expression-this.js
@@ -0,0 +1,43 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/invalid-private-names/call-expression-this.case
+// - src/invalid-private-names/default/cls-decl-field-initializer-fn.template
+/*---
+description: this evaluated in call expression (Invalid private names should throw a SyntaxError, function in class field initializer in class declaration)
+esid: sec-static-semantics-early-errors
+features: [class-fields-private, class, class-fields-public]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ScriptBody:StatementList
+ It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
+ as an argument is false unless the source code is eval code that is being
+ processed by a direct eval.
+
+ ModuleBody:ModuleItemList
+ It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
+ as an argument is false.
+
+
+ Static Semantics: AllPrivateNamesValid
+
+ MemberExpression : MemberExpression . PrivateName
+
+ 1. If StringValue of PrivateName is in names, return true.
+ 2. Return false.
+
+ CallExpression : CallExpression . PrivateName
+
+ 1. If StringValue of PrivateName is in names, return true.
+ 2. Return false.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ f = function() { (() => this)().#x }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/field-init-fn-member-expression-bad-reference.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/field-init-fn-member-expression-bad-reference.js
new file mode 100644
index 0000000000..060ba0152f
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/field-init-fn-member-expression-bad-reference.js
@@ -0,0 +1,43 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/invalid-private-names/member-expression-bad-reference.case
+// - src/invalid-private-names/default/cls-decl-field-initializer-fn.template
+/*---
+description: bad reference in member expression (Invalid private names should throw a SyntaxError, function in class field initializer in class declaration)
+esid: sec-static-semantics-early-errors
+features: [class-fields-private, class, class-fields-public]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ScriptBody:StatementList
+ It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
+ as an argument is false unless the source code is eval code that is being
+ processed by a direct eval.
+
+ ModuleBody:ModuleItemList
+ It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
+ as an argument is false.
+
+
+ Static Semantics: AllPrivateNamesValid
+
+ MemberExpression : MemberExpression . PrivateName
+
+ 1. If StringValue of PrivateName is in names, return true.
+ 2. Return false.
+
+ CallExpression : CallExpression . PrivateName
+
+ 1. If StringValue of PrivateName is in names, return true.
+ 2. Return false.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ f = function() { something.#x }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/field-init-fn-member-expression-this.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/field-init-fn-member-expression-this.js
new file mode 100644
index 0000000000..c2852bb8a7
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/field-init-fn-member-expression-this.js
@@ -0,0 +1,43 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/invalid-private-names/member-expression-this.case
+// - src/invalid-private-names/default/cls-decl-field-initializer-fn.template
+/*---
+description: this reference in member expression (Invalid private names should throw a SyntaxError, function in class field initializer in class declaration)
+esid: sec-static-semantics-early-errors
+features: [class-fields-private, class, class-fields-public]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ScriptBody:StatementList
+ It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
+ as an argument is false unless the source code is eval code that is being
+ processed by a direct eval.
+
+ ModuleBody:ModuleItemList
+ It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
+ as an argument is false.
+
+
+ Static Semantics: AllPrivateNamesValid
+
+ MemberExpression : MemberExpression . PrivateName
+
+ 1. If StringValue of PrivateName is in names, return true.
+ 2. Return false.
+
+ CallExpression : CallExpression . PrivateName
+
+ 1. If StringValue of PrivateName is in names, return true.
+ 2. Return false.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ f = function() { this.#x }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/field-init-member-expression-bad-reference.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/field-init-member-expression-bad-reference.js
new file mode 100644
index 0000000000..4db6d17b25
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/field-init-member-expression-bad-reference.js
@@ -0,0 +1,43 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/invalid-private-names/member-expression-bad-reference.case
+// - src/invalid-private-names/default/cls-decl-field-initializer.template
+/*---
+description: bad reference in member expression (Invalid private names should throw a SyntaxError, class field initializer in class declaration)
+esid: sec-static-semantics-early-errors
+features: [class-fields-private, class, class-fields-public]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ScriptBody:StatementList
+ It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
+ as an argument is false unless the source code is eval code that is being
+ processed by a direct eval.
+
+ ModuleBody:ModuleItemList
+ It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
+ as an argument is false.
+
+
+ Static Semantics: AllPrivateNamesValid
+
+ MemberExpression : MemberExpression . PrivateName
+
+ 1. If StringValue of PrivateName is in names, return true.
+ 2. Return false.
+
+ CallExpression : CallExpression . PrivateName
+
+ 1. If StringValue of PrivateName is in names, return true.
+ 2. Return false.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ f = something.#x
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/field-init-member-expression-this.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/field-init-member-expression-this.js
new file mode 100644
index 0000000000..cec95a1460
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/field-init-member-expression-this.js
@@ -0,0 +1,43 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/invalid-private-names/member-expression-this.case
+// - src/invalid-private-names/default/cls-decl-field-initializer.template
+/*---
+description: this reference in member expression (Invalid private names should throw a SyntaxError, class field initializer in class declaration)
+esid: sec-static-semantics-early-errors
+features: [class-fields-private, class, class-fields-public]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ScriptBody:StatementList
+ It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
+ as an argument is false unless the source code is eval code that is being
+ processed by a direct eval.
+
+ ModuleBody:ModuleItemList
+ It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
+ as an argument is false.
+
+
+ Static Semantics: AllPrivateNamesValid
+
+ MemberExpression : MemberExpression . PrivateName
+
+ 1. If StringValue of PrivateName is in names, return true.
+ 2. Return false.
+
+ CallExpression : CallExpression . PrivateName
+
+ 1. If StringValue of PrivateName is in names, return true.
+ 2. Return false.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ f = this.#x
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/fields-init-heritage-call-expression-bad-reference.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/fields-init-heritage-call-expression-bad-reference.js
new file mode 100644
index 0000000000..06d1a91584
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/fields-init-heritage-call-expression-bad-reference.js
@@ -0,0 +1,58 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/invalid-private-names/call-expression-bad-reference.case
+// - src/invalid-private-names/default/cls-decl-field-initializer-heritage.template
+/*---
+description: bad reference in call expression (Invalid private names should throw a SyntaxError, class field initializer in class declaration)
+esid: sec-static-semantics-early-errors
+features: [class-fields-private, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ScriptBody:StatementList
+ It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
+ as an argument is false unless the source code is eval code that is being
+ processed by a direct eval.
+
+ ModuleBody:ModuleItemList
+ It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
+ as an argument is false.
+
+ Static Semantics: AllPrivateNamesValid
+
+ ClassBody : ClassElementList
+ 1. Let newNames be the concatenation of names with PrivateBoundNames of ClassBody.
+ 2. Return AllPrivateNamesValid of ClassElementList with the argument newNames.
+
+ For all other grammatical productions, recurse on subexpressions/substatements,
+ passing in the names of the caller. If all pieces return true, then return true.
+ If any returns false, return false.
+
+
+ Static Semantics: AllPrivateNamesValid
+
+ MemberExpression : MemberExpression . PrivateName
+
+ 1. If StringValue of PrivateName is in names, return true.
+ 2. Return false.
+
+ CallExpression : CallExpression . PrivateName
+
+ 1. If StringValue of PrivateName is in names, return true.
+ 2. Return false.
+
+---*/
+
+
+
+$DONOTEVALUATE();
+
+class Parent {
+ #x = 42;
+}
+
+class C extends Parent {
+ f = (() => {})().#x
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/fields-init-heritage-call-expression-this.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/fields-init-heritage-call-expression-this.js
new file mode 100644
index 0000000000..483a835d70
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/fields-init-heritage-call-expression-this.js
@@ -0,0 +1,58 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/invalid-private-names/call-expression-this.case
+// - src/invalid-private-names/default/cls-decl-field-initializer-heritage.template
+/*---
+description: this evaluated in call expression (Invalid private names should throw a SyntaxError, class field initializer in class declaration)
+esid: sec-static-semantics-early-errors
+features: [class-fields-private, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ScriptBody:StatementList
+ It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
+ as an argument is false unless the source code is eval code that is being
+ processed by a direct eval.
+
+ ModuleBody:ModuleItemList
+ It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
+ as an argument is false.
+
+ Static Semantics: AllPrivateNamesValid
+
+ ClassBody : ClassElementList
+ 1. Let newNames be the concatenation of names with PrivateBoundNames of ClassBody.
+ 2. Return AllPrivateNamesValid of ClassElementList with the argument newNames.
+
+ For all other grammatical productions, recurse on subexpressions/substatements,
+ passing in the names of the caller. If all pieces return true, then return true.
+ If any returns false, return false.
+
+
+ Static Semantics: AllPrivateNamesValid
+
+ MemberExpression : MemberExpression . PrivateName
+
+ 1. If StringValue of PrivateName is in names, return true.
+ 2. Return false.
+
+ CallExpression : CallExpression . PrivateName
+
+ 1. If StringValue of PrivateName is in names, return true.
+ 2. Return false.
+
+---*/
+
+
+
+$DONOTEVALUATE();
+
+class Parent {
+ #x = 42;
+}
+
+class C extends Parent {
+ f = (() => this)().#x
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/fields-init-heritage-member-expression-bad-reference.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/fields-init-heritage-member-expression-bad-reference.js
new file mode 100644
index 0000000000..dce5883462
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/fields-init-heritage-member-expression-bad-reference.js
@@ -0,0 +1,58 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/invalid-private-names/member-expression-bad-reference.case
+// - src/invalid-private-names/default/cls-decl-field-initializer-heritage.template
+/*---
+description: bad reference in member expression (Invalid private names should throw a SyntaxError, class field initializer in class declaration)
+esid: sec-static-semantics-early-errors
+features: [class-fields-private, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ScriptBody:StatementList
+ It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
+ as an argument is false unless the source code is eval code that is being
+ processed by a direct eval.
+
+ ModuleBody:ModuleItemList
+ It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
+ as an argument is false.
+
+ Static Semantics: AllPrivateNamesValid
+
+ ClassBody : ClassElementList
+ 1. Let newNames be the concatenation of names with PrivateBoundNames of ClassBody.
+ 2. Return AllPrivateNamesValid of ClassElementList with the argument newNames.
+
+ For all other grammatical productions, recurse on subexpressions/substatements,
+ passing in the names of the caller. If all pieces return true, then return true.
+ If any returns false, return false.
+
+
+ Static Semantics: AllPrivateNamesValid
+
+ MemberExpression : MemberExpression . PrivateName
+
+ 1. If StringValue of PrivateName is in names, return true.
+ 2. Return false.
+
+ CallExpression : CallExpression . PrivateName
+
+ 1. If StringValue of PrivateName is in names, return true.
+ 2. Return false.
+
+---*/
+
+
+
+$DONOTEVALUATE();
+
+class Parent {
+ #x = 42;
+}
+
+class C extends Parent {
+ f = something.#x
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/fields-init-heritage-member-expression-this.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/fields-init-heritage-member-expression-this.js
new file mode 100644
index 0000000000..fb8dceaf2f
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/fields-init-heritage-member-expression-this.js
@@ -0,0 +1,58 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/invalid-private-names/member-expression-this.case
+// - src/invalid-private-names/default/cls-decl-field-initializer-heritage.template
+/*---
+description: this reference in member expression (Invalid private names should throw a SyntaxError, class field initializer in class declaration)
+esid: sec-static-semantics-early-errors
+features: [class-fields-private, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ScriptBody:StatementList
+ It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
+ as an argument is false unless the source code is eval code that is being
+ processed by a direct eval.
+
+ ModuleBody:ModuleItemList
+ It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
+ as an argument is false.
+
+ Static Semantics: AllPrivateNamesValid
+
+ ClassBody : ClassElementList
+ 1. Let newNames be the concatenation of names with PrivateBoundNames of ClassBody.
+ 2. Return AllPrivateNamesValid of ClassElementList with the argument newNames.
+
+ For all other grammatical productions, recurse on subexpressions/substatements,
+ passing in the names of the caller. If all pieces return true, then return true.
+ If any returns false, return false.
+
+
+ Static Semantics: AllPrivateNamesValid
+
+ MemberExpression : MemberExpression . PrivateName
+
+ 1. If StringValue of PrivateName is in names, return true.
+ 2. Return false.
+
+ CallExpression : CallExpression . PrivateName
+
+ 1. If StringValue of PrivateName is in names, return true.
+ 2. Return false.
+
+---*/
+
+
+
+$DONOTEVALUATE();
+
+class Parent {
+ #x = 42;
+}
+
+class C extends Parent {
+ f = this.#x
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/method-call-expression-bad-reference.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/method-call-expression-bad-reference.js
new file mode 100644
index 0000000000..a3b8d6b0f4
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/method-call-expression-bad-reference.js
@@ -0,0 +1,43 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/invalid-private-names/call-expression-bad-reference.case
+// - src/invalid-private-names/default/cls-decl-method.template
+/*---
+description: bad reference in call expression (Invalid private names should throw a SyntaxError, method in class declaration)
+esid: sec-static-semantics-early-errors
+features: [class-fields-private, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ScriptBody:StatementList
+ It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
+ as an argument is false unless the source code is eval code that is being
+ processed by a direct eval.
+
+ ModuleBody:ModuleItemList
+ It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
+ as an argument is false.
+
+
+ Static Semantics: AllPrivateNamesValid
+
+ MemberExpression : MemberExpression . PrivateName
+
+ 1. If StringValue of PrivateName is in names, return true.
+ 2. Return false.
+
+ CallExpression : CallExpression . PrivateName
+
+ 1. If StringValue of PrivateName is in names, return true.
+ 2. Return false.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ m() { (() => {})().#x }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/method-call-expression-this.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/method-call-expression-this.js
new file mode 100644
index 0000000000..6596ef5dc0
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/method-call-expression-this.js
@@ -0,0 +1,43 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/invalid-private-names/call-expression-this.case
+// - src/invalid-private-names/default/cls-decl-method.template
+/*---
+description: this evaluated in call expression (Invalid private names should throw a SyntaxError, method in class declaration)
+esid: sec-static-semantics-early-errors
+features: [class-fields-private, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ScriptBody:StatementList
+ It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
+ as an argument is false unless the source code is eval code that is being
+ processed by a direct eval.
+
+ ModuleBody:ModuleItemList
+ It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
+ as an argument is false.
+
+
+ Static Semantics: AllPrivateNamesValid
+
+ MemberExpression : MemberExpression . PrivateName
+
+ 1. If StringValue of PrivateName is in names, return true.
+ 2. Return false.
+
+ CallExpression : CallExpression . PrivateName
+
+ 1. If StringValue of PrivateName is in names, return true.
+ 2. Return false.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ m() { (() => this)().#x }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/method-fn-call-expression-bad-reference.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/method-fn-call-expression-bad-reference.js
new file mode 100644
index 0000000000..7296cac6a2
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/method-fn-call-expression-bad-reference.js
@@ -0,0 +1,45 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/invalid-private-names/call-expression-bad-reference.case
+// - src/invalid-private-names/default/cls-decl-method-fn.template
+/*---
+description: bad reference in call expression (Invalid private names should throw a SyntaxError, inner function in method in class declaration)
+esid: sec-static-semantics-early-errors
+features: [class-fields-private, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ScriptBody:StatementList
+ It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
+ as an argument is false unless the source code is eval code that is being
+ processed by a direct eval.
+
+ ModuleBody:ModuleItemList
+ It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
+ as an argument is false.
+
+
+ Static Semantics: AllPrivateNamesValid
+
+ MemberExpression : MemberExpression . PrivateName
+
+ 1. If StringValue of PrivateName is in names, return true.
+ 2. Return false.
+
+ CallExpression : CallExpression . PrivateName
+
+ 1. If StringValue of PrivateName is in names, return true.
+ 2. Return false.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ m() {
+ function fn() { (() => {})().#x }
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/method-fn-call-expression-this.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/method-fn-call-expression-this.js
new file mode 100644
index 0000000000..13559da5b6
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/method-fn-call-expression-this.js
@@ -0,0 +1,45 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/invalid-private-names/call-expression-this.case
+// - src/invalid-private-names/default/cls-decl-method-fn.template
+/*---
+description: this evaluated in call expression (Invalid private names should throw a SyntaxError, inner function in method in class declaration)
+esid: sec-static-semantics-early-errors
+features: [class-fields-private, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ScriptBody:StatementList
+ It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
+ as an argument is false unless the source code is eval code that is being
+ processed by a direct eval.
+
+ ModuleBody:ModuleItemList
+ It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
+ as an argument is false.
+
+
+ Static Semantics: AllPrivateNamesValid
+
+ MemberExpression : MemberExpression . PrivateName
+
+ 1. If StringValue of PrivateName is in names, return true.
+ 2. Return false.
+
+ CallExpression : CallExpression . PrivateName
+
+ 1. If StringValue of PrivateName is in names, return true.
+ 2. Return false.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ m() {
+ function fn() { (() => this)().#x }
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/method-fn-member-expression-bad-reference.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/method-fn-member-expression-bad-reference.js
new file mode 100644
index 0000000000..023631b29a
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/method-fn-member-expression-bad-reference.js
@@ -0,0 +1,45 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/invalid-private-names/member-expression-bad-reference.case
+// - src/invalid-private-names/default/cls-decl-method-fn.template
+/*---
+description: bad reference in member expression (Invalid private names should throw a SyntaxError, inner function in method in class declaration)
+esid: sec-static-semantics-early-errors
+features: [class-fields-private, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ScriptBody:StatementList
+ It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
+ as an argument is false unless the source code is eval code that is being
+ processed by a direct eval.
+
+ ModuleBody:ModuleItemList
+ It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
+ as an argument is false.
+
+
+ Static Semantics: AllPrivateNamesValid
+
+ MemberExpression : MemberExpression . PrivateName
+
+ 1. If StringValue of PrivateName is in names, return true.
+ 2. Return false.
+
+ CallExpression : CallExpression . PrivateName
+
+ 1. If StringValue of PrivateName is in names, return true.
+ 2. Return false.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ m() {
+ function fn() { something.#x }
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/method-fn-member-expression-this.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/method-fn-member-expression-this.js
new file mode 100644
index 0000000000..7ea61ba52a
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/method-fn-member-expression-this.js
@@ -0,0 +1,45 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/invalid-private-names/member-expression-this.case
+// - src/invalid-private-names/default/cls-decl-method-fn.template
+/*---
+description: this reference in member expression (Invalid private names should throw a SyntaxError, inner function in method in class declaration)
+esid: sec-static-semantics-early-errors
+features: [class-fields-private, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ScriptBody:StatementList
+ It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
+ as an argument is false unless the source code is eval code that is being
+ processed by a direct eval.
+
+ ModuleBody:ModuleItemList
+ It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
+ as an argument is false.
+
+
+ Static Semantics: AllPrivateNamesValid
+
+ MemberExpression : MemberExpression . PrivateName
+
+ 1. If StringValue of PrivateName is in names, return true.
+ 2. Return false.
+
+ CallExpression : CallExpression . PrivateName
+
+ 1. If StringValue of PrivateName is in names, return true.
+ 2. Return false.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ m() {
+ function fn() { this.#x }
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/method-heritage-call-expression-bad-reference.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/method-heritage-call-expression-bad-reference.js
new file mode 100644
index 0000000000..e43b5446e5
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/method-heritage-call-expression-bad-reference.js
@@ -0,0 +1,59 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/invalid-private-names/call-expression-bad-reference.case
+// - src/invalid-private-names/default/cls-decl-method-heritage.template
+/*---
+description: bad reference in call expression (Invalid private names should throw a SyntaxError, method in class declaration)
+esid: sec-static-semantics-early-errors
+features: [class-fields-private, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ScriptBody:StatementList
+ It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
+ as an argument is false unless the source code is eval code that is being
+ processed by a direct eval.
+
+ ModuleBody:ModuleItemList
+ It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
+ as an argument is false.
+
+ Static Semantics: AllPrivateNamesValid
+
+ ClassBody : ClassElementList
+ 1. Let newNames be the concatenation of names with PrivateBoundNames of ClassBody.
+ 2. Return AllPrivateNamesValid of ClassElementList with the argument newNames.
+
+ For all other grammatical productions, recurse on subexpressions/substatements,
+ passing in the names of the caller. If all pieces return true, then return true.
+ If any returns false, return false.
+
+
+ Static Semantics: AllPrivateNamesValid
+
+ MemberExpression : MemberExpression . PrivateName
+
+ 1. If StringValue of PrivateName is in names, return true.
+ 2. Return false.
+
+ CallExpression : CallExpression . PrivateName
+
+ 1. If StringValue of PrivateName is in names, return true.
+ 2. Return false.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class Parent {
+ #x = 42;
+}
+
+class C extends Parent {
+ m() {
+ (() => {})().#x
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/method-heritage-call-expression-this.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/method-heritage-call-expression-this.js
new file mode 100644
index 0000000000..ce7669e83f
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/method-heritage-call-expression-this.js
@@ -0,0 +1,59 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/invalid-private-names/call-expression-this.case
+// - src/invalid-private-names/default/cls-decl-method-heritage.template
+/*---
+description: this evaluated in call expression (Invalid private names should throw a SyntaxError, method in class declaration)
+esid: sec-static-semantics-early-errors
+features: [class-fields-private, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ScriptBody:StatementList
+ It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
+ as an argument is false unless the source code is eval code that is being
+ processed by a direct eval.
+
+ ModuleBody:ModuleItemList
+ It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
+ as an argument is false.
+
+ Static Semantics: AllPrivateNamesValid
+
+ ClassBody : ClassElementList
+ 1. Let newNames be the concatenation of names with PrivateBoundNames of ClassBody.
+ 2. Return AllPrivateNamesValid of ClassElementList with the argument newNames.
+
+ For all other grammatical productions, recurse on subexpressions/substatements,
+ passing in the names of the caller. If all pieces return true, then return true.
+ If any returns false, return false.
+
+
+ Static Semantics: AllPrivateNamesValid
+
+ MemberExpression : MemberExpression . PrivateName
+
+ 1. If StringValue of PrivateName is in names, return true.
+ 2. Return false.
+
+ CallExpression : CallExpression . PrivateName
+
+ 1. If StringValue of PrivateName is in names, return true.
+ 2. Return false.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class Parent {
+ #x = 42;
+}
+
+class C extends Parent {
+ m() {
+ (() => this)().#x
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/method-heritage-member-expression-bad-reference.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/method-heritage-member-expression-bad-reference.js
new file mode 100644
index 0000000000..0eeb130e09
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/method-heritage-member-expression-bad-reference.js
@@ -0,0 +1,59 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/invalid-private-names/member-expression-bad-reference.case
+// - src/invalid-private-names/default/cls-decl-method-heritage.template
+/*---
+description: bad reference in member expression (Invalid private names should throw a SyntaxError, method in class declaration)
+esid: sec-static-semantics-early-errors
+features: [class-fields-private, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ScriptBody:StatementList
+ It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
+ as an argument is false unless the source code is eval code that is being
+ processed by a direct eval.
+
+ ModuleBody:ModuleItemList
+ It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
+ as an argument is false.
+
+ Static Semantics: AllPrivateNamesValid
+
+ ClassBody : ClassElementList
+ 1. Let newNames be the concatenation of names with PrivateBoundNames of ClassBody.
+ 2. Return AllPrivateNamesValid of ClassElementList with the argument newNames.
+
+ For all other grammatical productions, recurse on subexpressions/substatements,
+ passing in the names of the caller. If all pieces return true, then return true.
+ If any returns false, return false.
+
+
+ Static Semantics: AllPrivateNamesValid
+
+ MemberExpression : MemberExpression . PrivateName
+
+ 1. If StringValue of PrivateName is in names, return true.
+ 2. Return false.
+
+ CallExpression : CallExpression . PrivateName
+
+ 1. If StringValue of PrivateName is in names, return true.
+ 2. Return false.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class Parent {
+ #x = 42;
+}
+
+class C extends Parent {
+ m() {
+ something.#x
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/method-heritage-member-expression-this.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/method-heritage-member-expression-this.js
new file mode 100644
index 0000000000..dea9d1d473
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/method-heritage-member-expression-this.js
@@ -0,0 +1,59 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/invalid-private-names/member-expression-this.case
+// - src/invalid-private-names/default/cls-decl-method-heritage.template
+/*---
+description: this reference in member expression (Invalid private names should throw a SyntaxError, method in class declaration)
+esid: sec-static-semantics-early-errors
+features: [class-fields-private, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ScriptBody:StatementList
+ It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
+ as an argument is false unless the source code is eval code that is being
+ processed by a direct eval.
+
+ ModuleBody:ModuleItemList
+ It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
+ as an argument is false.
+
+ Static Semantics: AllPrivateNamesValid
+
+ ClassBody : ClassElementList
+ 1. Let newNames be the concatenation of names with PrivateBoundNames of ClassBody.
+ 2. Return AllPrivateNamesValid of ClassElementList with the argument newNames.
+
+ For all other grammatical productions, recurse on subexpressions/substatements,
+ passing in the names of the caller. If all pieces return true, then return true.
+ If any returns false, return false.
+
+
+ Static Semantics: AllPrivateNamesValid
+
+ MemberExpression : MemberExpression . PrivateName
+
+ 1. If StringValue of PrivateName is in names, return true.
+ 2. Return false.
+
+ CallExpression : CallExpression . PrivateName
+
+ 1. If StringValue of PrivateName is in names, return true.
+ 2. Return false.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class Parent {
+ #x = 42;
+}
+
+class C extends Parent {
+ m() {
+ this.#x
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/method-member-expression-bad-reference.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/method-member-expression-bad-reference.js
new file mode 100644
index 0000000000..bae36e873a
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/method-member-expression-bad-reference.js
@@ -0,0 +1,43 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/invalid-private-names/member-expression-bad-reference.case
+// - src/invalid-private-names/default/cls-decl-method.template
+/*---
+description: bad reference in member expression (Invalid private names should throw a SyntaxError, method in class declaration)
+esid: sec-static-semantics-early-errors
+features: [class-fields-private, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ScriptBody:StatementList
+ It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
+ as an argument is false unless the source code is eval code that is being
+ processed by a direct eval.
+
+ ModuleBody:ModuleItemList
+ It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
+ as an argument is false.
+
+
+ Static Semantics: AllPrivateNamesValid
+
+ MemberExpression : MemberExpression . PrivateName
+
+ 1. If StringValue of PrivateName is in names, return true.
+ 2. Return false.
+
+ CallExpression : CallExpression . PrivateName
+
+ 1. If StringValue of PrivateName is in names, return true.
+ 2. Return false.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ m() { something.#x }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/method-member-expression-this.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/method-member-expression-this.js
new file mode 100644
index 0000000000..baf7573389
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/method-member-expression-this.js
@@ -0,0 +1,43 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/invalid-private-names/member-expression-this.case
+// - src/invalid-private-names/default/cls-decl-method.template
+/*---
+description: this reference in member expression (Invalid private names should throw a SyntaxError, method in class declaration)
+esid: sec-static-semantics-early-errors
+features: [class-fields-private, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ScriptBody:StatementList
+ It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
+ as an argument is false unless the source code is eval code that is being
+ processed by a direct eval.
+
+ ModuleBody:ModuleItemList
+ It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
+ as an argument is false.
+
+
+ Static Semantics: AllPrivateNamesValid
+
+ MemberExpression : MemberExpression . PrivateName
+
+ 1. If StringValue of PrivateName is in names, return true.
+ 2. Return false.
+
+ CallExpression : CallExpression . PrivateName
+
+ 1. If StringValue of PrivateName is in names, return true.
+ 2. Return false.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ m() { this.#x }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/method-outter-call-expression-bad-reference.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/method-outter-call-expression-bad-reference.js
new file mode 100644
index 0000000000..b66bdcf9fd
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/method-outter-call-expression-bad-reference.js
@@ -0,0 +1,59 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/invalid-private-names/call-expression-bad-reference.case
+// - src/invalid-private-names/default/cls-decl-outter-method.template
+/*---
+description: bad reference in call expression (Invalid private names should throw a SyntaxError, method in outter class declaration)
+esid: sec-static-semantics-early-errors
+features: [class-fields-private, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ScriptBody:StatementList
+ It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
+ as an argument is false unless the source code is eval code that is being
+ processed by a direct eval.
+
+ ModuleBody:ModuleItemList
+ It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
+ as an argument is false.
+
+ Static Semantics: AllPrivateNamesValid
+
+ ClassBody : ClassElementList
+ 1. Let newNames be the concatenation of names with PrivateBoundNames of ClassBody.
+ 2. Return AllPrivateNamesValid of ClassElementList with the argument newNames.
+
+ For all other grammatical productions, recurse on subexpressions/substatements,
+ passing in the names of the caller. If all pieces return true, then return true.
+ If any returns false, return false.
+
+
+ Static Semantics: AllPrivateNamesValid
+
+ MemberExpression : MemberExpression . PrivateName
+
+ 1. If StringValue of PrivateName is in names, return true.
+ 2. Return false.
+
+ CallExpression : CallExpression . PrivateName
+
+ 1. If StringValue of PrivateName is in names, return true.
+ 2. Return false.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ m() {
+ class Outter {
+ #x = 42;
+ }
+
+ this.#x;
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/method-outter-call-expression-this.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/method-outter-call-expression-this.js
new file mode 100644
index 0000000000..7d989a3e74
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/method-outter-call-expression-this.js
@@ -0,0 +1,59 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/invalid-private-names/call-expression-this.case
+// - src/invalid-private-names/default/cls-decl-outter-method.template
+/*---
+description: this evaluated in call expression (Invalid private names should throw a SyntaxError, method in outter class declaration)
+esid: sec-static-semantics-early-errors
+features: [class-fields-private, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ScriptBody:StatementList
+ It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
+ as an argument is false unless the source code is eval code that is being
+ processed by a direct eval.
+
+ ModuleBody:ModuleItemList
+ It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
+ as an argument is false.
+
+ Static Semantics: AllPrivateNamesValid
+
+ ClassBody : ClassElementList
+ 1. Let newNames be the concatenation of names with PrivateBoundNames of ClassBody.
+ 2. Return AllPrivateNamesValid of ClassElementList with the argument newNames.
+
+ For all other grammatical productions, recurse on subexpressions/substatements,
+ passing in the names of the caller. If all pieces return true, then return true.
+ If any returns false, return false.
+
+
+ Static Semantics: AllPrivateNamesValid
+
+ MemberExpression : MemberExpression . PrivateName
+
+ 1. If StringValue of PrivateName is in names, return true.
+ 2. Return false.
+
+ CallExpression : CallExpression . PrivateName
+
+ 1. If StringValue of PrivateName is in names, return true.
+ 2. Return false.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ m() {
+ class Outter {
+ #x = 42;
+ }
+
+ this.#x;
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/method-outter-member-expression-bad-reference.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/method-outter-member-expression-bad-reference.js
new file mode 100644
index 0000000000..8c6ffeb17a
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/method-outter-member-expression-bad-reference.js
@@ -0,0 +1,59 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/invalid-private-names/member-expression-bad-reference.case
+// - src/invalid-private-names/default/cls-decl-outter-method.template
+/*---
+description: bad reference in member expression (Invalid private names should throw a SyntaxError, method in outter class declaration)
+esid: sec-static-semantics-early-errors
+features: [class-fields-private, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ScriptBody:StatementList
+ It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
+ as an argument is false unless the source code is eval code that is being
+ processed by a direct eval.
+
+ ModuleBody:ModuleItemList
+ It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
+ as an argument is false.
+
+ Static Semantics: AllPrivateNamesValid
+
+ ClassBody : ClassElementList
+ 1. Let newNames be the concatenation of names with PrivateBoundNames of ClassBody.
+ 2. Return AllPrivateNamesValid of ClassElementList with the argument newNames.
+
+ For all other grammatical productions, recurse on subexpressions/substatements,
+ passing in the names of the caller. If all pieces return true, then return true.
+ If any returns false, return false.
+
+
+ Static Semantics: AllPrivateNamesValid
+
+ MemberExpression : MemberExpression . PrivateName
+
+ 1. If StringValue of PrivateName is in names, return true.
+ 2. Return false.
+
+ CallExpression : CallExpression . PrivateName
+
+ 1. If StringValue of PrivateName is in names, return true.
+ 2. Return false.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ m() {
+ class Outter {
+ #x = 42;
+ }
+
+ this.#x;
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/method-outter-member-expression-this.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/method-outter-member-expression-this.js
new file mode 100644
index 0000000000..41926b597c
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/method-outter-member-expression-this.js
@@ -0,0 +1,59 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/invalid-private-names/member-expression-this.case
+// - src/invalid-private-names/default/cls-decl-outter-method.template
+/*---
+description: this reference in member expression (Invalid private names should throw a SyntaxError, method in outter class declaration)
+esid: sec-static-semantics-early-errors
+features: [class-fields-private, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ScriptBody:StatementList
+ It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
+ as an argument is false unless the source code is eval code that is being
+ processed by a direct eval.
+
+ ModuleBody:ModuleItemList
+ It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
+ as an argument is false.
+
+ Static Semantics: AllPrivateNamesValid
+
+ ClassBody : ClassElementList
+ 1. Let newNames be the concatenation of names with PrivateBoundNames of ClassBody.
+ 2. Return AllPrivateNamesValid of ClassElementList with the argument newNames.
+
+ For all other grammatical productions, recurse on subexpressions/substatements,
+ passing in the names of the caller. If all pieces return true, then return true.
+ If any returns false, return false.
+
+
+ Static Semantics: AllPrivateNamesValid
+
+ MemberExpression : MemberExpression . PrivateName
+
+ 1. If StringValue of PrivateName is in names, return true.
+ 2. Return false.
+
+ CallExpression : CallExpression . PrivateName
+
+ 1. If StringValue of PrivateName is in names, return true.
+ 2. Return false.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ m() {
+ class Outter {
+ #x = 42;
+ }
+
+ this.#x;
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/shell.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/shell.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/invalid-names/shell.js
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/private-async-generator-cannot-escape-token.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/private-async-generator-cannot-escape-token.js
new file mode 100644
index 0000000000..f152b5758b
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/private-async-generator-cannot-escape-token.js
@@ -0,0 +1,26 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-async-generator-cannot-escape-token.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: The pound signal in the private async generator cannot be escaped (class declaration)
+esid: prod-ClassElement
+features: [class-methods-private, async-iteration, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ PrivateName::
+ # IdentifierName
+
+ U+0023 is the escape sequence for #
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ async * \u0023m() { return 42; }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/private-async-method-cannot-escape-token.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/private-async-method-cannot-escape-token.js
new file mode 100644
index 0000000000..cd8caf5df0
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/private-async-method-cannot-escape-token.js
@@ -0,0 +1,26 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-async-method-cannot-escape-token.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: The pound signal in the private async method cannot be escaped (class declaration)
+esid: prod-ClassElement
+features: [class-methods-private, async-functions, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ PrivateName::
+ # IdentifierName
+
+ U+0023 is the escape sequence for #
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ async \u0023m() { return 42; }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/private-call-exp-cannot-escape-token.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/private-call-exp-cannot-escape-token.js
new file mode 100644
index 0000000000..b949e50764
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/private-call-exp-cannot-escape-token.js
@@ -0,0 +1,34 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-call-exp-cannot-escape-token.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: The pound signal in the private reference cannot be escaped (class declaration)
+esid: prod-ClassElement
+features: [class-fields-private, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ PrivateName ::
+ # IdentifierName
+
+ MemberExpression :
+ MemberExpression . PrivateName
+
+ CallExpression :
+ CallExpression . PrivateName
+
+ U+0023 is the escape sequence for #
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ method() {
+ foo().\u0023field;
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/private-field-cannot-escape-token.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/private-field-cannot-escape-token.js
new file mode 100644
index 0000000000..8be2cdca1c
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/private-field-cannot-escape-token.js
@@ -0,0 +1,26 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-field-cannot-escape-token.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: The pound signal in the private field cannot be escaped (class declaration)
+esid: prod-ClassElement
+features: [class-fields-private, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ PrivateName::
+ # IdentifierName
+
+ U+0023 is the escape sequence for #
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ \u0023field;
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/private-generator-cannot-escape-token.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/private-generator-cannot-escape-token.js
new file mode 100644
index 0000000000..facd9e48c6
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/private-generator-cannot-escape-token.js
@@ -0,0 +1,26 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-generator-cannot-escape-token.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: The pound signal in the private generator cannot be escaped (class declaration)
+esid: prod-ClassElement
+features: [class-methods-private, generators, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ PrivateName::
+ # IdentifierName
+
+ U+0023 is the escape sequence for #
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ * \u0023m() { return 42; }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/private-member-exp-cannot-escape-token.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/private-member-exp-cannot-escape-token.js
new file mode 100644
index 0000000000..61d2b6282c
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/private-member-exp-cannot-escape-token.js
@@ -0,0 +1,34 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-member-exp-cannot-escape-token.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: The pound signal in the private reference cannot be escaped (class declaration)
+esid: prod-ClassElement
+features: [class-fields-private, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ PrivateName ::
+ # IdentifierName
+
+ MemberExpression :
+ MemberExpression . PrivateName
+
+ CallExpression :
+ CallExpression . PrivateName
+
+ U+0023 is the escape sequence for #
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ method() {
+ this.\u0023field;
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/private-method-cannot-escape-token.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/private-method-cannot-escape-token.js
new file mode 100644
index 0000000000..8084f90cc1
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/private-method-cannot-escape-token.js
@@ -0,0 +1,26 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-method-cannot-escape-token.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: The pound signal in the private method cannot be escaped (class declaration)
+esid: prod-ClassElement
+features: [class-methods-private, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ PrivateName::
+ # IdentifierName
+
+ U+0023 is the escape sequence for #
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ \u0023m() { return 42; }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/shell.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/shell.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/shell.js
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/super-private-access-invalid.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/super-private-access-invalid.js
new file mode 100644
index 0000000000..dffad30511
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/super-private-access-invalid.js
@@ -0,0 +1,37 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/super-private-access-invalid.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: It is syntax error if PrivateName IdentifierName is accessed on SuperProperty (class declaration)
+esid: prod-ClassElement
+features: [class-methods-private, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ SuperProperty:
+ super[Expression]
+ super.IdentifierName
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C extends B
+{
+ #x() {}
+
+ method() {
+ super.#x();
+ }
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/shell.js b/js/src/tests/test262/language/statements/class/elements/syntax/shell.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/shell.js
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/valid/browser.js b/js/src/tests/test262/language/statements/class/elements/syntax/valid/browser.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/valid/browser.js
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-class-body-ctor-no-heritage.js b/js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-class-body-ctor-no-heritage.js
new file mode 100644
index 0000000000..fdf55541d9
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-class-body-ctor-no-heritage.js
@@ -0,0 +1,24 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-class-body-ctor-no-heritage.case
+// - src/class-elements/syntax/valid/cls-decl-elements-valid-syntax.template
+/*---
+description: A constructor is valid without a super call in the constructor and heritage (class declaration)
+esid: prod-ClassElement
+features: [class]
+flags: [generated]
+info: |
+ ClassTail : ClassHeritageopt { ClassBody }
+
+ It is a Syntax Error if ClassHeritage is not present and the following algorithm evaluates to true:
+ 1. Let constructor be ConstructorMethod of ClassBody.
+ 2. If constructor is empty, return false.
+ 3. Return HasDirectSuper of constructor.
+
+---*/
+
+
+class C {
+ constructor() {}
+}
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-field-accessor.js b/js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-field-accessor.js
new file mode 100644
index 0000000000..eafce8744d
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-field-accessor.js
@@ -0,0 +1,27 @@
+// |reftest| skip -- decorators is not supported
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-field-accessor.case
+// - src/class-elements/syntax/valid/cls-decl-elements-valid-syntax.template
+/*---
+description: Valid accessor FieldDefinition, ClassElementName, PropertyName Syntax (class declaration)
+esid: prod-ClassElement
+features: [decorators, class]
+flags: [generated]
+info: |
+ FieldDefinition[Yield, Await] :
+ ClassElementName[?Yield, ?Await] Initializer[+In, ?Yield, ?Await]opt
+ accessor [no LineTerminator here] ClassElementName[?Yield, ?Await] Initializer[+In, ?Yield, ?Await]opt
+
+---*/
+
+
+class C {
+ accessor $;
+ accessor _;
+ accessor \u{6F};
+ accessor \u2118;
+ accessor ZW_\u200C_NJ;
+ accessor ZW_\u200D_J;
+}
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-field-classelementname-initializer-alt.js b/js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-field-classelementname-initializer-alt.js
new file mode 100644
index 0000000000..d0b8f03ba4
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-field-classelementname-initializer-alt.js
@@ -0,0 +1,72 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-field-classelementname-initializer-alt.case
+// - src/class-elements/syntax/valid/cls-decl-elements-valid-syntax.template
+/*---
+description: FieldDefinition, ClassElementName, PropertyName = Initializer Syntax (class declaration)
+esid: prod-ClassElement
+features: [class-fields-public, class]
+flags: [generated]
+info: |
+ ClassElement :
+ ...
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PropertyName :
+ LiteralPropertyName
+ ComputedPropertyName
+
+ LiteralPropertyName :
+ 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".
+
+---*/
+
+
+class C {
+ $ = 1;
+ _ = 2;
+ \u{6F} = 3;
+ ℘ = 4; // DO NOT CHANGE THE NAME OF THIS FIELD
+ ZW_‌_NJ = 5; // DO NOT CHANGE THE NAME OF THIS FIELD
+ ZW_‍_J = 6; // DO NOT CHANGE THE NAME OF THIS FIELD
+}
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-field-classelementname-initializer.js b/js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-field-classelementname-initializer.js
new file mode 100644
index 0000000000..143e21ced4
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-field-classelementname-initializer.js
@@ -0,0 +1,72 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-field-classelementname-initializer.case
+// - src/class-elements/syntax/valid/cls-decl-elements-valid-syntax.template
+/*---
+description: FieldDefinition, ClassElementName, PropertyName = Initializer Syntax (class declaration)
+esid: prod-ClassElement
+features: [class-fields-public, class]
+flags: [generated]
+info: |
+ ClassElement :
+ ...
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PropertyName :
+ LiteralPropertyName
+ ComputedPropertyName
+
+ LiteralPropertyName :
+ 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".
+
+---*/
+
+
+class C {
+ $ = 1;
+ _ = 2;
+ \u{6F} = 3;
+ \u2118 = 4;
+ ZW_\u200C_NJ = 5;
+ ZW_\u200D_J = 6;
+}
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-field-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-field-identifier-alt.js
new file mode 100644
index 0000000000..37c11e23d8
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-field-identifier-alt.js
@@ -0,0 +1,72 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-field-identifier-alt.case
+// - src/class-elements/syntax/valid/cls-decl-elements-valid-syntax.template
+/*---
+description: Valid FieldDefinition, ClassElementName, PropertyName Syntax (class declaration)
+esid: prod-ClassElement
+features: [class-fields-public, class]
+flags: [generated]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PropertyName :
+ LiteralPropertyName
+ ComputedPropertyName
+
+ LiteralPropertyName :
+ IdentifierName
+ StringLiteral
+ NumericLiteral
+
+ 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".
+
+---*/
+
+
+class C {
+ $;
+ _;
+ \u{6F};
+ ℘; // DO NOT CHANGE THE NAME OF THIS FIELD
+ ZW_‌_NJ; // DO NOT CHANGE THE NAME OF THIS FIELD
+ ZW_‍_J; // DO NOT CHANGE THE NAME OF THIS FIELD
+}
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-field-identifier.js b/js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-field-identifier.js
new file mode 100644
index 0000000000..0151ed8286
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-field-identifier.js
@@ -0,0 +1,72 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-field-identifier.case
+// - src/class-elements/syntax/valid/cls-decl-elements-valid-syntax.template
+/*---
+description: Valid FieldDefinition, ClassElementName, PropertyName Syntax (class declaration)
+esid: prod-ClassElement
+features: [class-fields-public, class]
+flags: [generated]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PropertyName :
+ LiteralPropertyName
+ ComputedPropertyName
+
+ LiteralPropertyName :
+ IdentifierName
+ StringLiteral
+ NumericLiteral
+
+ 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".
+
+---*/
+
+
+class C {
+ $;
+ _;
+ \u{6F};
+ \u2118;
+ ZW_\u200C_NJ;
+ ZW_\u200D_J;
+}
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-fields-multi-line.js b/js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-fields-multi-line.js
new file mode 100644
index 0000000000..73bde20af2
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-fields-multi-line.js
@@ -0,0 +1,31 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-fields-multi-line.case
+// - src/class-elements/syntax/valid/cls-decl-elements-valid-syntax.template
+/*---
+description: Valid multi-line, multi-field (class declaration)
+esid: prod-ClassElement
+features: [class-fields-public, class]
+flags: [generated]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+---*/
+
+
+class C {
+ x
+ y
+}
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-privatemeth-duplicate-get-set.js b/js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-privatemeth-duplicate-get-set.js
new file mode 100644
index 0000000000..482b6920dd
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-privatemeth-duplicate-get-set.js
@@ -0,0 +1,23 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-privatemeth-duplicate-get-set.case
+// - src/class-elements/syntax/valid/cls-decl-elements-valid-syntax.template
+/*---
+description: It's valid if a class contains a private getter and a private setter with the same name (class declaration)
+esid: prod-ClassElement
+features: [class-methods-private, class]
+flags: [generated]
+info: |
+ Static Semantics: Early Errors
+
+ ClassBody : ClassElementList
+ It is a Syntax Error if PrivateBoundNames of ClassBody contains any duplicate entries, unless the name is used once for a getter and once for a setter and in no other entries.
+
+---*/
+
+
+class C {
+ get #m() {}
+ set #m(_) {}
+}
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-privatemeth-duplicate-meth-nestedclassmeth.js b/js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-privatemeth-duplicate-meth-nestedclassmeth.js
new file mode 100644
index 0000000000..ef9ea621c2
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-privatemeth-duplicate-meth-nestedclassmeth.js
@@ -0,0 +1,28 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-privatemeth-duplicate-meth-nestedclassmeth.case
+// - src/class-elements/syntax/valid/cls-decl-elements-valid-syntax.template
+/*---
+description: It's valid if a nested class shadows a private method (class declaration)
+esid: prod-ClassElement
+features: [class-methods-private, class]
+flags: [generated]
+info: |
+ Static Semantics: Early Errors
+
+ ClassBody : ClassElementList
+ It is a Syntax Error if PrivateBoundNames of ClassBody contains any duplicate entries, unless the name is used once for a getter and once for a setter and in no other entries.
+
+---*/
+
+
+class C {
+ constructor() {
+ class B {
+ #m() {}
+ }
+ }
+
+ #m() {}
+}
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-privatename-classelementname-initializer-alt.js b/js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-privatename-classelementname-initializer-alt.js
new file mode 100644
index 0000000000..c741b7755d
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-privatename-classelementname-initializer-alt.js
@@ -0,0 +1,69 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-privatename-classelementname-initializer-alt.case
+// - src/class-elements/syntax/valid/cls-decl-elements-valid-syntax.template
+/*---
+description: Valid PrivateName = Initializer Syntax (class declaration)
+esid: prod-ClassElement
+features: [class-fields-private, class]
+flags: [generated]
+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".
+
+---*/
+
+
+class C {
+ #$ = 1;
+ #_ = 2;
+ #\u{6F} = 3;
+ #℘ = 4; // DO NOT CHANGE THE NAME OF THIS FIELD
+ #ZW_‌_NJ = 5; // DO NOT CHANGE THE NAME OF THIS FIELD
+ #ZW_‍_J = 6; // DO NOT CHANGE THE NAME OF THIS FIELD
+}
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-privatename-classelementname-initializer.js b/js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-privatename-classelementname-initializer.js
new file mode 100644
index 0000000000..e80e425b7e
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-privatename-classelementname-initializer.js
@@ -0,0 +1,69 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-privatename-classelementname-initializer.case
+// - src/class-elements/syntax/valid/cls-decl-elements-valid-syntax.template
+/*---
+description: Valid PrivateName = Initializer Syntax (class declaration)
+esid: prod-ClassElement
+features: [class-fields-private, class]
+flags: [generated]
+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".
+
+---*/
+
+
+class C {
+ #$ = 1;
+ #_ = 2;
+ #\u{6F} = 3;
+ #\u2118 = 4;
+ #ZW_\u200C_NJ = 5;
+ #ZW_\u200D_J = 6;
+}
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-privatename-identifier.js
new file mode 100644
index 0000000000..d0166b4b60
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-privatename-identifier.js
@@ -0,0 +1,66 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-privatename-identifier.case
+// - src/class-elements/syntax/valid/cls-decl-elements-valid-syntax.template
+/*---
+description: Valid PrivateName Syntax (class declaration)
+esid: prod-ClassElement
+features: [class-fields-private, class]
+flags: [generated]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ #$;
+ #_;
+ #\u{6F};
+ #\u2118;
+ #ZW_\u200C_NJ;
+ #ZW_\u200D_J;
+}
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-privatename-no-initializer-with-method.js b/js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-privatename-no-initializer-with-method.js
new file mode 100644
index 0000000000..200f8b280e
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-privatename-no-initializer-with-method.js
@@ -0,0 +1,34 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-privatename-no-initializer-with-method.case
+// - src/class-elements/syntax/valid/cls-decl-elements-valid-syntax.template
+/*---
+description: SyntaxError (class declaration)
+esid: prod-ClassElement
+features: [class-fields-private, class]
+flags: [generated]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+---*/
+
+
+class C {
+ #x
+ m() {}
+}
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-privatenames-multi-line.js b/js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-privatenames-multi-line.js
new file mode 100644
index 0000000000..e00ef3ed47
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-privatenames-multi-line.js
@@ -0,0 +1,34 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-privatenames-multi-line.case
+// - src/class-elements/syntax/valid/cls-decl-elements-valid-syntax.template
+/*---
+description: SyntaxError (class declaration)
+esid: prod-ClassElement
+features: [class-fields-private, class]
+flags: [generated]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+---*/
+
+
+class C {
+ #x
+ #y
+}
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-special-prototype-accessor-meth-valid.js b/js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-special-prototype-accessor-meth-valid.js
new file mode 100644
index 0000000000..d3cb1b1ce1
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-special-prototype-accessor-meth-valid.js
@@ -0,0 +1,58 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-special-prototype-accessor-meth-valid.case
+// - src/class-elements/syntax/valid/cls-decl-elements-valid-syntax.template
+/*---
+description: Accessor Methods can be named "prototype" (class declaration)
+esid: prod-ClassElement
+features: [class]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ Runtime Semantics: ClassDefinitionEvaluation
+
+ ClassTail : ClassHeritage_opt { ClassBody_opt }
+
+ [...]
+ 6. Let proto be OrdinaryObjectCreate(protoParent).
+ [...]
+ 14. Perform MakeConstructor(F, false, proto).
+ [...]
+ 20. For each ClassElement m in order from methods, do
+ a. If IsStatic of m is false, then
+ i. Let status be PropertyDefinitionEvaluation of m with arguments proto and false.
+ [...]
+
+ Runtime Semantics: PropertyDefinitionEvaluation
+
+ With parameters object and enumerable.
+
+ MethodDefinition : get PropertyName ( ) { FunctionBody }
+
+ [...]
+ 9. Let desc be the PropertyDescriptor { [[Get]]: closure, [[Enumerable]]: enumerable, [[Configurable]]: true }.
+ 10. Return ? DefinePropertyOrThrow(object, propKey, desc).
+
+ MethodDefinition : set PropertyName ( PropertySetParameterList ) { FunctionBody }
+
+ [...]
+ 8. Let desc be the PropertyDescriptor { [[Set]]: closure, [[Enumerable]]: enumerable, [[Configurable]]: true }.
+ 9. Return ? DefinePropertyOrThrow(object, propKey, desc).
+
+---*/
+
+
+class C {
+ get prototype() { return 13; }
+ set prototype(_) {}
+}
+
+assert(C.hasOwnProperty('prototype'));
+assert(C.prototype.hasOwnProperty('prototype'));
+assert.notSameValue(C.prototype.prototype, C.prototype);
+assert.sameValue(C.prototype.prototype, 13);
+verifyProperty(C.prototype, 'prototype', {
+ enumerable: false,
+ configurable: true,
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-special-prototype-async-gen-meth-valid.js b/js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-special-prototype-async-gen-meth-valid.js
new file mode 100644
index 0000000000..2c7e0c8f6d
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-special-prototype-async-gen-meth-valid.js
@@ -0,0 +1,51 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-special-prototype-async-gen-meth-valid.case
+// - src/class-elements/syntax/valid/cls-decl-elements-valid-syntax.template
+/*---
+description: Async Generator Methods can be named "prototype" (class declaration)
+esid: prod-ClassElement
+features: [async-iteration, class]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ Runtime Semantics: ClassDefinitionEvaluation
+
+ ClassTail : ClassHeritage_opt { ClassBody_opt }
+
+ [...]
+ 6. Let proto be OrdinaryObjectCreate(protoParent).
+ [...]
+ 14. Perform MakeConstructor(F, false, proto).
+ [...]
+ 20. For each ClassElement m in order from methods, do
+ a. If IsStatic of m is false, then
+ i. Let status be PropertyDefinitionEvaluation of m with arguments proto and false.
+ [...]
+
+ Runtime Semantics: PropertyDefinitionEvaluation
+
+ With parameters object and enumerable.
+
+ AsyncGeneratorMethod : async * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
+
+ [...]
+ 10. Let desc be PropertyDescriptor { [[Value]]: closure, [[Writable]]: true, [[Enumerable]]: enumerable, [[Configurable]]: true }.
+ 11. Return ? DefinePropertyOrThrow(object, propKey, desc).
+
+---*/
+
+
+class C {
+ async * prototype() {}
+}
+
+assert(C.hasOwnProperty('prototype'));
+assert(C.prototype.hasOwnProperty('prototype'));
+assert.notSameValue(C.prototype.prototype, C.prototype);
+verifyProperty(C.prototype, 'prototype', {
+ writable: true,
+ enumerable: false,
+ configurable: true,
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-special-prototype-async-meth-valid.js b/js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-special-prototype-async-meth-valid.js
new file mode 100644
index 0000000000..17fa1970f5
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-special-prototype-async-meth-valid.js
@@ -0,0 +1,51 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-special-prototype-async-meth-valid.case
+// - src/class-elements/syntax/valid/cls-decl-elements-valid-syntax.template
+/*---
+description: Async Methods can be named "prototype" (class declaration)
+esid: prod-ClassElement
+features: [async-functions, class]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ Runtime Semantics: ClassDefinitionEvaluation
+
+ ClassTail : ClassHeritage_opt { ClassBody_opt }
+
+ [...]
+ 6. Let proto be OrdinaryObjectCreate(protoParent).
+ [...]
+ 14. Perform MakeConstructor(F, false, proto).
+ [...]
+ 20. For each ClassElement m in order from methods, do
+ a. If IsStatic of m is false, then
+ i. Let status be PropertyDefinitionEvaluation of m with arguments proto and false.
+ [...]
+
+ Runtime Semantics: PropertyDefinitionEvaluation
+
+ With parameters object and enumerable.
+
+ AsyncMethod : async PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
+
+ [...]
+ 8. Let desc be the PropertyDescriptor { [[Value]]: closure, [[Writable]]: true, [[Enumerable]]: enumerable, [[Configurable]]: true }.
+ 9. Return ? DefinePropertyOrThrow(object, propKey, desc).
+
+---*/
+
+
+class C {
+ async prototype() {}
+}
+
+assert(C.hasOwnProperty('prototype'));
+assert(C.prototype.hasOwnProperty('prototype'));
+assert.notSameValue(C.prototype.prototype, C.prototype);
+verifyProperty(C.prototype, 'prototype', {
+ writable: true,
+ enumerable: false,
+ configurable: true,
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-special-prototype-gen-meth-valid.js b/js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-special-prototype-gen-meth-valid.js
new file mode 100644
index 0000000000..ac18e1f825
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-special-prototype-gen-meth-valid.js
@@ -0,0 +1,51 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-special-prototype-gen-meth-valid.case
+// - src/class-elements/syntax/valid/cls-decl-elements-valid-syntax.template
+/*---
+description: Generator Methods can be named "prototype" (class declaration)
+esid: prod-ClassElement
+features: [generators, class]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ Runtime Semantics: ClassDefinitionEvaluation
+
+ ClassTail : ClassHeritage_opt { ClassBody_opt }
+
+ [...]
+ 6. Let proto be OrdinaryObjectCreate(protoParent).
+ [...]
+ 14. Perform MakeConstructor(F, false, proto).
+ [...]
+ 20. For each ClassElement m in order from methods, do
+ a. If IsStatic of m is false, then
+ i. Let status be PropertyDefinitionEvaluation of m with arguments proto and false.
+ [...]
+
+ Runtime Semantics: PropertyDefinitionEvaluation
+
+ With parameters object and enumerable.
+
+ GeneratorMethod : * PropertyName ( UniqueFormalParameters ) { GeneratorBody }
+
+ [...]
+ 10. Let desc be the PropertyDescriptor { [[Value]]: closure, [[Writable]]: true, [[Enumerable]]: enumerable, [[Configurable]]: true }.
+ 11. Return ? DefinePropertyOrThrow(object, propKey, desc).
+
+---*/
+
+
+class C {
+ * prototype() {}
+}
+
+assert(C.hasOwnProperty('prototype'));
+assert(C.prototype.hasOwnProperty('prototype'));
+assert.notSameValue(C.prototype.prototype, C.prototype);
+verifyProperty(C.prototype, 'prototype', {
+ writable: true,
+ enumerable: false,
+ configurable: true,
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-special-prototype-meth-valid.js b/js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-special-prototype-meth-valid.js
new file mode 100644
index 0000000000..04ecfae0a3
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-special-prototype-meth-valid.js
@@ -0,0 +1,51 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-special-prototype-meth-valid.case
+// - src/class-elements/syntax/valid/cls-decl-elements-valid-syntax.template
+/*---
+description: Methods can be named "prototype" (class declaration)
+esid: prod-ClassElement
+features: [class]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ Runtime Semantics: ClassDefinitionEvaluation
+
+ ClassTail : ClassHeritage_opt { ClassBody_opt }
+
+ [...]
+ 6. Let proto be OrdinaryObjectCreate(protoParent).
+ [...]
+ 14. Perform MakeConstructor(F, false, proto).
+ [...]
+ 20. For each ClassElement m in order from methods, do
+ a. If IsStatic of m is false, then
+ i. Let status be PropertyDefinitionEvaluation of m with arguments proto and false.
+ [...]
+
+ Runtime Semantics: PropertyDefinitionEvaluation
+
+ With parameters object and enumerable.
+
+ MethodDefinition : PropertyName ( UniqueFormalParameters ) { FunctionBody }
+
+ [...]
+ 3. Let desc be the PropertyDescriptor { [[Value]]: methodDef.[[Closure]], [[Writable]]: true, [[Enumerable]]: enumerable, [[Configurable]]: true }.
+ 4. Return ? DefinePropertyOrThrow(object, methodDef.[[Key]], desc).
+
+---*/
+
+
+class C {
+ prototype() {}
+}
+
+assert(C.hasOwnProperty('prototype'));
+assert(C.prototype.hasOwnProperty('prototype'));
+assert.notSameValue(C.prototype.prototype, C.prototype);
+verifyProperty(C.prototype, 'prototype', {
+ writable: true,
+ enumerable: false,
+ configurable: true,
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-static-ctor-accessor-meth-valid.js b/js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-static-ctor-accessor-meth-valid.js
new file mode 100644
index 0000000000..50394530b3
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-static-ctor-accessor-meth-valid.js
@@ -0,0 +1,32 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-static-ctor-accessor-meth-valid.case
+// - src/class-elements/syntax/valid/cls-decl-elements-valid-syntax.template
+/*---
+description: Static Accessor Methods can be named constructor (class declaration)
+esid: prod-ClassElement
+features: [class]
+flags: [generated]
+info: |
+ Class Definitions / Static Semantics: Early Errors
+
+ ClassElement : MethodDefinition
+ It is a Syntax Error if PropName of MethodDefinition is not "constructor" and HasDirectSuper of MethodDefinition is true.
+ It is a Syntax Error if PropName of MethodDefinition is "constructor" and SpecialMethod of MethodDefinition is true.
+ ClassElement : static MethodDefinition
+ It is a Syntax Error if HasDirectSuper of MethodDefinition is true.
+ It is a Syntax Error if PropName of MethodDefinition is "prototype".
+
+---*/
+
+
+class C {
+ static get constructor() {}
+ static set constructor(_) {}
+ constructor() {} // stacks with a valid constructor
+}
+
+assert(C.hasOwnProperty('constructor'));
+assert(C.prototype.hasOwnProperty('constructor'));
+assert.notSameValue(C.prototype.constructor, C.constructor);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-static-ctor-async-gen-meth-valid.js b/js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-static-ctor-async-gen-meth-valid.js
new file mode 100644
index 0000000000..59d173ff32
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-static-ctor-async-gen-meth-valid.js
@@ -0,0 +1,31 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-static-ctor-async-gen-meth-valid.case
+// - src/class-elements/syntax/valid/cls-decl-elements-valid-syntax.template
+/*---
+description: Static Async Generator Methods can be named constructor (class declaration)
+esid: prod-ClassElement
+features: [async-iteration, class]
+flags: [generated]
+info: |
+ Class Definitions / Static Semantics: Early Errors
+
+ ClassElement : MethodDefinition
+ It is a Syntax Error if PropName of MethodDefinition is not "constructor" and HasDirectSuper of MethodDefinition is true.
+ It is a Syntax Error if PropName of MethodDefinition is "constructor" and SpecialMethod of MethodDefinition is true.
+ ClassElement : static MethodDefinition
+ It is a Syntax Error if HasDirectSuper of MethodDefinition is true.
+ It is a Syntax Error if PropName of MethodDefinition is "prototype".
+
+---*/
+
+
+class C {
+ static async * constructor() {}
+ constructor() {} // stacks with a valid constructor
+}
+
+assert(C.hasOwnProperty('constructor'));
+assert(C.prototype.hasOwnProperty('constructor'));
+assert.notSameValue(C.prototype.constructor, C.constructor);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-static-ctor-async-meth-valid.js b/js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-static-ctor-async-meth-valid.js
new file mode 100644
index 0000000000..47fbf0c78f
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-static-ctor-async-meth-valid.js
@@ -0,0 +1,31 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-static-ctor-async-meth-valid.case
+// - src/class-elements/syntax/valid/cls-decl-elements-valid-syntax.template
+/*---
+description: Static Methods can be named constructor (class declaration)
+esid: prod-ClassElement
+features: [async-functions, class]
+flags: [generated]
+info: |
+ Class Definitions / Static Semantics: Early Errors
+
+ ClassElement : MethodDefinition
+ It is a Syntax Error if PropName of MethodDefinition is not "constructor" and HasDirectSuper of MethodDefinition is true.
+ It is a Syntax Error if PropName of MethodDefinition is "constructor" and SpecialMethod of MethodDefinition is true.
+ ClassElement : static MethodDefinition
+ It is a Syntax Error if HasDirectSuper of MethodDefinition is true.
+ It is a Syntax Error if PropName of MethodDefinition is "prototype".
+
+---*/
+
+
+class C {
+ static async constructor() {}
+ constructor() {} // stacks with a valid constructor
+}
+
+assert(C.hasOwnProperty('constructor'));
+assert(C.prototype.hasOwnProperty('constructor'));
+assert.notSameValue(C.prototype.constructor, C.constructor);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-static-ctor-gen-meth-valid.js b/js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-static-ctor-gen-meth-valid.js
new file mode 100644
index 0000000000..24f54213ef
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-static-ctor-gen-meth-valid.js
@@ -0,0 +1,31 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-static-ctor-gen-meth-valid.case
+// - src/class-elements/syntax/valid/cls-decl-elements-valid-syntax.template
+/*---
+description: Static Generator Methods can be named constructor (class declaration)
+esid: prod-ClassElement
+features: [generators, class]
+flags: [generated]
+info: |
+ Class Definitions / Static Semantics: Early Errors
+
+ ClassElement : MethodDefinition
+ It is a Syntax Error if PropName of MethodDefinition is not "constructor" and HasDirectSuper of MethodDefinition is true.
+ It is a Syntax Error if PropName of MethodDefinition is "constructor" and SpecialMethod of MethodDefinition is true.
+ ClassElement : static MethodDefinition
+ It is a Syntax Error if HasDirectSuper of MethodDefinition is true.
+ It is a Syntax Error if PropName of MethodDefinition is "prototype".
+
+---*/
+
+
+class C {
+ static * constructor() {}
+ constructor() {} // stacks with a valid constructor
+}
+
+assert(C.hasOwnProperty('constructor'));
+assert(C.prototype.hasOwnProperty('constructor'));
+assert.notSameValue(C.prototype.constructor, C.constructor);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-static-ctor-meth-valid.js b/js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-static-ctor-meth-valid.js
new file mode 100644
index 0000000000..7b778bc72b
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-static-ctor-meth-valid.js
@@ -0,0 +1,31 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-static-ctor-meth-valid.case
+// - src/class-elements/syntax/valid/cls-decl-elements-valid-syntax.template
+/*---
+description: Static Methods can be named constructor (class declaration)
+esid: prod-ClassElement
+features: [class]
+flags: [generated]
+info: |
+ Class Definitions / Static Semantics: Early Errors
+
+ ClassElement : MethodDefinition
+ It is a Syntax Error if PropName of MethodDefinition is not "constructor" and HasDirectSuper of MethodDefinition is true.
+ It is a Syntax Error if PropName of MethodDefinition is "constructor" and SpecialMethod of MethodDefinition is true.
+ ClassElement : static MethodDefinition
+ It is a Syntax Error if HasDirectSuper of MethodDefinition is true.
+ It is a Syntax Error if PropName of MethodDefinition is "prototype".
+
+---*/
+
+
+class C {
+ static constructor() {}
+ constructor() {} // stacks with a valid constructor
+}
+
+assert(C.hasOwnProperty('constructor'));
+assert(C.prototype.hasOwnProperty('constructor'));
+assert.notSameValue(C.prototype.constructor, C.constructor);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-static-private-async-gen-meth-prototype.js b/js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-static-private-async-gen-meth-prototype.js
new file mode 100644
index 0000000000..7c7b26a27d
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-static-private-async-gen-meth-prototype.js
@@ -0,0 +1,22 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-static-private-async-gen-meth-prototype.case
+// - src/class-elements/syntax/valid/cls-decl-elements-valid-syntax.template
+/*---
+description: Static Async Generator Private Methods can be named "#prototype" (class declaration)
+esid: prod-ClassElement
+features: [async-iteration, class-static-methods-private, class]
+flags: [generated]
+info: |
+ Class Definitions / Static Semantics: Early Errors
+
+ ClassElement : static MethodDefinition
+ It is a Syntax Error if PropName of MethodDefinition is "prototype"
+
+---*/
+
+
+class C {
+ static async * #prototype() {}
+}
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-static-private-async-meth-prototype.js b/js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-static-private-async-meth-prototype.js
new file mode 100644
index 0000000000..445dea39c6
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-static-private-async-meth-prototype.js
@@ -0,0 +1,22 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-static-private-async-meth-prototype.case
+// - src/class-elements/syntax/valid/cls-decl-elements-valid-syntax.template
+/*---
+description: Static Async Private Methods can be named "#prototype" (class declaration)
+esid: prod-ClassElement
+features: [async-functions, class-static-methods-private, class]
+flags: [generated]
+info: |
+ Class Definitions / Static Semantics: Early Errors
+
+ ClassElement : static MethodDefinition
+ It is a Syntax Error if PropName of MethodDefinition is "prototype"
+
+---*/
+
+
+class C {
+ static async #prototype() {}
+}
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-static-private-gen-meth-prototype.js b/js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-static-private-gen-meth-prototype.js
new file mode 100644
index 0000000000..5a15aae437
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-static-private-gen-meth-prototype.js
@@ -0,0 +1,22 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-static-private-gen-meth-prototype.case
+// - src/class-elements/syntax/valid/cls-decl-elements-valid-syntax.template
+/*---
+description: Static Generator Private Methods can be named "#prototype" (class declaration)
+esid: prod-ClassElement
+features: [generators, class-static-methods-private, class]
+flags: [generated]
+info: |
+ Class Definitions / Static Semantics: Early Errors
+
+ ClassElement : static MethodDefinition
+ It is a Syntax Error if PropName of MethodDefinition is "prototype"
+
+---*/
+
+
+class C {
+ static * #prototype() {}
+}
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-static-private-meth-prototype.js b/js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-static-private-meth-prototype.js
new file mode 100644
index 0000000000..6907ef0886
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-static-private-meth-prototype.js
@@ -0,0 +1,22 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-static-private-meth-prototype.case
+// - src/class-elements/syntax/valid/cls-decl-elements-valid-syntax.template
+/*---
+description: Static Private Methods can be named "#prototype" (class declaration)
+esid: prod-ClassElement
+features: [class-static-methods-private, class]
+flags: [generated]
+info: |
+ Class Definitions / Static Semantics: Early Errors
+
+ ClassElement : static MethodDefinition
+ It is a Syntax Error if PropName of MethodDefinition is "prototype"
+
+---*/
+
+
+class C {
+ static #prototype() {}
+}
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/valid/shell.js b/js/src/tests/test262/language/statements/class/elements/syntax/valid/shell.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/valid/shell.js
diff --git a/js/src/tests/test262/language/statements/class/elements/ternary-init-err-contains-arguments.js b/js/src/tests/test262/language/statements/class/elements/ternary-init-err-contains-arguments.js
new file mode 100644
index 0000000000..6d238dc7d7
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/ternary-init-err-contains-arguments.js
@@ -0,0 +1,35 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/init-err-contains-arguments.case
+// - src/class-elements/initializer-error/cls-decl-fields-ternary.template
+/*---
+description: Syntax error if `arguments` used in class field (ternary expression)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-public]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ FieldDefinition:
+ PropertyNameInitializeropt
+
+ - It is a Syntax Error if ContainsArguments of Initializer is true.
+
+ Static Semantics: ContainsArguments
+ IdentifierReference : Identifier
+
+ 1. If the StringValue of Identifier is "arguments", return true.
+ ...
+ For all other grammatical productions, recurse on all nonterminals. If any piece returns true, then return true. Otherwise return false.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ x = false ? {} : arguments;
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/ternary-init-err-contains-super.js b/js/src/tests/test262/language/statements/class/elements/ternary-init-err-contains-super.js
new file mode 100644
index 0000000000..daff75a0a5
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/ternary-init-err-contains-super.js
@@ -0,0 +1,28 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/init-err-contains-super.case
+// - src/class-elements/initializer-error/cls-decl-fields-ternary.template
+/*---
+description: Syntax error if `super()` used in class field (ternary expression)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-public]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ FieldDefinition:
+ PropertyNameInitializeropt
+
+ - It is a Syntax Error if Initializer is present and Initializer Contains SuperCall is true.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ x = false ? {} : super();
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/typeof-init-err-contains-arguments.js b/js/src/tests/test262/language/statements/class/elements/typeof-init-err-contains-arguments.js
new file mode 100644
index 0000000000..008897003f
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/typeof-init-err-contains-arguments.js
@@ -0,0 +1,35 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/init-err-contains-arguments.case
+// - src/class-elements/initializer-error/cls-decl-fields-typeof.template
+/*---
+description: Syntax error if `arguments` used in class field (typeof expression)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-public]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ FieldDefinition:
+ PropertyNameInitializeropt
+
+ - It is a Syntax Error if ContainsArguments of Initializer is true.
+
+ Static Semantics: ContainsArguments
+ IdentifierReference : Identifier
+
+ 1. If the StringValue of Identifier is "arguments", return true.
+ ...
+ For all other grammatical productions, recurse on all nonterminals. If any piece returns true, then return true. Otherwise return false.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ x = typeof arguments;
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/typeof-init-err-contains-super.js b/js/src/tests/test262/language/statements/class/elements/typeof-init-err-contains-super.js
new file mode 100644
index 0000000000..ac76975da2
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/typeof-init-err-contains-super.js
@@ -0,0 +1,28 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/init-err-contains-super.case
+// - src/class-elements/initializer-error/cls-decl-fields-typeof.template
+/*---
+description: Syntax error if `super()` used in class field (typeof expression)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-public]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Static Semantics: Early Errors
+
+ FieldDefinition:
+ PropertyNameInitializeropt
+
+ - It is a Syntax Error if Initializer is present and Initializer Contains SuperCall is true.
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ x = typeof super();
+}
diff --git a/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-computed-names.js b/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-computed-names.js
new file mode 100644
index 0000000000..30e6024dba
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-computed-names.js
@@ -0,0 +1,96 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/computed-names.case
+// - src/class-elements/productions/cls-decl-wrapped-in-sc.template
+/*---
+description: Computed property names (fields definition wrapped in semicolons)
+esid: prod-FieldDefinition
+features: [class-fields-public, computed-property-names, class]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement:
+ ...
+ FieldDefinition ;
+
+ FieldDefinition:
+ ClassElementName Initializer_opt
+
+ ClassElementName:
+ PropertyName
+
+---*/
+var x = "b";
+
+
+
+class C {
+ ;;;;
+ ;;;;;;[x] = 42; [10] = "meep"; ["not initialized"];;;;;;;
+ ;;;;
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "b"),
+ "b doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "b"),
+ "b doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "b", {
+ value: 42,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "x"),
+ "x doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "x"),
+ "x doesn't appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "x"),
+ "x doesn't appear as an own property on C instance"
+);
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "10"),
+ "10 doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "10"),
+ "10 doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "10", {
+ value: "meep",
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "not initialized"),
+ "'not initialized' doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "not initialized"),
+ "'not initialized' doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "not initialized", {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-computed-symbol-names.js b/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-computed-symbol-names.js
new file mode 100644
index 0000000000..ce1ebcd921
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-computed-symbol-names.js
@@ -0,0 +1,94 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/computed-symbol-names.case
+// - src/class-elements/productions/cls-decl-wrapped-in-sc.template
+/*---
+description: Computed property symbol names (fields definition wrapped in semicolons)
+esid: prod-FieldDefinition
+features: [class-fields-public, Symbol, computed-property-names, class]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement:
+ ...
+ FieldDefinition ;
+
+ FieldDefinition:
+ ClassElementName Initializer_opt
+
+ ClassElementName:
+ PropertyName
+
+---*/
+var x = Symbol();
+var y = Symbol();
+
+
+
+class C {
+ ;;;;
+ ;;;;;;[x]; [y] = 42;;;;;;;
+ ;;;;
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, x),
+ "Symbol x doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, x),
+ "Symbol x doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, x, {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, y),
+ "Symbol y doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, y),
+ "Symbol y doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, y, {
+ value: 42,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "x"),
+ "x doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "x"),
+ "x doesn't appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "x"),
+ "x doesn't appear as an own property on C instance"
+);
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "y"),
+ "y doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "y"),
+ "y doesn't appear as an own property on C constructor"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(c, "y"),
+ "y doesn't appear as an own property on C instance"
+);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-grammar-privatename-identifier-semantics-stringvalue.js b/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-grammar-privatename-identifier-semantics-stringvalue.js
new file mode 100644
index 0000000000..662df262e2
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-grammar-privatename-identifier-semantics-stringvalue.js
@@ -0,0 +1,97 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-privatename-identifier-semantics-stringvalue.case
+// - src/class-elements/productions/cls-decl-wrapped-in-sc.template
+/*---
+description: PrivateName Static Semantics, StringValue (fields definition wrapped in semicolons)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public]
+flags: [generated]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+
+ 1. Return the String value consisting of the sequence of code
+ units corresponding to PrivateName. In determining the sequence
+ any occurrences of \ UnicodeEscapeSequence are first replaced
+ with the code point represented by the UnicodeEscapeSequence
+ and then the code points of the entire PrivateName are converted
+ to code units by UTF16Encoding (10.1.1) each code point.
+
+---*/
+
+
+class C {
+ ;;;;
+ ;;;;;;#\u{6F};
+ #\u2118;
+ #ZW_\u200C_NJ;
+ #ZW_\u200D_J;;;;;;;;
+ ;;;;
+ o(value) {
+ this.#o = value;
+ return this.#o;
+ }
+ ℘(value) {
+ this.#℘ = value;
+ return this.#℘;
+ }
+ ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS METHOD
+ this.#ZW_‌_NJ = value;
+ return this.#ZW_‌_NJ;
+ }
+ ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS METHOD
+ this.#ZW_‍_J = value;
+ return this.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.o(1), 1);
+assert.sameValue(c.℘(1), 1);
+assert.sameValue(c.ZW_‌_NJ(1), 1);
+assert.sameValue(c.ZW_‍_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-literal-names-asi.js b/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-literal-names-asi.js
new file mode 100644
index 0000000000..b7c8cba4af
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-literal-names-asi.js
@@ -0,0 +1,66 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/literal-names-asi.case
+// - src/class-elements/productions/cls-decl-wrapped-in-sc.template
+/*---
+description: Literal property names with ASI (fields definition wrapped in semicolons)
+esid: prod-FieldDefinition
+features: [class-fields-public, class]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement:
+ ...
+ FieldDefinition ;
+
+ FieldDefinition:
+ ClassElementName Initializer_opt
+
+ ClassElementName:
+ PropertyName
+
+---*/
+
+
+class C {
+ ;;;;
+ ;;;;;;a
+ b = 42;;;;;;;;
+ ;;;;
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "a"),
+ "a doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "a"),
+ "a doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "a", {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "b"),
+ "b doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "b"),
+ "b doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "b", {
+ value: 42,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-literal-names.js b/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-literal-names.js
new file mode 100644
index 0000000000..14874fa1aa
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-literal-names.js
@@ -0,0 +1,85 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/literal-names.case
+// - src/class-elements/productions/cls-decl-wrapped-in-sc.template
+/*---
+description: Literal property names (fields definition wrapped in semicolons)
+esid: prod-FieldDefinition
+features: [class-fields-public, class]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement:
+ ...
+ FieldDefinition ;
+
+ FieldDefinition:
+ ClassElementName Initializer_opt
+
+ ClassElementName:
+ PropertyName
+
+---*/
+const fn = function() {}
+
+
+
+class C {
+ ;;;;
+ ;;;;;;a; b = 42;
+ c = fn;;;;;;;
+ ;;;;
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "a"),
+ "a doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "a"),
+ "a doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "a", {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "b"),
+ "b doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "b"),
+ "b doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "b", {
+ value: 42,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "c"),
+ "c doesn't appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "c"),
+ "c doesn't appear as an own property on C constructor"
+);
+
+verifyProperty(c, "c", {
+ value: fn,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-private-field-usage.js b/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-private-field-usage.js
new file mode 100644
index 0000000000..250732f70e
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-private-field-usage.js
@@ -0,0 +1,37 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-field-usage.case
+// - src/class-elements/productions/cls-decl-wrapped-in-sc.template
+/*---
+description: PrivateName CallExpression usage (private field) (fields definition wrapped in semicolons)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public]
+flags: [generated]
+info: |
+ Updated Productions
+
+ CallExpression[Yield, Await]:
+ CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+ SuperCall[?Yield, ?Await]
+ CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+ CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+ CallExpression[?Yield, ?Await].IdentifierName
+ CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+ CallExpression[?Yield, ?Await].PrivateName
+
+---*/
+
+
+class C {
+ ;;;;
+ ;;;;;;#m = 'test262';;;;;;;;
+ ;;;;
+ method() {
+ return this.#m;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.method(), 'test262');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-private-method-getter-usage.js b/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-private-method-getter-usage.js
new file mode 100644
index 0000000000..96dc07fce4
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-private-method-getter-usage.js
@@ -0,0 +1,37 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-method-getter-usage.case
+// - src/class-elements/productions/cls-decl-wrapped-in-sc.template
+/*---
+description: PrivateName CallExpression usage (Accesor get method) (fields definition wrapped in semicolons)
+esid: prod-FieldDefinition
+features: [class-methods-private, class, class-fields-public]
+flags: [generated]
+info: |
+ Updated Productions
+
+ CallExpression[Yield, Await]:
+ CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+ SuperCall[?Yield, ?Await]
+ CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+ CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+ CallExpression[?Yield, ?Await].IdentifierName
+ CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+ CallExpression[?Yield, ?Await].PrivateName
+
+---*/
+
+
+class C {
+ ;;;;
+ ;;;;;;get #m() { return 'test262'; };;;;;;;
+ ;;;;
+ method() {
+ return this.#m;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.method(), 'test262');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-private-method-usage.js b/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-private-method-usage.js
new file mode 100644
index 0000000000..f40a7674dc
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-private-method-usage.js
@@ -0,0 +1,37 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-method-usage.case
+// - src/class-elements/productions/cls-decl-wrapped-in-sc.template
+/*---
+description: PrivateName CallExpression usage (private method) (fields definition wrapped in semicolons)
+esid: prod-FieldDefinition
+features: [class-methods-private, class, class-fields-public]
+flags: [generated]
+info: |
+ Updated Productions
+
+ CallExpression[Yield, Await]:
+ CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+ SuperCall[?Yield, ?Await]
+ CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+ CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+ CallExpression[?Yield, ?Await].IdentifierName
+ CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+ CallExpression[?Yield, ?Await].PrivateName
+
+---*/
+
+
+class C {
+ ;;;;
+ ;;;;;;#m() { return 'test262'; };;;;;;;
+ ;;;;
+ method() {
+ return this.#m();
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.method(), 'test262');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-private-names.js b/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-private-names.js
new file mode 100644
index 0000000000..cd5fdb0d9f
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-private-names.js
@@ -0,0 +1,59 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-names.case
+// - src/class-elements/productions/cls-decl-wrapped-in-sc.template
+/*---
+description: private names (fields definition wrapped in semicolons)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public]
+flags: [generated]
+info: |
+ ClassElement :
+ ...
+ FieldDefinition ;
+
+ FieldDefinition :
+ ClassElementName Initializer_opt
+
+ ClassElementName :
+ PrivateName
+
+ PrivateName :
+ # IdentifierName
+
+---*/
+
+
+class C {
+ ;;;;
+ ;;;;;;#x; #y;;;;;;;
+ ;;;;
+ x() {
+ this.#x = 42;
+ return this.#x;
+ }
+ y() {
+ this.#y = 43;
+ return this.#y;
+ }
+}
+
+var c = new C();
+
+// Test the private fields do not appear as properties before set to value
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#x"), "test 1");
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 2");
+assert(!Object.prototype.hasOwnProperty.call(c, "#x"), "test 3");
+
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#y"), "test 4");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 5");
+assert(!Object.prototype.hasOwnProperty.call(c, "#y"), "test 6");
+
+// Test if private fields can be sucessfully accessed and set to value
+assert.sameValue(c.x(), 42, "test 7");
+assert.sameValue(c.y(), 43, "test 8");
+
+// Test the private fields do not appear as properties before after set to value
+assert(!Object.prototype.hasOwnProperty.call(c, "#x"), "test 9");
+assert(!Object.prototype.hasOwnProperty.call(c, "#y"), "test 10");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-field-identifier-initializer.js b/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-field-identifier-initializer.js
new file mode 100644
index 0000000000..b73e3b18f6
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-field-identifier-initializer.js
@@ -0,0 +1,75 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-field-identifier-initializer.case
+// - src/class-elements/productions/cls-decl-wrapped-in-sc.template
+/*---
+description: Valid FieldDefinition (fields definition wrapped in semicolons)
+esid: prod-FieldDefinition
+features: [class-fields-public, class]
+flags: [generated]
+info: |
+ ClassElement :
+ ...
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+
+ PropertyName :
+ LiteralPropertyName
+ ComputedPropertyName
+
+ LiteralPropertyName :
+ IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ ;;;;
+ ;;;;;;$ = 1; _ = 1; \u{6F} = 1; \u2118 = 1; ZW_\u200C_NJ = 1; ZW_\u200D_J = 1;;;;;;;
+ ;;;;
+
+}
+
+var c = new C();
+
+assert.sameValue(c.$, 1);
+assert.sameValue(c._, 1);
+assert.sameValue(c.\u{6F}, 1);
+assert.sameValue(c.\u2118, 1);
+assert.sameValue(c.ZW_\u200C_NJ, 1);
+assert.sameValue(c.ZW_\u200D_J, 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-field-identifier.js b/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-field-identifier.js
new file mode 100644
index 0000000000..258d3a90fe
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-field-identifier.js
@@ -0,0 +1,82 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-field-identifier.case
+// - src/class-elements/productions/cls-decl-wrapped-in-sc.template
+/*---
+description: Valid FieldDefinition (fields definition wrapped in semicolons)
+esid: prod-FieldDefinition
+features: [class-fields-public, class]
+flags: [generated]
+info: |
+ ClassElement :
+ ...
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+
+ PropertyName :
+ LiteralPropertyName
+ ComputedPropertyName
+
+ LiteralPropertyName :
+ IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ ;;;;
+ ;;;;;;$; _; \u{6F}; \u2118; ZW_\u200C_NJ; ZW_\u200D_J;;;;;;;
+ ;;;;
+
+}
+
+var c = new C();
+
+c.$ = 1;
+c._ = 1;
+c.\u{6F} = 1;
+c.\u2118 = 1;
+c.ZW_\u200C_NJ = 1;
+c.ZW_\u200D_J = 1;
+
+assert.sameValue(c.$, 1);
+assert.sameValue(c._, 1);
+assert.sameValue(c.\u{6F}, 1);
+assert.sameValue(c.\u2118, 1);
+assert.sameValue(c.ZW_\u200C_NJ, 1);
+assert.sameValue(c.ZW_\u200D_J, 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-private-getter-alt.js b/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-private-getter-alt.js
new file mode 100644
index 0000000000..596acd77f1
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-private-getter-alt.js
@@ -0,0 +1,116 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-getter-alt.case
+// - src/class-elements/productions/cls-decl-wrapped-in-sc.template
+/*---
+description: Valid PrivateName as private getter (fields definition wrapped in semicolons)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public]
+flags: [generated]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ...
+ get ClassElementName ( ){ FunctionBody }
+ ...
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ ;;;;
+ ;;;;;;#$_; #__; #\u{6F}_; #℘_; #ZW_‌_NJ_; #ZW_‍_J_;
+ get #$() {
+ return this.#$_;
+ }
+ get #_() {
+ return this.#__;
+ }
+ get #\u{6F}() {
+ return this.#\u{6F}_;
+ }
+ get #℘() {
+ return this.#℘_;
+ }
+ get #ZW_‌_NJ() {
+ return this.#ZW_‌_NJ_;
+ }
+ get #ZW_‍_J() {
+ return this.#ZW_‍_J_;
+ }
+;;;;;;;
+ ;;;;
+ $(value) {
+ this.#$_ = value;
+ return this.#$;
+ }
+ _(value) {
+ this.#__ = value;
+ return this.#_;
+ }
+ \u{6F}(value) {
+ this.#\u{6F}_ = value;
+ return this.#\u{6F};
+ }
+ ℘(value) {
+ this.#℘_ = value;
+ return this.#℘;
+ }
+ ZW_‌_NJ(value) {
+ this.#ZW_‌_NJ_ = value;
+ return this.#ZW_‌_NJ;
+ }
+ ZW_‍_J(value) {
+ this.#ZW_‍_J_ = value;
+ return this.#ZW_‍_J;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.℘(1), 1);
+assert.sameValue(c.ZW_‌_NJ(1), 1);
+assert.sameValue(c.ZW_‍_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-private-getter.js b/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-private-getter.js
new file mode 100644
index 0000000000..3dc72041ab
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-private-getter.js
@@ -0,0 +1,116 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-getter.case
+// - src/class-elements/productions/cls-decl-wrapped-in-sc.template
+/*---
+description: Valid PrivateName as private getter (fields definition wrapped in semicolons)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public]
+flags: [generated]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ...
+ get ClassElementName ( ){ FunctionBody }
+ ...
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ ;;;;
+ ;;;;;;#$_; #__; #\u{6F}_; #\u2118_; #ZW_\u200C_NJ_; #ZW_\u200D_J_;
+ get #$() {
+ return this.#$_;
+ }
+ get #_() {
+ return this.#__;
+ }
+ get #\u{6F}() {
+ return this.#\u{6F}_;
+ }
+ get #\u2118() {
+ return this.#\u2118_;
+ }
+ get #ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ_;
+ }
+ get #ZW_\u200D_J() {
+ return this.#ZW_\u200D_J_;
+ }
+;;;;;;;
+ ;;;;
+ $(value) {
+ this.#$_ = value;
+ return this.#$;
+ }
+ _(value) {
+ this.#__ = value;
+ return this.#_;
+ }
+ \u{6F}(value) {
+ this.#\u{6F}_ = value;
+ return this.#\u{6F};
+ }
+ \u2118(value) {
+ this.#\u2118_ = value;
+ return this.#\u2118;
+ }
+ ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ_ = value;
+ return this.#ZW_\u200C_NJ;
+ }
+ ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J_ = value;
+ return this.#ZW_\u200D_J;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.\u2118(1), 1);
+assert.sameValue(c.ZW_\u200C_NJ(1), 1);
+assert.sameValue(c.ZW_\u200D_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-private-method-alt.js b/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-private-method-alt.js
new file mode 100644
index 0000000000..b62a4f7d4b
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-private-method-alt.js
@@ -0,0 +1,115 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-method-alt.case
+// - src/class-elements/productions/cls-decl-wrapped-in-sc.template
+/*---
+description: Valid PrivateName as private method (fields definition wrapped in semicolons)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public]
+flags: [generated]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ClassElementName ( UniqueFormalParameters ) { FunctionBody }
+ ...
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ ;;;;
+ ;;;;;;#$_; #__; #\u{6F}_; #℘_; #ZW_‌_NJ_; #ZW_‍_J_;
+ #$() {
+ return this.#$_;
+ }
+ #_() {
+ return this.#__;
+ }
+ #\u{6F}() {
+ return this.#\u{6F}_;
+ }
+ #℘() {
+ return this.#℘_;
+ }
+ #ZW_‌_NJ() {
+ return this.#ZW_‌_NJ_;
+ }
+ #ZW_‍_J() {
+ return this.#ZW_‍_J_;
+ }
+;;;;;;;
+ ;;;;
+ $(value) {
+ this.#$_ = value;
+ return this.#$();
+ }
+ _(value) {
+ this.#__ = value;
+ return this.#_();
+ }
+ \u{6F}(value) {
+ this.#\u{6F}_ = value;
+ return this.#\u{6F}();
+ }
+ ℘(value) {
+ this.#℘_ = value;
+ return this.#℘();
+ }
+ ZW_‌_NJ(value) {
+ this.#ZW_‌_NJ_ = value;
+ return this.#ZW_‌_NJ();
+ }
+ ZW_‍_J(value) {
+ this.#ZW_‍_J_ = value;
+ return this.#ZW_‍_J();
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.℘(1), 1);
+assert.sameValue(c.ZW_‌_NJ(1), 1);
+assert.sameValue(c.ZW_‍_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-private-method.js b/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-private-method.js
new file mode 100644
index 0000000000..64e147f00e
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-private-method.js
@@ -0,0 +1,115 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-method.case
+// - src/class-elements/productions/cls-decl-wrapped-in-sc.template
+/*---
+description: Valid PrivateName as private method (fields definition wrapped in semicolons)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public]
+flags: [generated]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ClassElementName ( UniqueFormalParameters ) { FunctionBody }
+ ...
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ ;;;;
+ ;;;;;;#$_; #__; #\u{6F}_; #\u2118_; #ZW_\u200C_NJ_; #ZW_\u200D_J_;
+ #$() {
+ return this.#$_;
+ }
+ #_() {
+ return this.#__;
+ }
+ #\u{6F}() {
+ return this.#\u{6F}_;
+ }
+ #\u2118() {
+ return this.#\u2118_;
+ }
+ #ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ_;
+ }
+ #ZW_\u200D_J() {
+ return this.#ZW_\u200D_J_;
+ }
+;;;;;;;
+ ;;;;
+ $(value) {
+ this.#$_ = value;
+ return this.#$();
+ }
+ _(value) {
+ this.#__ = value;
+ return this.#_();
+ }
+ \u{6F}(value) {
+ this.#\u{6F}_ = value;
+ return this.#\u{6F}();
+ }
+ \u2118(value) {
+ this.#\u2118_ = value;
+ return this.#\u2118();
+ }
+ ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ_ = value;
+ return this.#ZW_\u200C_NJ();
+ }
+ ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J_ = value;
+ return this.#ZW_\u200D_J();
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.\u2118(1), 1);
+assert.sameValue(c.ZW_\u200C_NJ(1), 1);
+assert.sameValue(c.ZW_\u200D_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-private-setter-alt.js b/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-private-setter-alt.js
new file mode 100644
index 0000000000..293cb94806
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-private-setter-alt.js
@@ -0,0 +1,115 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-setter-alt.case
+// - src/class-elements/productions/cls-decl-wrapped-in-sc.template
+/*---
+description: Valid PrivateName as private setter (fields definition wrapped in semicolons)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public]
+flags: [generated]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ...
+ set ClassElementName ( PropertySetParameterList ) { FunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ ;;;;
+ ;;;;;;#$_; #__; #\u{6F}_; #℘_; #ZW_‌_NJ_; #ZW_‍_J_;
+ set #$(value) {
+ this.#$_ = value;
+ }
+ set #_(value) {
+ this.#__ = value;
+ }
+ set #\u{6F}(value) {
+ this.#\u{6F}_ = value;
+ }
+ set #℘(value) {
+ this.#℘_ = value;
+ }
+ set #ZW_‌_NJ(value) {
+ this.#ZW_‌_NJ_ = value;
+ }
+ set #ZW_‍_J(value) {
+ this.#ZW_‍_J_ = value;
+ }
+;;;;;;;
+ ;;;;
+ $(value) {
+ this.#$ = value;
+ return this.#$_;
+ }
+ _(value) {
+ this.#_ = value;
+ return this.#__;
+ }
+ \u{6F}(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F}_;
+ }
+ ℘(value) {
+ this.#℘ = value;
+ return this.#℘_;
+ }
+ ZW_‌_NJ(value) {
+ this.#ZW_‌_NJ = value;
+ return this.#ZW_‌_NJ_;
+ }
+ ZW_‍_J(value) {
+ this.#ZW_‍_J = value;
+ return this.#ZW_‍_J_;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.℘(1), 1);
+assert.sameValue(c.ZW_‌_NJ(1), 1);
+assert.sameValue(c.ZW_‍_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-private-setter.js b/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-private-setter.js
new file mode 100644
index 0000000000..e199eac710
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-private-setter.js
@@ -0,0 +1,115 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-private-setter.case
+// - src/class-elements/productions/cls-decl-wrapped-in-sc.template
+/*---
+description: Valid PrivateName as private setter (fields definition wrapped in semicolons)
+esid: prod-FieldDefinition
+features: [class-methods-private, class-fields-private, class, class-fields-public]
+flags: [generated]
+info: |
+ ClassElement :
+ MethodDefinition
+ ...
+ ;
+
+ MethodDefinition :
+ ...
+ set ClassElementName ( PropertySetParameterList ) { FunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ ;;;;
+ ;;;;;;#$_; #__; #\u{6F}_; #\u2118_; #ZW_\u200C_NJ_; #ZW_\u200D_J_;
+ set #$(value) {
+ this.#$_ = value;
+ }
+ set #_(value) {
+ this.#__ = value;
+ }
+ set #\u{6F}(value) {
+ this.#\u{6F}_ = value;
+ }
+ set #\u2118(value) {
+ this.#\u2118_ = value;
+ }
+ set #ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ_ = value;
+ }
+ set #ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J_ = value;
+ }
+;;;;;;;
+ ;;;;
+ $(value) {
+ this.#$ = value;
+ return this.#$_;
+ }
+ _(value) {
+ this.#_ = value;
+ return this.#__;
+ }
+ \u{6F}(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F}_;
+ }
+ \u2118(value) {
+ this.#\u2118 = value;
+ return this.#\u2118_;
+ }
+ ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ = value;
+ return this.#ZW_\u200C_NJ_;
+ }
+ ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J = value;
+ return this.#ZW_\u200D_J_;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.\u2118(1), 1);
+assert.sameValue(c.ZW_\u200C_NJ(1), 1);
+assert.sameValue(c.ZW_\u200D_J(1), 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-privatename-identifier-alt.js
new file mode 100644
index 0000000000..d54f48af3c
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-privatename-identifier-alt.js
@@ -0,0 +1,97 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-wrapped-in-sc.template
+/*---
+description: Valid PrivateName (fields definition wrapped in semicolons)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public]
+flags: [generated]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ ;;;;
+ ;;;;;;#$; #_; #\u{6F}; #℘; #ZW_‌_NJ; #ZW_‍_J;;;;;;;
+ ;;;;
+ $(value) {
+ this.#$ = value;
+ return this.#$;
+ }
+ _(value) {
+ this.#_ = value;
+ return this.#_;
+ }
+ \u{6F}(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F};
+ }
+ ℘(value) {
+ this.#℘ = value;
+ return this.#℘;
+ }
+ ZW_‌_NJ(value) {
+ this.#ZW_‌_NJ = value;
+ return this.#ZW_‌_NJ;
+ }
+ ZW_‍_J(value) {
+ this.#ZW_‍_J = value;
+ return this.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.℘(1), 1);
+assert.sameValue(c.ZW_‌_NJ(1), 1);
+assert.sameValue(c.ZW_‍_J(1), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-privatename-identifier-initializer-alt.js b/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-privatename-identifier-initializer-alt.js
new file mode 100644
index 0000000000..dfce12d03b
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-privatename-identifier-initializer-alt.js
@@ -0,0 +1,91 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-privatename-identifier-initializer-alt.case
+// - src/class-elements/productions/cls-decl-wrapped-in-sc.template
+/*---
+description: Valid PrivateName (fields definition wrapped in semicolons)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public]
+flags: [generated]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ ;;;;
+ ;;;;;;#$ = 1; #_ = 1; #\u{6F} = 1; #℘ = 1; #ZW_‌_NJ = 1; #ZW_‍_J = 1;;;;;;;
+ ;;;;
+ $() {
+ return this.#$;
+ }
+ _() {
+ return this.#_;
+ }
+ \u{6F}() {
+ return this.#\u{6F};
+ }
+ ℘() {
+ return this.#℘;
+ }
+ ZW_‌_NJ() {
+ return this.#ZW_‌_NJ;
+ }
+ ZW_‍_J() {
+ return this.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.$(), 1);
+assert.sameValue(c._(), 1);
+assert.sameValue(c.\u{6F}(), 1);
+assert.sameValue(c.℘(), 1);
+assert.sameValue(c.ZW_‌_NJ(), 1);
+assert.sameValue(c.ZW_‍_J(), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-privatename-identifier-initializer.js b/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-privatename-identifier-initializer.js
new file mode 100644
index 0000000000..c8ca2df9b5
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-privatename-identifier-initializer.js
@@ -0,0 +1,91 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-privatename-identifier-initializer.case
+// - src/class-elements/productions/cls-decl-wrapped-in-sc.template
+/*---
+description: Valid PrivateName (fields definition wrapped in semicolons)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public]
+flags: [generated]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ ;;;;
+ ;;;;;;#$ = 1; #_ = 1; #\u{6F} = 1; #\u2118 = 1; #ZW_\u200C_NJ = 1; #ZW_\u200D_J = 1;;;;;;;
+ ;;;;
+ $() {
+ return this.#$;
+ }
+ _() {
+ return this.#_;
+ }
+ \u{6F}() {
+ return this.#\u{6F};
+ }
+ \u2118() {
+ return this.#\u2118;
+ }
+ ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ;
+ }
+ ZW_\u200D_J() {
+ return this.#ZW_\u200D_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.$(), 1);
+assert.sameValue(c._(), 1);
+assert.sameValue(c.\u{6F}(), 1);
+assert.sameValue(c.\u2118(), 1);
+assert.sameValue(c.ZW_\u200C_NJ(), 1);
+assert.sameValue(c.ZW_\u200D_J(), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-privatename-identifier.js
new file mode 100644
index 0000000000..33698474f6
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-privatename-identifier.js
@@ -0,0 +1,97 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-wrapped-in-sc.template
+/*---
+description: Valid PrivateName (fields definition wrapped in semicolons)
+esid: prod-FieldDefinition
+features: [class-fields-private, class, class-fields-public]
+flags: [generated]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ ;;;;
+ ;;;;;;#$; #_; #\u{6F}; #\u2118; #ZW_\u200C_NJ; #ZW_\u200D_J;;;;;;;
+ ;;;;
+ $(value) {
+ this.#$ = value;
+ return this.#$;
+ }
+ _(value) {
+ this.#_ = value;
+ return this.#_;
+ }
+ \u{6F}(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F};
+ }
+ \u2118(value) {
+ this.#\u2118 = value;
+ return this.#\u2118;
+ }
+ ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ = value;
+ return this.#ZW_\u200C_NJ;
+ }
+ ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J = value;
+ return this.#ZW_\u200D_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(c.$(1), 1);
+assert.sameValue(c._(1), 1);
+assert.sameValue(c.\u{6F}(1), 1);
+assert.sameValue(c.\u2118(1), 1);
+assert.sameValue(c.ZW_\u200C_NJ(1), 1);
+assert.sameValue(c.ZW_\u200D_J(1), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-static-async-generator-method-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-static-async-generator-method-privatename-identifier-alt.js
new file mode 100644
index 0000000000..af07c42679
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-static-async-generator-method-privatename-identifier-alt.js
@@ -0,0 +1,122 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-async-generator-method-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-wrapped-in-sc.template
+/*---
+description: Valid Static AsyncGeneratorMethod PrivateName (fields definition wrapped in semicolons)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public]
+flags: [generated, async]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ ;;;;
+ ;;;;;;static async * #$(value) {
+ yield * await value;
+ }
+ static async * #_(value) {
+ yield * await value;
+ }
+ static async * #o(value) {
+ yield * await value;
+ }
+ static async * #℘(value) {
+ yield * await value;
+ }
+ static async * #ZW_‌_NJ(value) {
+ yield * await value;
+ }
+ static async * #ZW_‍_J(value) {
+ yield * await value;
+ };;;;;;;
+ ;;;;
+ static get $() {
+ return this.#$;
+ }
+ static get _() {
+ return this.#_;
+ }
+ static get o() {
+ return this.#o;
+ }
+ static get ℘() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#℘;
+ }
+ static get ZW_‌_NJ() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‌_NJ;
+ }
+ static get ZW_‍_J() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‍_J;
+ }
+
+}
+
+var c = new C();
+
+Promise.all([
+ C.$([1]).next(),
+ C._([1]).next(),
+ C.o([1]).next(),
+ C.℘([1]).next(), // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.ZW_‌_NJ([1]).next(), // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.ZW_‍_J([1]).next(), // DO NOT CHANGE THE NAME OF THIS FIELD
+]).then(results => {
+
+ assert.sameValue(results[0].value, 1);
+ assert.sameValue(results[1].value, 1);
+ assert.sameValue(results[2].value, 1);
+ assert.sameValue(results[3].value, 1);
+ assert.sameValue(results[4].value, 1);
+ assert.sameValue(results[5].value, 1);
+
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-static-async-generator-method-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-static-async-generator-method-privatename-identifier.js
new file mode 100644
index 0000000000..f4b1e4b5e7
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-static-async-generator-method-privatename-identifier.js
@@ -0,0 +1,123 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-async-generator-method-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-wrapped-in-sc.template
+/*---
+description: Valid Static AsyncGeneratorMethod PrivateName (fields definition wrapped in semicolons)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public]
+flags: [generated, async]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ AsyncGeneratorMethod
+
+ AsyncGeneratorMethod :
+ async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ ;;;;
+ ;;;;;;static async * #$(value) {
+ yield * await value;
+ }
+ static async * #_(value) {
+ yield * await value;
+ }
+ static async * #\u{6F}(value) {
+ yield * await value;
+ }
+ static async * #\u2118(value) {
+ yield * await value;
+ }
+ static async * #ZW_\u200C_NJ(value) {
+ yield * await value;
+ }
+ static async * #ZW_\u200D_J(value) {
+ yield * await value;
+ };;;;;;;
+ ;;;;
+ static get $() {
+ return this.#$;
+ }
+ static get _() {
+ return this.#_;
+ }
+ static get \u{6F}() {
+ return this.#\u{6F};
+ }
+ static get \u2118() {
+ return this.#\u2118;
+ }
+ static get ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ;
+ }
+ static get ZW_\u200D_J() {
+ return this.#ZW_\u200D_J;
+ }
+
+}
+
+var c = new C();
+
+Promise.all([
+ C.$([1]).next(),
+ C._([1]).next(),
+ C.\u{6F}([1]).next(),
+ C.\u2118([1]).next(),
+ C.ZW_\u200C_NJ([1]).next(),
+ C.ZW_\u200D_J([1]).next(),
+]).then(results => {
+
+ assert.sameValue(results[0].value, 1);
+ assert.sameValue(results[1].value, 1);
+ assert.sameValue(results[2].value, 1);
+ assert.sameValue(results[3].value, 1);
+ assert.sameValue(results[4].value, 1);
+ assert.sameValue(results[5].value, 1);
+
+}).then($DONE, $DONE);
+
diff --git a/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-static-async-method-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-static-async-method-privatename-identifier-alt.js
new file mode 100644
index 0000000000..71adbfab98
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-static-async-method-privatename-identifier-alt.js
@@ -0,0 +1,122 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-async-method-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-wrapped-in-sc.template
+/*---
+description: Valid Static AsyncMethod PrivateName (fields definition wrapped in semicolons)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public]
+flags: [generated, async]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ AsyncMethod
+
+ AsyncMethod :
+ async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ ;;;;
+ ;;;;;;static async #$(value) {
+ return await value;
+ }
+ static async #_(value) {
+ return await value;
+ }
+ static async #o(value) {
+ return await value;
+ }
+ static async #℘(value) {
+ return await value;
+ }
+ static async #ZW_‌_NJ(value) {
+ return await value;
+ }
+ static async #ZW_‍_J(value) {
+ return await value;
+ };;;;;;;
+ ;;;;
+ static async $(value) {
+ return await this.#$(value);
+ }
+ static async _(value) {
+ return await this.#_(value);
+ }
+ static async o(value) {
+ return await this.#o(value);
+ }
+ static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return await this.#℘(value);
+ }
+ static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return await this.#ZW_‌_NJ(value);
+ }
+ static async ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return await this.#ZW_‍_J(value);
+ }
+
+}
+
+var c = new C();
+
+Promise.all([
+ C.$(1),
+ C._(1),
+ C.o(1),
+ C.℘(1), // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.ZW_‌_NJ(1), // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.ZW_‍_J(1), // DO NOT CHANGE THE NAME OF THIS FIELD
+]).then(results => {
+
+ assert.sameValue(results[0], 1);
+ assert.sameValue(results[1], 1);
+ assert.sameValue(results[2], 1);
+ assert.sameValue(results[3], 1);
+ assert.sameValue(results[4], 1);
+ assert.sameValue(results[5], 1);
+
+}).then($DONE, $DONE);
diff --git a/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-static-async-method-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-static-async-method-privatename-identifier.js
new file mode 100644
index 0000000000..c8900b18e9
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-static-async-method-privatename-identifier.js
@@ -0,0 +1,123 @@
+// |reftest| async
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-async-method-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-wrapped-in-sc.template
+/*---
+description: Valid Static AsyncMethod PrivateName (fields definition wrapped in semicolons)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public]
+flags: [generated, async]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ AsyncMethod
+
+ AsyncMethod :
+ async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ ;;;;
+ ;;;;;;static async #$(value) {
+ return await value;
+ }
+ static async #_(value) {
+ return await value;
+ }
+ static async #\u{6F}(value) {
+ return await value;
+ }
+ static async #\u2118(value) {
+ return await value;
+ }
+ static async #ZW_\u200C_NJ(value) {
+ return await value;
+ }
+ static async #ZW_\u200D_J(value) {
+ return await value;
+ };;;;;;;
+ ;;;;
+ static async $(value) {
+ return await this.#$(value);
+ }
+ static async _(value) {
+ return await this.#_(value);
+ }
+ static async \u{6F}(value) {
+ return await this.#\u{6F}(value);
+ }
+ static async \u2118(value) {
+ return await this.#\u2118(value);
+ }
+ static async ZW_\u200C_NJ(value) {
+ return await this.#ZW_\u200C_NJ(value);
+ }
+ static async ZW_\u200D_J(value) {
+ return await this.#ZW_\u200D_J(value);
+ }
+
+}
+
+var c = new C();
+
+Promise.all([
+ C.$(1),
+ C._(1),
+ C.\u{6F}(1),
+ C.\u2118(1),
+ C.ZW_\u200C_NJ(1),
+ C.ZW_\u200D_J(1),
+]).then(results => {
+
+ assert.sameValue(results[0], 1);
+ assert.sameValue(results[1], 1);
+ assert.sameValue(results[2], 1);
+ assert.sameValue(results[3], 1);
+ assert.sameValue(results[4], 1);
+ assert.sameValue(results[5], 1);
+
+}).then($DONE, $DONE);
+
diff --git a/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-static-generator-method-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-static-generator-method-privatename-identifier-alt.js
new file mode 100644
index 0000000000..639550053b
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-static-generator-method-privatename-identifier-alt.js
@@ -0,0 +1,112 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-generator-method-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-wrapped-in-sc.template
+/*---
+description: Valid Static GeneratorMethod PrivateName (fields definition wrapped in semicolons)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public]
+flags: [generated]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ GeneratorMethod
+
+ GeneratorMethod :
+ * ClassElementName ( UniqueFormalParameters ){ GeneratorBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ ;;;;
+ ;;;;;;static * #$(value) {
+ yield * value;
+ }
+ static * #_(value) {
+ yield * value;
+ }
+ static * #o(value) {
+ yield * value;
+ }
+ static * #℘(value) {
+ yield * value;
+ }
+ static * #ZW_‌_NJ(value) {
+ yield * value;
+ }
+ static * #ZW_‍_J(value) {
+ yield * value;
+ };;;;;;;
+ ;;;;
+ static get $() {
+ return this.#$;
+ }
+ static get _() {
+ return this.#_;
+ }
+ static get o() {
+ return this.#o;
+ }
+ static get ℘() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#℘;
+ }
+ static get ZW_‌_NJ() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‌_NJ;
+ }
+ static get ZW_‍_J() { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‍_J;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(C.$([1]).next().value, 1);
+assert.sameValue(C._([1]).next().value, 1);
+assert.sameValue(C.o([1]).next().value, 1);
+assert.sameValue(C.℘([1]).next().value, 1);
+assert.sameValue(C.ZW_‌_NJ([1]).next().value, 1);
+assert.sameValue(C.ZW_‍_J([1]).next().value, 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-static-generator-method-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-static-generator-method-privatename-identifier.js
new file mode 100644
index 0000000000..d32b781a06
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-static-generator-method-privatename-identifier.js
@@ -0,0 +1,113 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-generator-method-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-wrapped-in-sc.template
+/*---
+description: Valid Static GeneratorMethod PrivateName (fields definition wrapped in semicolons)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public]
+flags: [generated]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ GeneratorMethod
+
+ GeneratorMethod :
+ * ClassElementName ( UniqueFormalParameters ){ GeneratorBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ ;;;;
+ ;;;;;;static * #$(value) {
+ yield * value;
+ }
+ static * #_(value) {
+ yield * value;
+ }
+ static * #\u{6F}(value) {
+ yield * value;
+ }
+ static * #\u2118(value) {
+ yield * value;
+ }
+ static * #ZW_\u200C_NJ(value) {
+ yield * value;
+ }
+ static * #ZW_\u200D_J(value) {
+ yield * value;
+ };;;;;;;
+ ;;;;
+ static get $() {
+ return this.#$;
+ }
+ static get _() {
+ return this.#_;
+ }
+ static get \u{6F}() {
+ return this.#\u{6F};
+ }
+ static get \u2118() {
+ return this.#\u2118;
+ }
+ static get ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ;
+ }
+ static get ZW_\u200D_J() {
+ return this.#ZW_\u200D_J;
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(C.$([1]).next().value, 1);
+assert.sameValue(C._([1]).next().value, 1);
+assert.sameValue(C.\u{6F}([1]).next().value, 1);
+assert.sameValue(C.\u2118([1]).next().value, 1);
+assert.sameValue(C.ZW_\u200C_NJ([1]).next().value, 1);
+assert.sameValue(C.ZW_\u200D_J([1]).next().value, 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-static-method-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-static-method-privatename-identifier-alt.js
new file mode 100644
index 0000000000..bf440f11f0
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-static-method-privatename-identifier-alt.js
@@ -0,0 +1,110 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-method-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-wrapped-in-sc.template
+/*---
+description: Valid Static Method PrivateName (fields definition wrapped in semicolons)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public]
+flags: [generated]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ ClassElementName ( UniqueFormalParameters ){ FunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ ;;;;
+ ;;;;;;static #$(value) {
+ return value;
+ }
+ static #_(value) {
+ return value;
+ }
+ static #o(value) {
+ return value;
+ }
+ static #℘(value) {
+ return value;
+ }
+ static #ZW_‌_NJ(value) {
+ return value;
+ }
+ static #ZW_‍_J(value) {
+ return value;
+ };;;;;;;
+ ;;;;
+ static $(value) {
+ return this.#$(value);
+ }
+ static _(value) {
+ return this.#_(value);
+ }
+ static o(value) {
+ return this.#o(value);
+ }
+ static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#℘(value);
+ }
+ static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‌_NJ(value);
+ }
+ static ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ return this.#ZW_‍_J(value);
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(C.$(1), 1);
+assert.sameValue(C._(1), 1);
+assert.sameValue(C.o(1), 1);
+assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+assert.sameValue(C.ZW_‌_NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+assert.sameValue(C.ZW_‍_J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-static-method-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-static-method-privatename-identifier.js
new file mode 100644
index 0000000000..7e20ca05ea
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-static-method-privatename-identifier.js
@@ -0,0 +1,110 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-method-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-wrapped-in-sc.template
+/*---
+description: Valid Static Method PrivateName (fields definition wrapped in semicolons)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public]
+flags: [generated]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ MethodDefinition :
+ ClassElementName ( UniqueFormalParameters ){ FunctionBody }
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ ;;;;
+ ;;;;;;static #$(value) {
+ return value;
+ }
+ static #_(value) {
+ return value;
+ }
+ static #\u{6F}(value) {
+ return value;
+ }
+ static #\u2118(value) {
+ return value;
+ }
+ static #ZW_\u200C_NJ(value) {
+ return value;
+ }
+ static #ZW_\u200D_J(value) {
+ return value;
+ };;;;;;;
+ ;;;;
+ static $(value) {
+ return this.#$(value);
+ }
+ static _(value) {
+ return this.#_(value);
+ }
+ static \u{6F}(value) {
+ return this.#\u{6F}(value);
+ }
+ static \u2118(value) {
+ return this.#\u2118(value);
+ }
+ static ZW_\u200C_NJ(value) {
+ return this.#ZW_\u200C_NJ(value);
+ }
+ static ZW_\u200D_J(value) {
+ return this.#ZW_\u200D_J(value);
+ }
+
+}
+
+var c = new C();
+
+assert.sameValue(C.$(1), 1);
+assert.sameValue(C._(1), 1);
+assert.sameValue(C.\u{6F}(1), 1);
+assert.sameValue(C.\u2118(1), 1);
+assert.sameValue(C.ZW_\u200C_NJ(1), 1);
+assert.sameValue(C.ZW_\u200D_J(1), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-static-privatename-identifier-alt-by-classname.js b/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-static-privatename-identifier-alt-by-classname.js
new file mode 100644
index 0000000000..53c919ff36
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-static-privatename-identifier-alt-by-classname.js
@@ -0,0 +1,98 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-alt-by-classname.case
+// - src/class-elements/productions/cls-decl-wrapped-in-sc.template
+/*---
+description: Valid Static PrivateName (fields definition wrapped in semicolons)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public]
+flags: [generated]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ ;;;;
+ ;;;;;;static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_‍_J;;;;;;;
+ ;;;;
+ static $(value) {
+ C.#$ = value;
+ return C.#$;
+ }
+ static _(value) {
+ C.#_ = value;
+ return C.#_;
+ }
+ static o(value) {
+ C.#\u{6F} = value;
+ return C.#\u{6F};
+ }
+ static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.#℘ = value;
+ return C.#℘;
+ }
+ static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.#ZW_‌_NJ = value;
+ return C.#ZW_‌_NJ;
+ }
+ static ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ C.#ZW_‍_J = value;
+ return C.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(C.$(1), 1);
+assert.sameValue(C._(1), 1);
+assert.sameValue(C.o(1), 1);
+assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+assert.sameValue(C.ZW_‌_NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+assert.sameValue(C.ZW_‍_J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-static-privatename-identifier-alt.js b/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-static-privatename-identifier-alt.js
new file mode 100644
index 0000000000..c71bcea7df
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-static-privatename-identifier-alt.js
@@ -0,0 +1,98 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-alt.case
+// - src/class-elements/productions/cls-decl-wrapped-in-sc.template
+/*---
+description: Valid Static PrivateName (fields definition wrapped in semicolons)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public]
+flags: [generated]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ ;;;;
+ ;;;;;;static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_‍_J;;;;;;;
+ ;;;;
+ static $(value) {
+ this.#$ = value;
+ return this.#$;
+ }
+ static _(value) {
+ this.#_ = value;
+ return this.#_;
+ }
+ static o(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F};
+ }
+ static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ this.#℘ = value;
+ return this.#℘;
+ }
+ static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ this.#ZW_‌_NJ = value;
+ return this.#ZW_‌_NJ;
+ }
+ static ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
+ this.#ZW_‍_J = value;
+ return this.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(C.$(1), 1);
+assert.sameValue(C._(1), 1);
+assert.sameValue(C.o(1), 1);
+assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+assert.sameValue(C.ZW_‌_NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+assert.sameValue(C.ZW_‍_J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-static-privatename-identifier-by-classname.js b/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-static-privatename-identifier-by-classname.js
new file mode 100644
index 0000000000..88b4fa5341
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-static-privatename-identifier-by-classname.js
@@ -0,0 +1,98 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-by-classname.case
+// - src/class-elements/productions/cls-decl-wrapped-in-sc.template
+/*---
+description: Valid Static PrivateName (fields definition wrapped in semicolons)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public]
+flags: [generated]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ ;;;;
+ ;;;;;;static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J;;;;;;;
+ ;;;;
+ static $(value) {
+ C.#$ = value;
+ return C.#$;
+ }
+ static _(value) {
+ C.#_ = value;
+ return C.#_;
+ }
+ static \u{6F}(value) {
+ C.#\u{6F} = value;
+ return C.#\u{6F};
+ }
+ static \u2118(value) {
+ C.#\u2118 = value;
+ return C.#\u2118;
+ }
+ static ZW_\u200C_NJ(value) {
+ C.#ZW_\u200C_NJ = value;
+ return C.#ZW_\u200C_NJ;
+ }
+ static ZW_\u200D_J(value) {
+ C.#ZW_\u200D_J = value;
+ return C.#ZW_\u200D_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(C.$(1), 1);
+assert.sameValue(C._(1), 1);
+assert.sameValue(C.\u{6F}(1), 1);
+assert.sameValue(C.\u2118(1), 1);
+assert.sameValue(C.ZW_\u200C_NJ(1), 1);
+assert.sameValue(C.ZW_\u200D_J(1), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-static-privatename-identifier-initializer-alt-by-classname.js b/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-static-privatename-identifier-initializer-alt-by-classname.js
new file mode 100644
index 0000000000..c05a55b679
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-static-privatename-identifier-initializer-alt-by-classname.js
@@ -0,0 +1,92 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-initializer-alt-by-classname.case
+// - src/class-elements/productions/cls-decl-wrapped-in-sc.template
+/*---
+description: Valid Static PrivateName (fields definition wrapped in semicolons)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public]
+flags: [generated]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ ;;;;
+ ;;;;;;static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_‍_J = 1;;;;;;;
+ ;;;;
+ static $() {
+ return C.#$;
+ }
+ static _() {
+ return C.#_;
+ }
+ static \u{6F}() {
+ return C.#\u{6F};
+ }
+ static ℘() {
+ return C.#℘;
+ }
+ static ZW_‌_NJ() {
+ return C.#ZW_‌_NJ;
+ }
+ static ZW_‍_J() {
+ return C.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(C.$(), 1);
+assert.sameValue(C._(), 1);
+assert.sameValue(C.\u{6F}(), 1);
+assert.sameValue(C.℘(), 1);
+assert.sameValue(C.ZW_‌_NJ(), 1);
+assert.sameValue(C.ZW_‍_J(), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-static-privatename-identifier-initializer-alt.js b/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-static-privatename-identifier-initializer-alt.js
new file mode 100644
index 0000000000..ed638fd79a
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-static-privatename-identifier-initializer-alt.js
@@ -0,0 +1,92 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-initializer-alt.case
+// - src/class-elements/productions/cls-decl-wrapped-in-sc.template
+/*---
+description: Valid Static PrivateName (fields definition wrapped in semicolons)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public]
+flags: [generated]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ ;;;;
+ ;;;;;;static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_‍_J = 1;;;;;;;
+ ;;;;
+ static $() {
+ return this.#$;
+ }
+ static _() {
+ return this.#_;
+ }
+ static \u{6F}() {
+ return this.#\u{6F};
+ }
+ static ℘() {
+ return this.#℘;
+ }
+ static ZW_‌_NJ() {
+ return this.#ZW_‌_NJ;
+ }
+ static ZW_‍_J() {
+ return this.#ZW_‍_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(C.$(), 1);
+assert.sameValue(C._(), 1);
+assert.sameValue(C.\u{6F}(), 1);
+assert.sameValue(C.℘(), 1);
+assert.sameValue(C.ZW_‌_NJ(), 1);
+assert.sameValue(C.ZW_‍_J(), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-static-privatename-identifier-initializer.js b/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-static-privatename-identifier-initializer.js
new file mode 100644
index 0000000000..34b301ccfe
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-static-privatename-identifier-initializer.js
@@ -0,0 +1,92 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier-initializer.case
+// - src/class-elements/productions/cls-decl-wrapped-in-sc.template
+/*---
+description: Valid Static PrivateName (fields definition wrapped in semicolons)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public]
+flags: [generated]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ ;;;;
+ ;;;;;;static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #\u2118 = 1; static #ZW_\u200C_NJ = 1; static #ZW_\u200D_J = 1;;;;;;;
+ ;;;;
+ static $() {
+ return this.#$;
+ }
+ static _() {
+ return this.#_;
+ }
+ static \u{6F}() {
+ return this.#\u{6F};
+ }
+ static \u2118() {
+ return this.#\u2118;
+ }
+ static ZW_\u200C_NJ() {
+ return this.#ZW_\u200C_NJ;
+ }
+ static ZW_\u200D_J() {
+ return this.#ZW_\u200D_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(C.$(), 1);
+assert.sameValue(C._(), 1);
+assert.sameValue(C.\u{6F}(), 1);
+assert.sameValue(C.\u2118(), 1);
+assert.sameValue(C.ZW_\u200C_NJ(), 1);
+assert.sameValue(C.ZW_\u200D_J(), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-static-privatename-identifier.js b/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-static-privatename-identifier.js
new file mode 100644
index 0000000000..92a8097f2c
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-static-privatename-identifier.js
@@ -0,0 +1,98 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/rs-static-privatename-identifier.case
+// - src/class-elements/productions/cls-decl-wrapped-in-sc.template
+/*---
+description: Valid Static PrivateName (fields definition wrapped in semicolons)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public]
+flags: [generated]
+info: |
+ ClassElement :
+ MethodDefinition
+ static MethodDefinition
+ FieldDefinition ;
+ static FieldDefinition ;
+ ;
+
+ FieldDefinition :
+ ClassElementName Initializer _opt
+
+ ClassElementName :
+ PropertyName
+ PrivateName
+
+ PrivateName ::
+ # IdentifierName
+
+ 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".
+
+---*/
+
+
+class C {
+ ;;;;
+ ;;;;;;static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J;;;;;;;
+ ;;;;
+ static $(value) {
+ this.#$ = value;
+ return this.#$;
+ }
+ static _(value) {
+ this.#_ = value;
+ return this.#_;
+ }
+ static \u{6F}(value) {
+ this.#\u{6F} = value;
+ return this.#\u{6F};
+ }
+ static \u2118(value) {
+ this.#\u2118 = value;
+ return this.#\u2118;
+ }
+ static ZW_\u200C_NJ(value) {
+ this.#ZW_\u200C_NJ = value;
+ return this.#ZW_\u200C_NJ;
+ }
+ static ZW_\u200D_J(value) {
+ this.#ZW_\u200D_J = value;
+ return this.#ZW_\u200D_J;
+ }
+}
+
+var c = new C();
+
+assert.sameValue(C.$(1), 1);
+assert.sameValue(C._(1), 1);
+assert.sameValue(C.\u{6F}(1), 1);
+assert.sameValue(C.\u2118(1), 1);
+assert.sameValue(C.ZW_\u200C_NJ(1), 1);
+assert.sameValue(C.ZW_\u200D_J(1), 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-static-private-fields.js b/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-static-private-fields.js
new file mode 100644
index 0000000000..2c8f938c1c
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-static-private-fields.js
@@ -0,0 +1,59 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/static-private-fields.case
+// - src/class-elements/productions/cls-decl-wrapped-in-sc.template
+/*---
+description: static private fields (fields definition wrapped in semicolons)
+esid: prod-FieldDefinition
+features: [class-static-fields-private, class, class-fields-public]
+flags: [generated]
+info: |
+ ClassElement :
+ ...
+ static FieldDefinition ;
+
+ FieldDefinition :
+ ClassElementName Initializer_opt
+
+ ClassElementName :
+ PrivateName
+
+ PrivateName :
+ # IdentifierName
+
+---*/
+
+
+class C {
+ ;;;;
+ ;;;;;;static #x; static #y;;;;;;;
+ ;;;;
+ static x() {
+ this.#x = 42;
+ return this.#x;
+ }
+ static y() {
+ this.#y = 43;
+ return this.#y;
+ }
+}
+
+var c = new C();
+
+// Test the private fields do not appear as properties before set to value
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#x"), "test 1");
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 2");
+assert(!Object.prototype.hasOwnProperty.call(c, "#x"), "test 3");
+
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#y"), "test 4");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 5");
+assert(!Object.prototype.hasOwnProperty.call(c, "#y"), "test 6");
+
+// Test if private fields can be sucessfully accessed and set to value
+assert.sameValue(C.x(), 42, "test 7");
+assert.sameValue(C.y(), 43, "test 8");
+
+// Test the private fields do not appear as properties before after set to value
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 9");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 10");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-static-private-methods-with-fields.js b/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-static-private-methods-with-fields.js
new file mode 100644
index 0000000000..366df0d7b8
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-static-private-methods-with-fields.js
@@ -0,0 +1,76 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/static-private-methods-with-fields.case
+// - src/class-elements/productions/cls-decl-wrapped-in-sc.template
+/*---
+description: static private methods with fields (fields definition wrapped in semicolons)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class-static-fields-private, class, class-fields-public]
+flags: [generated]
+info: |
+ ClassElement :
+ ...
+ static FieldDefinition ;
+
+ FieldDefinition :
+ ClassElementName Initializer_opt
+
+ ClassElementName :
+ PrivateName
+
+ PrivateName :
+ # IdentifierName
+
+---*/
+
+
+class C {
+ ;;;;
+ ;;;;;;static #xVal; static #yVal;;;;;;;
+ ;;;;
+ static #x(value) {
+ this.#xVal = value;
+ return this.#xVal;
+ }
+ static #y(value) {
+ this.#yVal = value;
+ return this.#yVal;
+ }
+ static x() {
+ return this.#x(42);
+ }
+ static y() {
+ return this.#y(43);
+ }
+}
+
+var c = new C();
+
+// Test the private methods do not appear as properties before set to value
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#x"), "test 1");
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 2");
+assert(!Object.prototype.hasOwnProperty.call(c, "#x"), "test 3");
+
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#y"), "test 4");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 5");
+assert(!Object.prototype.hasOwnProperty.call(c, "#y"), "test 6");
+
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#xVal"), "test 7");
+assert(!Object.prototype.hasOwnProperty.call(C, "#xVal"), "test 8");
+assert(!Object.prototype.hasOwnProperty.call(c, "#xVal"), "test 9");
+
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#yVal"), "test 10");
+assert(!Object.prototype.hasOwnProperty.call(C, "#yVal"), "test 11");
+assert(!Object.prototype.hasOwnProperty.call(c, "#yVal"), "test 12");
+
+// Test if private fields can be sucessfully accessed and set to value
+assert.sameValue(C.x(), 42, "test 13");
+assert.sameValue(C.y(), 43, "test 14");
+
+// Test the private fields do not appear as properties before after set to value
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 15");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 16");
+
+assert(!Object.prototype.hasOwnProperty.call(C, "#xVal"), "test 17");
+assert(!Object.prototype.hasOwnProperty.call(C, "#yVal"), "test 18");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-static-private-methods.js b/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-static-private-methods.js
new file mode 100644
index 0000000000..e2276b3a20
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-static-private-methods.js
@@ -0,0 +1,63 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/static-private-methods.case
+// - src/class-elements/productions/cls-decl-wrapped-in-sc.template
+/*---
+description: static private methods (fields definition wrapped in semicolons)
+esid: prod-FieldDefinition
+features: [class-static-methods-private, class, class-fields-public]
+flags: [generated]
+info: |
+ ClassElement :
+ ...
+ static FieldDefinition ;
+
+ FieldDefinition :
+ ClassElementName Initializer_opt
+
+ ClassElementName :
+ PrivateName
+
+ PrivateName :
+ # IdentifierName
+
+---*/
+
+
+class C {
+ ;;;;
+ ;;;;;;;;;;;;;
+ ;;;;
+ static #x(value) {
+ return value / 2;
+ }
+ static #y(value) {
+ return value * 2;
+ }
+ static x() {
+ return this.#x(84);
+ }
+ static y() {
+ return this.#y(43);
+ }
+}
+
+var c = new C();
+
+// Test the private methods do not appear as properties before set to value
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#x"), "test 1");
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 2");
+assert(!Object.prototype.hasOwnProperty.call(c, "#x"), "test 3");
+
+assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#y"), "test 4");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 5");
+assert(!Object.prototype.hasOwnProperty.call(c, "#y"), "test 6");
+
+// Test if private fields can be sucessfully accessed and set to value
+assert.sameValue(C.x(), 42, "test 7");
+assert.sameValue(C.y(), 86, "test 8");
+
+// Test the private fields do not appear as properties before after set to value
+assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 9");
+assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 10");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-string-literal-names.js b/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-string-literal-names.js
new file mode 100644
index 0000000000..adbc00ec7e
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-string-literal-names.js
@@ -0,0 +1,98 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/string-literal-names.case
+// - src/class-elements/productions/cls-decl-wrapped-in-sc.template
+/*---
+description: String literal names (fields definition wrapped in semicolons)
+esid: prod-FieldDefinition
+features: [class-fields-public, class]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ ClassElement:
+ ...
+ FieldDefinition ;
+
+ FieldDefinition:
+ ClassElementName Initializer_opt
+
+ ClassElementName:
+ PropertyName
+
+---*/
+
+
+class C {
+ ;;;;
+ ;;;;;;'a'; "b"; 'c' = 39;
+ "d" = 42;;;;;;;
+ ;;;;
+
+}
+
+var c = new C();
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "a"),
+ "a does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "a"),
+ "a does not appear as an own property on C constructor"
+);
+
+verifyProperty(c, "a", {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "b"),
+ "b does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "b"),
+ "b does not appear as an own property on C constructor"
+);
+
+verifyProperty(c, "b", {
+ value: undefined,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "c"),
+ "c does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "c"),
+ "c does not appear as an own property on C constructor"
+);
+
+verifyProperty(c, "c", {
+ value: 39,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert(
+ !Object.prototype.hasOwnProperty.call(C.prototype, "d"),
+ "d does not appear as an own property on C prototype"
+);
+assert(
+ !Object.prototype.hasOwnProperty.call(C, "d"),
+ "d does not appear as an own property on C constructor"
+);
+
+verifyProperty(c, "d", {
+ value: 42,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+reportCompare(0, 0);