Incorrect results for [[Get]] and [[HasProperty]] with Typed Array in prototype
See original GitHub issueThere was previously an inconsistency between [[Get]]/[[Set]] and [[HasProperty]] as noted in https://github.com/tc39/ecma262/issues/347. However, we did not comply with the old semantics either (our [[HasProperty]] seemed to be guarded on the receiver as well). The new semantics remove all the receiver checks.
var o = {__proto__: new Int32Array(100)};
Object.prototype[1.3] = 100;
print(o[1.3]);
print(Reflect.has(o, '1.3'));
Expected: undefined/false (same as v8) Actual: 100/true (same as sm)
Issue Analytics
- State:
- Created 8 years ago
- Comments:13 (13 by maintainers)
Top Results From Across the Web
Incorrect results for [[Get]] and [[HasProperty]] with Typed Array in ...
Investigating and trying to understand the issue and solution. I hope to have this completed today. All reactions.
Read more >How to define method in javascript on Array.prototype and ...
defineProperty(Array.prototype, "find", { enumerable: false, writable: true, ... It's because have to check for hasOwnProperty :
Read more >Object.prototype.hasOwnProperty() - JavaScript | MDN
The hasOwnProperty() method returns a boolean indicating whether the ... that has a property with this name may return incorrect results:.
Read more >The 10 Most Common JavaScript Issues Developers Face
JavaScript Issue #1: Incorrect References to this. There's no shortage of confusion among ... Executing the above code results in the following error:...
Read more >Lodash Documentation
The values false , null , 0 , "" , undefined , and NaN are falsey. ... Gets the index at which the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@bterlson @ianwjhalliday - ignore previous comment. A closer look showed that we were mistaken (cc @curtisman @Yongqu).
Fix in progress.
The original bug’s expected behavior is indeed what is expected.