archives

« Bugzilla Issues Index

#4158 — 21.2.5.8 RegExp.prototype[@@replace], step 16.l.ii: Type(capN) is Completion, and never Undefined


21.2.5.8 RegExp.prototype[@@replace]
Step 16.l.ii.

It is tested whether Type(capN) is Undefined. But at this point, Type(capN) is always Completion.

Substeps of step 16.l should be:

i. Let capN be Get(result, ToString(n)).
ii. ReturnIfAbrupt(capN).
iii. If capN is not undefined, then
1. Let capN be ToString(capN).
2. ReturnIfAbrupt(capN).
iv. etc.


fixed in rev36 editor's draft


in rev36