Debian Codegraph @

js/src/tests/test262/language/expressions/import.meta/syntax/invalid-assignment-target-assignment-expr.js

raw
1 // |reftest| error:SyntaxError module
2 // Copyright (C) 2018 André Bargull. All rights reserved.
3 // This code is governed by the BSD license found in the LICENSE file.
4
5 /*---
6 esid: sec-static-semantics-static-semantics-assignmenttargettype
7 description: >
8 import.meta is not a valid assignment target.
9 info: |
10 Static Semantics: AssignmentTargetType
11
12 ImportMeta:
13 import.meta
14
15 Return invalid.
16
17 12.15.1 Static Semantics: Early Errors
18
19 AssignmentExpression : LeftHandSideExpression = AssignmentExpression
20
21 It is an early Syntax Error if LeftHandSideExpression is neither an ObjectLiteral nor an
22 ArrayLiteral and AssignmentTargetType of LeftHandSideExpression is invalid or strict.
23 flags: [module]
24 negative:
25 phase: parse
26 type: SyntaxError
27 features: [import.meta]
28 ---*/
29
30 $DONOTEVALUATE();
31
32 import.meta = 0;