Debian Codegraph @

js/src/tests/test262/language/expressions/function/early-errors/invalid-names-member-expression-this.js

raw
1 // |reftest| error:SyntaxError
2 // This file was procedurally generated from the following sources:
3 // - src/invalid-private-names/member-expression-this.case
4 // - src/invalid-private-names/default/function-expr.template
5 /*---
6 description: this reference in member expression (Invalid private names should throw a SyntaxError, inside function expression)
7 esid: sec-static-semantics-early-errors
8 features: [class-fields-private]
9 flags: [generated]
10 negative:
11 phase: parse
12 type: SyntaxError
13 info: |
14 ScriptBody:StatementList
15 It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
16 as an argument is false unless the source code is eval code that is being
17 processed by a direct eval.
18
19 ModuleBody:ModuleItemList
20 It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
21 as an argument is false.
22
23
24 Static Semantics: AllPrivateNamesValid
25
26 MemberExpression : MemberExpression . PrivateName
27
28 1. If StringValue of PrivateName is in names, return true.
29 2. Return false.
30
31 CallExpression : CallExpression . PrivateName
32
33 1. If StringValue of PrivateName is in names, return true.
34 2. Return false.
35
36 ---*/
37
38
39 $DONOTEVALUATE();
40
41 var fn = function() { this.#x };