Bug 187957 - Different output compared with other JS engines when function name is same to variable name
Summary: Different output compared with other JS engines when function name is same to...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-07-24 06:48 PDT by sunlili
Modified: 2018-07-24 15:14 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description sunlili 2018-07-24 06:48:46 PDT
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