Summary: | for-await-of has bad error message if used in non-async function | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Joseph Pecoraro <joepeck> | ||||||
Component: | JavaScriptCore | Assignee: | Joseph Pecoraro <joepeck> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | commit-queue, ews-watchlist, joepeck, keith_miller, mark.lam, msaboff, ross.kirsling, saam, tzagallo, webkit-bug-importer, ysuzuki | ||||||
Priority: | P2 | Keywords: | InRadar | ||||||
Version: | WebKit Nightly Build | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Created attachment 376354 [details]
[PATCH] Proposed Fix
Created attachment 376355 [details]
[PATCH] Proposed Fix
Comment on attachment 376355 [details]
[PATCH] Proposed Fix
Looks good as long as no tests are counting on this output.
Comment on attachment 376355 [details] [PATCH] Proposed Fix Clearing flags on attachment: 376355 Committed r248711: <https://trac.webkit.org/changeset/248711> All reviewed patches have been landed. Closing bug. |
for-await-of has bad error message if used in non-async function ---- >>> function f() { for await (let x of []) {} } } for-await-of can't be used only in async function or async generator..:1 ---- It should say that it can only be used an async function or async generator.