instn-resolve-empty-import.js (1391B)
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: > 6 An ImportClause without an ImportsList contributes to the list of requested 7 modules 8 esid: sec-moduledeclarationinstantiation 9 info: | 10 [...] 11 8. For each String required that is an element of 12 module.[[RequestedModules]] do, 13 a. NOTE: Before instantiating a module, all of the modules it requested 14 must be available. An implementation may perform this test at any 15 time prior to this point. 16 b. Let requiredModule be ? HostResolveImportedModule(module, required). 17 c. Perform ? requiredModule.ModuleDeclarationInstantiation(). 18 19 15.2.2.5 Static Semantics: ModuleRequests 20 21 ImportDeclaration : import ImportClause FromClause; 22 23 1. Return ModuleRequests of FromClause. 24 25 15.2.3 Exports 26 27 Syntax 28 ImportClause : 29 ImportedDefaultBinding 30 NameSpaceImport 31 NamedImports 32 ImportedDefaultBinding , NameSpaceImport 33 ImportedDefaultBinding , NamedImports 34 35 NamedImports : 36 { } 37 { ImportsList } 38 { ImportsList , } 39 negative: 40 phase: resolution 41 type: SyntaxError 42 flags: [module] 43 ---*/ 44 45 $DONOTEVALUATE(); 46 47 import {} from './instn-resolve-empty-import_FIXTURE.js';