[Webkit-unassigned] [Bug 205577] New: Wrong realization of eval()

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Dec 24 00:18:45 PST 2019


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

            Bug ID: 205577
           Summary: Wrong realization of eval()
           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

What steps will reproduce the problem?
1.Running following code:
let temp = eval('42;switch (0) { case 0: break; };');
console.log(temp);


What is the expected output?
42

What do you see instead?
undefined


According to ecma manual,https://tc39.es/ecma262/#sec-block-runtime-semantics-evaluation, the value of a StatementList is the value of the last value producing item in the StatementList. However, switch statement not produce value, so the result should be 42.

ISec Lab
2019.12.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/20191224/3ec51499/attachment.htm>


More information about the webkit-unassigned mailing list