error-export-from-named-as.js (1681B)
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 - ambiguous 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 9. Let starResolution be null. 19 10. For each ExportEntry Record e in module.[[StarExportEntries]], do 20 a. Let importedModule be ? HostResolveImportedModule(module, 21 e.[[ModuleRequest]]). 22 b. Let resolution be ? importedModule.ResolveExport(exportName, 23 resolveSet, exportStarSet). 24 c. If resolution is "ambiguous", return "ambiguous". 25 d. If resolution is not null, then 26 i. If starResolution is null, let starResolution be resolution. 27 ii. Else, 28 1. Assert: there is more than one * import that includes the 29 requested name. 30 2. If resolution.[[Module]] and starResolution.[[Module]] are 31 not the same Module Record or 32 SameValue(resolution.[[BindingName]], 33 starResolution.[[BindingName]]) is false, return "ambiguous". 34 negative: 35 phase: resolution 36 type: SyntaxError 37 flags: [module] 38 ---*/ 39 40 $DONOTEVALUATE(); 41 42 export { x as y } from './error-export-from-named_FIXTURE.js';