[Webkit-unassigned] [Bug 238149] Variable in top level block scope is incorrectly captured

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun May 22 02:35:05 PDT 2022


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

Jarred Sumner <jarred at jarredsumner.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jarred at jarredsumner.com

--- Comment #2 from Jarred Sumner <jarred at jarredsumner.com> ---
This seems to only happen when strict mode is off.


The following code doesn't reproduce the issue in jsc shell:

"use strict";

do {
  let w = "banana";
  function foo() {
    w = "bar";
  }
  foo();
  print(w);
} while (0);

But this code does:

do {
  let w = "banana";
  function foo() {
    w = "bar";
  }
  foo();
  print(w);
} while (0);

-- 
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/20220522/02ab3170/attachment.htm>


More information about the webkit-unassigned mailing list