Modules and eval

# Erik Arvidsson (14 years ago)

harmony:modules, harmony:module_loaders

The loader says that eval and evalLoad uses Program which allows export and import. What does it mean to import and export something within eval code?

Take this small program. Does this fail or not?

module m { export function addExport(name) { eval('export var ' + name + ' = ' name) } var x = 42 }

m.addExport('x') assert(m.x === 42)

# David Herman (14 years ago)

That sounds like a grammar bug -- no time to debug at the moment but I'll address. A Program should be able to import but not export.