Closed pvginkel closed 9 years ago
It looks like [[Put]] is implemented wrong. It seems that the following should allow the array item to be changed:
[[Put]]
Object.defineProperty(Array.prototype, "0", { value: 100, writable: false, configurable: true }); oldArr = []; oldArr[0] = 102;
At least this works in Chrome and Internet Explorer (i.e. oldArr[0] returns 102). However I cannot find where in the specs this is allowed.
oldArr[0]
put currently has a special case that checks for putting an index into an array and skips the can_put check if this is the case.
put
can_put
I can't reproduce this issue. The special case has been removed and all tests pass.
It looks like
[[Put]]
is implemented wrong. It seems that the following should allow the array item to be changed:At least this works in Chrome and Internet Explorer (i.e.
oldArr[0]
returns 102). However I cannot find where in the specs this is allowed.put
currently has a special case that checks for putting an index into an array and skips thecan_put
check if this is the case.