Bug 243645
| Summary: | Wrong error location with 'switch(value/' | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | 845043157 |
| Component: | JavaScriptCore | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Normal | CC: | saam, webkit-bug-importer, ysuzuki |
| Priority: | P2 | Keywords: | InRadar |
| Version: | Safari 15 | ||
| Hardware: | PC | ||
| OS: | Linux | ||
845043157
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 ':'.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/98651685>