archives

« Bugzilla Issues Index

#3411 — 15.2.1.1 Early Errors: Incorrect restriction for ExportedBindings


15.2.1.1 Static Semantics: Early Errors

> It is a Syntax Error if any element of the ExportedBindings of ModuleItemList
> do not also occurs in either the VarDeclaredNames of ModuleItemList, the
> LexicallyDeclaredNames of ModuleItemList, or the ImportedBindings of ModuleItemList.


The restriction does not seem to be correct for:
---
export {a as b} from "mod.js";
---


fixed in rev30 editor's draft

the ImportedBindings check is unnecessary in this rule and actually ImportedBindings is unnecessary because local bindings created by imports are included in LexicallyDeclaratedNames.

export {a as b} from "mod.js" doesn't actually create any local bindings.


fixed in rev30