2 // Copyright (C) 2018 Valerie Young. All rights reserved.
3 // This code is governed by the BSD license found in the LICENSE file.
6 Default exports are included in an imported module namespace object when module exported with `* as namespace`
7 esid: sec-moduledeclarationinstantiation
10 4. Let result be InnerModuleInstantiation(module, stack, 0).
13 InnerModuleInstantiation( module, stack, index )
15 10. Perform ? ModuleDeclarationEnvironmentSetup(module).
18 ModuleDeclarationEnvironmentSetup( module )
20 c. If in.[[ImportName]] is "*", then
23 i. Let resolution be ? importedModule.ResolveExport(in.[[ImportName]], « »).
24 ii. If resolution is null or "ambiguous", throw a SyntaxError exception.
25 iii. If resolution.[[BindingName]] is "*namespace*", then
26 1. Let namespace be ? GetModuleNamespace(resolution.[[Module]]).
29 15.2.1.18 Runtime Semantics: GetModuleNamespace
32 3. If namespace is undefined, then
33 a. Let exportedNames be ? module.GetExportedNames(« »).
36 15.2.1.16.2 GetExportedNames
39 7. For each ExportEntry Record e in module.[[StarExportEntries]], do
41 c. For each element n of starNames, do
42 i. If SameValue(n, "default") is false, then
45 features: [export-star-as-namespace-from-module]
48 import {named} from './instn-star-props-dflt-skip-star-as-named_FIXTURE.js';
49 import {production} from './instn-star-props-dflt-skip-star-as-prod_FIXTURE.js';
51 assert('namedOther' in named);
53 'default' in named, true, 'default specified via identifier'
56 assert('productionOther' in production);
58 'default' in production, true, 'default specified via dedicated production'