Debian Codegraph @

js/src/tests/test262/language/module-code/privatename-not-valid-earlyerr-module-8.js

raw
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 on object, outside of class.
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-fields-private]
12 flags: [module]
13 negative:
14 phase: parse
15 type: SyntaxError
16 ---*/
17
18 $DONOTEVALUATE();
19
20 function f() {
21 this.#x;
22 }