ecma262 icon indicating copy to clipboard operation
ecma262 copied to clipboard

Normative: make re-exporting a namespace object in 2 steps behave like 1 step

Open bakkot opened this issue 1 month ago • 3 comments

Fixes https://github.com/tc39/ecma262/issues/3710. Specifically, this makes it so that the example under "this throws" in this comment no longer throws, matching the behavior for re-exporting bindings rather than full namespaces.

I also added an explanatory comment about why we're doing this rewriting.

cc @nicolo-ribaudo @guybedford

bakkot avatar Nov 08 '25 00:11 bakkot

The rendered spec for this PR is available at https://tc39.es/ecma262/pr/3715.

github-actions[bot] avatar Nov 08 '25 00:11 github-actions[bot]

The change has been implemented in SpiderMonkey and JavaScriptCore.

It has not been implemented in V8 yet, but V8 also did not match the original behavior.

nicolo-ribaudo avatar Dec 05 '25 10:12 nicolo-ribaudo

Since this is just making an error into a non-error I think that's good enough, no need to wait for them to ship.

bakkot avatar Dec 05 '25 15:12 bakkot