-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
In ParseModule we have some logic to make sure that import { foo } from "mod"; export { foo } is equivalent to export { foo } from "mod"
See Table 59 for how export { foo } from "mod" is represented: ExportEntry Record { [[ExportName]]: "foo", [[ModuleRequest]]: "mod", [[ImportName]]: "foo", [[LocalName]]: null }. Step 10.a.ii.3 makes sure that we build the same ExportEntry Record for import { foo } from "mod"; export { foo }.
For some reason, we are not doing the same in step 10.a.ii.2, which handles import * as foo from "mod"; export { foo }. export * as foo from "mod" is represented as ExportEntry Record { [[ExportName]]: "foo", [[ModuleRequest]]: "mod", [[ImportName]]: ~all~, [[LocalName]]: null }, but in the import+export case we'll keep it as ExportEntry Record { [[ExportName]]: "foo", [[ModuleRequest]]: null, [[ImportName]]: null, [[LocalName]]: "foo" }, as if we were exporting a local binding.
I am not sure yet whether this has any observable consequence or not. export * as ns from "mod" was introduced after ES6 (in #1174, by @spectranaut), and it seems like this was never brought up.
I'm manly opening this issue as a reminder for myself to check if it matters or not.