tc39 / proposal-async-iteration

Asynchronous iteration for JavaScript
https://tc39.github.io/proposal-async-iteration/
MIT License
859 stars 44 forks source link

One more modified function: FunctionAllocate #124

Closed spectranaut closed 6 years ago

spectranaut commented 6 years ago

Hi @domenic,

In AsyncGeneratorFunction line 3:

3. Return ? CreateDynamicFunction(C, NewTarget, "async generator", args). 

FunctionAllocate is called with parameter functionKind = "async generator". FunctionAllocate needs one small modification (this function is currently not in the spec proposal):

2. Assert: functionKind is either "normal", "non-constructor", "generator", "async", or "async generator".
domenic commented 6 years ago

Thanks for the find! Probably best to note this in https://github.com/tc39/ecma262/pull/1066 as that's where the normative text for this has been moved to.

bterlson commented 6 years ago

I made this change in tc39/ecma262#1066. I'll go ahead and close this now. Thank you @spectranaut!