[Webkit-unassigned] [Bug 187957] New: Different output compared with other JS engines when function name is same to variable name

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jul 24 06:48:46 PDT 2018


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

            Bug ID: 187957
           Summary: Different output compared with other JS engines when
                    function name is same to variable name
           Product: WebKit
           Version: WebKit Local Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: sunlili at ict.ac.cn

Hello,
    Running following js code:
------------------------
function test() {
    x = 4;
    do {
        var ss = 100;
        function ss() {
            print("in func");
        }
        x--;
        ss = 101; 
    } while(x>0)
}

test();
print("BT_FLAG")
------------------------
Output of V8 and Firefoz:
 SyntaxError: Identifier 'ss' has already been declared

However, output of jsc:
BT_FLAG

BT group
2018.7.24

-- 
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/20180724/cf73ee12/attachment.html>


More information about the webkit-unassigned mailing list