Debian Codegraph @

js/src/tests/test262/language/expressions/dynamic-import/assignment-expression/lhs-eq-assign-expr-nostrict.js

raw
1 // |reftest| async
2 // Copyright (C) 2018 Leo Balter. All rights reserved.
3 // This code is governed by the BSD license found in the LICENSE file.
4 /*---
5 description: >
6 Dynamic Import receives an AssignmentExpression (LHS Expr = AssignmentExpression)
7 Using a frozen object property
8 esid: prod-ImportCall
9 info: |
10 ImportCall [Yield]:
11 import ( AssignmentExpression[+In, ?Yield] )
12
13 AssignmentExpression[In, Yield, Await]:
14 ConditionalExpression[?In, ?Yield, ?Await]
15 [+Yield]YieldExpression[?In, ?Await]
16 ArrowFunction[?In, ?Yield, ?Await]
17 AsyncArrowFunction[?In, ?Yield, ?Await]
18 LeftHandSideExpression[?Yield, ?Await] = AssignmentExpression[?In, ?Yield, ?Await]
19 LeftHandSideExpression[?Yield, ?Await] AssignmentOperator AssignmentExpression[?In, ?Yield, ?Await]
20 flags: [async, noStrict]
21 features: [dynamic-import]
22 includes: [asyncHelpers.js]
23 ---*/
24
25 const y = {
26 z: 0
27 };
28 Object.freeze(y);
29 const b = './module-code-other_FIXTURE.js';
30
31 async function fn() {
32 const ns2 = await import(y.z = b); // import('./module-code-other_FIXTURE.js')
33
34 assert.sameValue(ns2.local1, 'one six one two');
35 assert.sameValue(ns2.default, 1612);
36 }
37
38 asyncTest(fn);