[Webkit-unassigned] [Bug 271241] New: Async function parameter destructuring results in "Right side of assignment cannot be destructured"
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Mar 19 07:56:24 PDT 2024
https://bugs.webkit.org/show_bug.cgi?id=271241
Bug ID: 271241
Summary: Async function parameter destructuring results in
"Right side of assignment cannot be destructured"
Product: WebKit
Version: Safari 17
Hardware: Mac (Apple Silicon)
OS: macOS 14
Status: NEW
Severity: Normal
Priority: P2
Component: JavaScriptCore
Assignee: webkit-unassigned at lists.webkit.org
Reporter: csongor.szilagyi at appfire.com
Created attachment 470435
--> https://bugs.webkit.org/attachment.cgi?id=470435&action=review
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
--
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/20240319/4852a404/attachment.htm>
More information about the webkit-unassigned
mailing list