Add missing index incrementation to ecma_builtin_string_object_raw (#3709)
JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi aszilagy@inf.u-szeged.hu
This commit is contained in:
@@ -235,6 +235,7 @@ ecma_builtin_string_object_raw (ecma_value_t this_arg, /**< 'this' argument */
|
|||||||
/* 12.f-g */
|
/* 12.f-g */
|
||||||
if (next_index >= number_of_substitutions)
|
if (next_index >= number_of_substitutions)
|
||||||
{
|
{
|
||||||
|
next_index++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -56,3 +56,9 @@ let str = String.raw({
|
|||||||
assert(str === "foo5barJavaScriptbaz");
|
assert(str === "foo5barJavaScriptbaz");
|
||||||
|
|
||||||
assert(String.raw({ raw: 'test' }, 0, 1, 2) === "t0e1s2t");
|
assert(String.raw({ raw: 'test' }, 0, 1, 2) === "t0e1s2t");
|
||||||
|
|
||||||
|
var get = [];
|
||||||
|
var raw = new Proxy({length: 2, 0: '', 1: ''}, { get: function(o, k) { get.push(k); return o[k]; }});
|
||||||
|
var p = new Proxy({raw: raw}, { get: function(o, k) { get.push(k); return o[k]; }});
|
||||||
|
String.raw(p);
|
||||||
|
assert(get + '' === "raw,length,0,1");
|
||||||
|
|||||||
Reference in New Issue
Block a user