[Webkit-unassigned] [Bug 182414] Async arrow function with var declaration has incorrect shadowing

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri May 14 04:34:21 PDT 2021


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

Mats Åhlberg <matsaa at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |matsaa at gmail.com

--- Comment #6 from Mats Åhlberg <matsaa at gmail.com> ---
When running code through uglify-js it generates this type of code which breaks.
 var b=async (t,a,r)=> {
 console.log(a);
   var a = a;
   console.log(t);
   console.log(a);
   console.log(r);
   return { t, a, r };
  };
  b(1, 2, 3);

replacing the var a = 1; with a=a works.
the first console log says undefined when the var is left.

the code works in firefox and chrome. 

so is this a bug in webkit or the other browsers?

-- 
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/20210514/46846298/attachment.htm>


More information about the webkit-unassigned mailing list