Given a situation like this...
var foo;
foo = (function () {
return function foo () {
return 42;
};
})();
export { foo };
...we end up with this, which is a syntax error:
exports.foo = (function () {
return function exports.foo () {
return 42;
};
})();
The offending line is here. I suspect the answer is to be smarter about creating new scopes, i.e. doing it at the BlockStatement level rather than the FunctionDeclaration/FunctionExpression level.
Given a situation like this...
...we end up with this, which is a syntax error:
The offending line is here. I suspect the answer is to be smarter about creating new scopes, i.e. doing it at the
BlockStatementlevel rather than theFunctionDeclaration/FunctionExpressionlevel.