Closed
Bug 1102005
Opened 10 years ago
Closed 10 years ago
String.raw is missing step 14j in ES6 §21.1.2.4
Categories
(Firefox :: Untriaged, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: ljharb, Unassigned)
References
Details
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/600.1.25 (KHTML, like Gecko) Version/8.0 Safari/600.1.25
Steps to reproduce:
In Firefox 34 beta, run `String.raw({ raw: ['The total is $', ' ($', ' with tax)'] }, 10)`.
Note that there are 3 segments (thus 2 opportunities for substitution), but only 1 substitution. According to https://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.raw step 14.j. ("ReturnIfAbrupt(nextSub).") processing of the callSite.raw array-like object should be interrupted.
Actual results:
Actual output is "The total is $10 ($ with tax)".
Expected results:
Expected output is "The total is $10 (".
Sorry, I misread the spec - Firefox is correct here. I'll fix the es6-shim.
Status: UNCONFIRMED → RESOLVED
Closed: 10 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•