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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Mar 21 12:02:05 PDT 2022


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

            Bug ID: 238149
           Summary: Variable in top level block scope is incorrectly
                    captured
           Product: WebKit
           Version: Safari 15
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: neildhar at fb.com

For the following snippet placed at the top level:

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


JSC prints "banana", instead of "bar".

-- 
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/20220321/5206d8de/attachment.htm>


More information about the webkit-unassigned mailing list