jerryscript-project/jerryscript

A question about Uint8Array operation

YiWen-y opened this issue · 1 comments

Version

Version: 3.0.0 (fea10bb)

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.

This bug has been silently fixed in the latest version of JerrySctript.