RESOLVED CONFIGURATION CHANGED271240
Parameter of async function is undefined if it reassigned later
https://bugs.webkit.org/show_bug.cgi?id=271240
Summary Parameter of async function is undefined if it reassigned later
csongor.szilagyi
Reported 2024-03-19 07:49:54 PDT
Created attachment 470434 [details] 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
Attachments
A short html snippet to reproduce the issue (289 bytes, text/html)
2024-03-19 07:49 PDT, csongor.szilagyi
no flags
Karl Dubost
Comment 1 2024-03-21 19:49:42 PDT
I get the same output in the 3 browsers [Log] 0 (attachment.cgi, line 6) [Log] 1 (attachment.cgi, line 8) [Log] 0 (attachment.cgi, line 11) With 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
Radar WebKit Bug Importer
Comment 2 2024-03-26 07:50:13 PDT
csongor.szilagyi
Comment 3 2024-03-31 04:41:53 PDT
I can confirm that it works in Technology Preview 190. Looking forward to be included in the main build too.
Karl Dubost
Comment 4 2024-04-01 04:21:43 PDT
Thanks!
Note You need to log in before you can comment on or make changes to this bug.