Debian Codegraph @

js/src/tests/test262/language/expressions/import.meta/syntax/invalid-assignment-target-object-destructuring-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.5.1 Static Semantics: Early Errors
18
19 DestructuringAssignmentTarget : LeftHandSideExpression
20
21 It is a Syntax Error if LeftHandSideExpression is neither an ObjectLiteral nor an ArrayLiteral
22 and AssignmentTargetType(LeftHandSideExpression) is not simple.
23 flags: [module]
24 negative:
25 phase: parse
26 type: SyntaxError
27 features: [import.meta, destructuring-assignment]
28 ---*/
29
30 $DONOTEVALUATE();
31
32 ({a: import.meta} = {});