[Webkit-unassigned] [Bug 217299] await expression breaks some surrounding expressions

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Feb 1 10:31:10 PST 2021


https://bugs.webkit.org/show_bug.cgi?id=217299

--- Comment #6 from Yusuke Suzuki <ysuzuki at apple.com> ---
var result = await (asyncFunction()) // results in ReferenceError: Can't find variable: await

This is correct since, inside normal function, this syntax is fine. "await" is not a keyword (it is contextual keyword). So if it is used in a normal function, then, it is possible that this is variable reference.

You can write the following.

function await() { }
var result = await(30);

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210201/99ec7039/attachment.htm>


More information about the webkit-unassigned mailing list