[Webkit-unassigned] [Bug 223533] Variable incorrectly hoisted when it has the same name as a parameter

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Dec 13 23:52:18 PST 2022


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

--- Comment #4 from Ross Kirsling <ross.kirsling at sony.com> ---
(In reply to Ross Kirsling from comment #3)
> This is actually even weirder than the above example suggests, as it's not
> actually the value of the var that's being printed -- the following *still*
> prints `undefined`:
> 
> ```
> async function test(foo) { print(foo); var foo = 42; }
> test('blah');
> ```

Oh wait no, that's just me forgetting that it's only the declaration itself that gets hoisted. My bad.

-- 
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/20221214/173f2aa8/attachment.htm>


More information about the webkit-unassigned mailing list