jerryscript
jerryscript copied to clipboard
A question about Uint8Array operation
Version
Version: 3.0.0 (fea10bb7)
Test case
var foo = function () {
let view = new Uint8Array([1,2,3]);
view[''] = 0;
print(view);
}
foo();
Execution steps
/.jsvu/jerry Testcase.js
Output
0,2,3
Expected behavior
1,2,3
Description
The correct output of the test case should be 1,2,3 while jerryscript yields 0,2,3 . we simply change the Uint8Array view by view[''] = 0 ,which shouldn't have any impact on view, but jerryscript abnormally replace the first element of view with 0 ,I think it might be an issue of jerryscript.