Bug 187957

Summary: Different output compared with other JS engines when function name is same to variable name
Product: WebKit Reporter: sunlili
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Normal CC: fpizlo, ysuzuki
Priority: P2    
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   

sunlili
Reported 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
Attachments
Note You need to log in before you can comment on or make changes to this bug.