Closed
Bug 1263074
Opened 8 years ago
Closed 8 years ago
Change the JavaScript syntax error message for the old octal literal notation to suggest the new notation
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla48
Tracking | Status | |
---|---|---|
firefox48 | --- | fixed |
People
(Reporter: jwatt, Assigned: jwatt)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
2.37 KB,
patch
|
Waldo
:
review+
|
Details | Diff | Splinter Review |
Using the old "0" prefixed octal literal notation results in: SyntaxError: octal literals and octal escape sequences are deprecated We now have the new "0o" prefixed octal literal notation though, so this error message is somewhat misleading.
Assignee | ||
Comment 1•8 years ago
|
||
Attachment #8739303 -
Flags: review?(luke)
Comment 2•8 years ago
|
||
Comment on attachment 8739303 [details] [diff] [review] patch Forwarding to someone who I recall saying "octal" a lot a while ago...
Attachment #8739303 -
Flags: review?(luke) → review?(jwalden+bmo)
Comment 3•8 years ago
|
||
Comment on attachment 8739303 [details] [diff] [review] patch Review of attachment 8739303 [details] [diff] [review]: ----------------------------------------------------------------- Yeah, I thought about doing this when octal literals were added but decided it was a bit early to suggest it. A couple years later, this seems much safer. ::: js/src/js.msg @@ +237,5 @@ > MSG_DEF(JSMSG_DEPRECATED_DELETE_OPERAND, 0, JSEXN_SYNTAXERR, "applying the 'delete' operator to an unqualified name is deprecated") > MSG_DEF(JSMSG_DEPRECATED_EXPR_CLOSURE, 0, JSEXN_NONE, "expression closures are deprecated") > MSG_DEF(JSMSG_DEPRECATED_FLAGS_ARG, 0, JSEXN_NONE, "flags argument of String.prototype.{search,match,replace} is deprecated") > MSG_DEF(JSMSG_DEPRECATED_FOR_EACH, 0, JSEXN_NONE, "JavaScript 1.6's for-each-in loops are deprecated; consider using ES6 for-of instead") > +MSG_DEF(JSMSG_DEPRECATED_OCTAL, 0, JSEXN_SYNTAXERR, "\"0\" prefixed octal literals and octal escape sequences are deprecated; for octal literals use the \"0o\" prefix instead") "0"-prefixed, maybe? Adjectival phrase or something.
Attachment #8739303 -
Flags: review?(jwalden+bmo) → review+
Comment 5•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/2e461f39cc00
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox48:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
You need to log in
before you can comment on or make changes to this bug.
Description
•