[Webkit-unassigned] [Bug 185156] New: JavaScriptCore should throw SyntaxError when a variable is already declared inside the "with" scope

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Apr 30 20:07:27 PDT 2018


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

            Bug ID: 185156
           Summary: JavaScriptCore should throw SyntaxError when a
                    variable is already declared inside the "with" scope
           Product: WebKit
           Version: Safari 11
          Hardware: Unspecified
                OS: Linux
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: baac at cin.ufpe.br

Hi,

there is an inconsistency when a variable is declared twice as "var" and "let" inside the "with" scope. JavaScriptCore should not accept the redeclaration and indicate an error.

OS: Ubuntu 17.10
JavaScriptCore: 606.1.9.4

Step to reproduce:

with({}) {
   var a;
   let a;
}

Actual result:
Pass without failures

Expected result:
SyntaxError: Cannot declare a variable twice

V8 and SpiderMonkey raises an exception as expected.

-- 
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/20180501/8bfc6a77/attachment-0001.html>


More information about the webkit-unassigned mailing list