A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://bugzilla.mozilla.org/1775215 below:

When using a key word as a identifier report something better than 'SyntaxError: missing variable name'

Closed Bug 1775215 Opened 3 years ago Closed 4 months ago

When using a key word as a identifier report something better than 'SyntaxError: missing variable name'

When using a key word as a identifier report something better than 'SyntaxError: missing variable name'

Performance Impact Webcompat Priority Accessibility Severity Size Estimate Webcompat Score a11y-review Tracking Status firefox135 --- fixed Tracking Status relnote-firefox thunderbird_esr115 thunderbird_esr128 firefox-esr115 firefox-esr128 firefox135 firefox138 firefox139 firefox140

Reset Assignee to default

Bug Flags:

behind-pref firefox-backlog sec-bounty sec-bounty-hof in-qa-testsuite in-testsuite qe-verify

This bug is publicly visible.

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:101.0) Gecko/20100101 Firefox/101.0

Steps to reproduce:

run the program:
var else;

Actual results:

SyntaxError:missing variable name

Expected results:

SyntaxError:Cannot use the keyword 'else' as a variable name.(JSC)
SyntaxError:Unexpected token 'else'.(V8)

It is obvious that the error is wrong variable name rather than missing variable name when i use a key word as a identifier.
It also has the same problem when i use 'arguments','break','case','catch','class',

'const','continue','debugger','default','delete','do','else','enum','export','extends','false','finally','for','function','if','import','in','instanceof','new','null','return','super','switch','this','throw','true','try','typeof','var','void','while','with'.

Component: Untriaged → JavaScript Engine

Product: Firefox → Core

Version: Firefox 101 → Firefox 100

This would certainly be a nice improvement.

Severity: -- → N/A

Type: defect → enhancement

Priority: -- → P3

Summary: When use a key word as a identifier,it report 'SyntaxError:missing variable name' → When using a key word as a identifier report something better than 'SyntaxError: missing variable name'

Assignee: nobody → abdoatef.ab

Status: UNCONFIRMED → ASSIGNED

Ever confirmed: true

Attachment #9444560

- Attachment description: Bug 1775215 - Add better error reporting when using keyword as identifier. r=dminor → Bug 1775215 - Add token kind description to missing variable error message. r=dminor


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.3