RESOLVED WORKSFORME 271241
Async function parameter destructuring results in "Right side of assignment cannot be destructured"
https://bugs.webkit.org/show_bug.cgi?id=271241
Summary Async function parameter destructuring results in "Right side of assignment c...
csongor.szilagyi
Reported 2024-03-19 07:56:24 PDT
Created attachment 470435 [details] A short html snippet to reproduce the issue Consider the following code: async function async_test(prop1) { var {prop1, prop2} = prop1; console.log(prop1) } async_test({prop1: 'async_param', prop2: 2}); ## Expected output: "async_param" ## Actual output: Unhandled Promise Rejection: TypeError: Right side of assignment cannot be destructured Additional note: The same scenario works as expected in a non async context. Expected output can be reproduced in Chrome, Firefox, Edge
Attachments
A short html snippet to reproduce the issue (543 bytes, text/html)
2024-03-19 07:56 PDT, csongor.szilagyi
no flags
rendering in safari, firefox, chrome (410.42 KB, image/png)
2024-03-21 19:45 PDT, Karl Dubost
no flags
Karl Dubost
Comment 1 2024-03-21 19:45:01 PDT
Created attachment 470476 [details] rendering in safari, firefox, chrome tested in Safari Technology Preview 190 19619.1.5.5.2 Firefox Nightly 125.0a1 12524.3.12 Google Chrome Canary 125.0.6371.0 6371.0 Same output everywhere. [Log] async_param (attachment.cgi, line 10) [Log] regular_param (attachment.cgi, line 15)
Karl Dubost
Comment 2 2024-03-21 19:46:21 PDT
csongor, This seems to be working for me in STP 190. Do not hesitate to chime in if you think I have closed too soon.
csongor.szilagyi
Comment 3 2024-03-31 04:42:17 PDT
I can confirm that it works in Technology Preview 190. Looking forward to be included in the main build too.
Note You need to log in before you can comment on or make changes to this bug.