[Webkit-unassigned] [Bug 271240] New: Parameter of async function is undefined if it reassigned later
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Mar 19 07:49:54 PDT 2024
https://bugs.webkit.org/show_bug.cgi?id=271240
Bug ID: 271240
Summary: Parameter of async function is undefined if it
reassigned later
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 470434
--> https://bugs.webkit.org/attachment.cgi?id=470434&action=review
A short html snippet to reproduce the issue
Consider the following async function:
async function test_1(a) {
console.log(a)
var a = a === 0 ? 1 : 2;
console.log(a)
}
test_1(1);
## Expected output: 1 2
## Actual output: undefined 2
Additional note: if the parameter is not reassigned in the function, the console.log prints the correct value.
Expected output can be tested 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/feb536da/attachment-0001.htm>
More information about the webkit-unassigned
mailing list