Debian Codegraph @

js/src/tests/test262/language/module-code/instn-iee-err-circular.js

raw
1 // |reftest| error:SyntaxError module
2 // Copyright (C) 2016 the V8 project authors. All rights reserved.
3 // This code is governed by the BSD license found in the LICENSE file.
4 /*---
5 description: IndirectExportEntries validation - circular imported bindings
6 esid: sec-moduledeclarationinstantiation
7 info: |
8 [...]
9 9. For each ExportEntry Record e in module.[[IndirectExportEntries]], do
10 a. Let resolution be ? module.ResolveExport(e.[[ExportName]], « », « »).
11 b. If resolution is null or resolution is "ambiguous", throw a
12 SyntaxError exception.
13 [...]
14
15 15.2.1.16.3 ResolveExport
16
17 [...]
18 2. For each Record {[[Module]], [[ExportName]]} r in resolveSet, do:
19 a. If module and r.[[Module]] are the same Module Record and
20 SameValue(exportName, r.[[ExportName]]) is true, then
21 i. Assert: this is a circular import request.
22 ii. Return null.
23 negative:
24 phase: resolution
25 type: SyntaxError
26 flags: [module]
27 ---*/
28
29 $DONOTEVALUATE();
30
31 export { x } from './instn-iee-err-circular_FIXTURE.js';