Bug 188930

Summary: JSC should evaluate scoped function block after an eval statement
Product: WebKit Reporter: Sotero Jr <srsj2>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Normal CC: fpizlo, ysuzuki
Priority: P2    
Version: Safari 11   
Hardware: Unspecified   
OS: iOS 10.3   

Sotero Jr
Reported 2018-08-24 13:47:39 PDT
Hi everyone, I found out an inconsistency if we try to evaluate a scoped function block after an eval statement. If I remove the first line (eval line), JSC works as expected. Version: 235318 O.S: MacOS High Sierra Version 10.13.6 step to reproduce: eval("if (false) function _f() {} else function f() { return 1; }"); { function f() { return 2; } } print(f()) atual result: 1 expected result: 2 V8, Chakra and SpiderMonkey works as expected cinfuzz
Attachments
Note You need to log in before you can comment on or make changes to this bug.