How can GetModuleNamespace throw a SyntaxError?

Allen Wirfs-Brock allen at wirfs-brock.com
Fri Dec 11 23:56:15 UTC 2015


> On Dec 10, 2015, at 9:27 AM, Caridy Patiño <caridy at gmail.com> wrote:
> 
> Isiah: your example triggers a different error. ResolveExport is taking care of detecting that particular case (https://whatwg.github.io/loader/#resolve-export <https://whatwg.github.io/loader/#resolve-export>), it is also a SyntaxError :)
> 
> Jon: yes, it might be a redundant error, I will investigate more.
> 

The definition of  ModuleDeclarationInstantiation given in 15.2.1.16.4 is only applicable to Source Text Modules, but an actual module circularity might involve implementation defined modules types that possibly might not perform the equivalent check. GetModuleNamespace is an abstract operation that can be applied to any kind of  module so it must be prepared to deal with the case where a module reports that it can not  provide an unambiguous binding for a requested name.

Allen



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20151211/92fe58eb/attachment.html>


More information about the es-discuss mailing list