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:
Szilagyi Adam
2020-05-04 15:08:14 +02:00
committed by GitHub
parent 8ccb95c31c
commit 409e1fec5f
2 changed files with 7 additions and 0 deletions
@@ -235,6 +235,7 @@ ecma_builtin_string_object_raw (ecma_value_t this_arg, /**< 'this' argument */
/* 12.f-g */
if (next_index >= number_of_substitutions)
{
next_index++;
continue;
}
+6
View File
@@ -56,3 +56,9 @@ let str = String.raw({
assert(str === "foo5barJavaScriptbaz");
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");