« Bugzilla Issues Index
#2732 — 14.2 Arrow Function Definitions: ArrowFormalParameters need [GeneratorParameter] like restriction
- bug_id:
2732
- creation_ts:
2014-04-24 09:03:00 -0700
- short_desc:
14.2 Arrow Function Definitions: ArrowFormalParameters need [GeneratorParameter] like restriction
- delta_ts:
2014-06-16 16:14:00 -0700
- product:
Draft for 6th Edition
- component:
technical issue
- version:
Rev 23: April 5, 2014 Draft
- rep_platform:
All
- op_sys:
All
- bug_status:
RESOLVED
- resolution:
FIXED
- priority:
Normal
- bug_severity:
normal
- everconfirmed:
true
- reporter:
André Bargull
- assigned_to:
Allen Wirfs-Brock
- commentid:
7909
- comment_count:
0
- who:
André Bargull
- bug_when:
2014-04-24 09:03:54 -0700
14.2 Arrow Function Definitions
---
ArrowFormalParameters[Yield] : ( StrictFormalParameters[?Yield] )
---
Following the production rules StrictFormalParameters -> FormalParameters -> FormalParameterList -> FormalsList -> FormalParameter -> BindingElement -> SingleNameBinding, you'll end up at SingleNameBinding:
---
SingleNameBinding[Yield,GeneratorParameter] :
[+GeneratorParameter] BindingIdentifier[Yield] Initializer[In]opt
[~GeneratorParameter] BindingIdentifier[?Yield] Initializer[In, ?Yield]opt
---
Without the [GeneratorParameter] production parameter, but with [Yield] being present, Initializer -> AssignmentExpression -> YieldExpression can be parsed...
test case:
---
function*g() {
(a = yield) => {}
}
---
- commentid:
8571
- comment_count:
1
- who:
Allen Wirfs-Brock
- bug_when:
2014-05-19 20:24:06 -0700
fixed in rev25 editor's draft
- commentid:
9015
- comment_count:
2
- who:
Allen Wirfs-Brock
- bug_when:
2014-06-16 16:14:00 -0700
fixed in rev25 editor's draft