archives

« Bugzilla Issues Index

#3094 — export default FunctionExpression should work


The plan was for `export default function f() {}` to introduce a FunctionDeclaration that hoists. However, the proposed grammar was to use FunctionDeclaraion but that prevents someone from using an FunctionExpression (a function without name). We need to special case the grammar to use FunctionExpression and then if the function has a name "reparse" the expression as a FunctionDeclaration.

Same goes for ClassDeclaration and ClassExpression.


fixed in rev28 editor's draft


fixed in rev28