Bug 1892041 - Part 2: Update test262. r=spidermonkey-reviewers,dminor
[gecko.git] / js / src / tests / test262 / language / module-code / privatename-not-valid-earlyerr-module-3.js
blob7cb12cc797f1e35de47531e0969cb6b57a8e2c31
1 // |reftest| error:SyntaxError module
2 // Copyright (C) 2017 Valerie Young. All rights reserved.
3 // This code is governed by the BSD license found in the LICENSE file.
4 /*---
5 esid: sec-module-semantics-static-semantics-early-errors
6 description: Early error when referencing privatename in field without being declared in class fields
7 info: |
8   Static Semantics: Early Errors
9   Module : ModuleBody
10     It is a Syntax Error if AllPrivateNamesValid of ModuleBody with an empty List as an argument is false.
11 features: [class, class-fields-private, class-fields-public]
12 flags: [module]
13 negative:
14   phase: parse
15   type: SyntaxError
16 ---*/
18 $DONOTEVALUATE();
20 class C {
21   y = this.#x;