[Webkit-unassigned] [Bug 243645] New: Wrong error location with 'switch(value/'

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Aug 7 20:04:18 PDT 2022


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

            Bug ID: 243645
           Summary: Wrong error location with 'switch(value/'
           Product: WebKit
           Version: Safari 15
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: 845043157 at qq.com

run the program:
switch(value/{
   case 1:
   print(1);
}

Actual results:
SyntaxError:Unexpected number '1'.Exceptd a ':' following the property name 'case'.

Expected results:
Excepted ')' to end a subject of a 'switch'

The error message told me 'case 1' is wrong while the truth is that I mistakenly entered ‘switch(value)’ as ‘switch(value/’.

It makes it difficult for me to correct this error.I think the error location should in 'switch(value/' rather than 'case 1:' and it should tell me excepted ')' rather than excepted a ':'.

-- 
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/20220808/4f35c144/attachment-0001.htm>


More information about the webkit-unassigned mailing list