jerryscript
jerryscript copied to clipboard
The ecma_get_property_list doesn't handle the String index properties
According to the standard (15.5.5) the String object has an enumerable set of properties with the index names.
You can try it with the following test:
str = new String("abc");
str[5] = 'ef';
for ( c in str ) {
print(c, str[c]);
}
print(str);
Expected output:
0 a
1 b
2 c
5 ef
abc
Actual output:
5 ef
abc
This cause test262 test fail: 15.2.3/15.2.3.4/15.2.3.4-4-44.js
Works on master (f17f785b6ec0c71c2ef37e4e80a98aff1eff0963)