« Bugzilla Issues Index
#3094 — export default FunctionExpression should work
- bug_id:
3094
- creation_ts:
2014-07-31 11:20:00 -0700
- short_desc:
export default FunctionExpression should work
- delta_ts:
2015-07-10 08:34:19 -0700
- product:
Draft for 6th Edition
- component:
Modules
- version:
Rev 26: July 18, 2014 Draft
- rep_platform:
All
- op_sys:
All
- bug_status:
RESOLVED
- resolution:
FIXED
- priority:
Normal
- bug_severity:
normal
- everconfirmed:
true
- reporter:
Erik Arvidsson
- assigned_to:
Allen Wirfs-Brock
- cc:
["dherman", "erik.arvidsson", "jorendorff", "samth"]
- commentid:
9650
- comment_count:
0
- who:
Erik Arvidsson
- bug_when:
2014-07-31 11:20:54 -0700
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.
- commentid:
10213
- comment_count:
1
- who:
Allen Wirfs-Brock
- bug_when:
2014-09-19 11:11:53 -0700
fixed in rev28 editor's draft
- commentid:
10393
- comment_count:
2
- who:
Allen Wirfs-Brock
- bug_when:
2014-10-14 15:17:46 -0700
fixed in rev28