Allen Wirfs-Brock (2014-06-02T16:45:43.000Z)
On Jun 2, 2014, at 6:33 PM, Juan Ignacio Dopazo <jdopazo at yahoo-inc.com> wrote:

> Import/export declarations are designed to be static. However, eval() seems to break this invariant:
> 
> eval('import ' + foo + ' from ' + bar);
> 
> Is this valid ES6 code? Should it be valid?

No and no.  In ES6 eval parses the using the Script grammar goal symbol.  Imports are not allowed in scripts, but only in modules.

Allen


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20140602/f59dd8da/attachment.html>
domenic at domenicdenicola.com (2014-06-09T04:36:33.449Z)
No and no.  In ES6 eval parses the using the Script grammar goal symbol.  Imports are not allowed in scripts, but only in modules.