-
-
Notifications
You must be signed in to change notification settings - Fork 411
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Merged by Bors] - Fix built-ins/Array/prototype/toString/non-callable-join-string-tag.js test case #2458
Conversation
…s test case Fixes [built-ins/Array/prototype/toString/non-callable-join-string-tag.js](https://github.com/tc39/test262/blob/main/test/built-ins/Array/prototype/toString/non-callable-join-string-tag.js) Previously: ``` Array.prototype.toString.call(new Proxy(() => {}, {})) => "[object Object]" ``` With this change: ``` Array.prototype.toString.call(new Proxy(() => {}, {})) => "[object Function]" ``` Reasoning: 1) [23.1.3.33 Array.prototype.toString](https://tc39.es/ecma262/#sec-array.prototype.tostring): Assuming `this` does not have a callable `join` property, delegate to `Object.prototype.toString`. 2) [20.1.3.6 Object.prototype.toString](https://tc39.es/ecma262/#sec-object.prototype.tostring): if `O` has a `[[Call]]` internal method set, `builtinTag` should be "Function" 3) [10.5.14 ProxyCreate](https://tc39.es/ecma262/#sec-proxycreate): If the `target` passed isCallable, set the `[[Call]]` internal method
Codecov Report
@@ Coverage Diff @@
## main #2458 +/- ##
===========================================
+ Coverage 38.86% 51.53% +12.66%
===========================================
Files 316 335 +19
Lines 24123 35497 +11374
===========================================
+ Hits 9375 18292 +8917
- Misses 14748 17205 +2457
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Thanks for the fix!
Test262 conformance changes
Fixed tests (10):
|
bors r+ |
…s test case (#2458) This Pull Request fixes [built-ins/Array/prototype/toString/non-callable-join-string-tag.js](https://github.com/tc39/test262/blob/main/test/built-ins/Array/prototype/toString/non-callable-join-string-tag.js) Previously: ``` Array.prototype.toString.call(new Proxy(() => {}, {})) => "[object Object]" ``` With this change: ``` Array.prototype.toString.call(new Proxy(() => {}, {})) => "[object Function]" ``` Reasoning: 1) [23.1.3.33 Array.prototype.toString](https://tc39.es/ecma262/#sec-array.prototype.tostring): Assuming `this` does not have a callable `join` property, delegate to `Object.prototype.toString`. 2) [20.1.3.6 Object.prototype.toString](https://tc39.es/ecma262/#sec-object.prototype.tostring): if `O` has a `[[Call]]` internal method set, `builtinTag` should be "Function". a) This was what was not correctly done in the existing implementation 3) [10.5.14 ProxyCreate](https://tc39.es/ecma262/#sec-proxycreate): If the `target` passed isCallable, set the `[[Call]]` internal method
Pull request successfully merged into main. Build succeeded: |
This Pull Request fixes built-ins/Array/prototype/toString/non-callable-join-string-tag.js
Previously:
With this change:
Reasoning:
this
does not have a callablejoin
property, delegate toObject.prototype.toString
.O
has a[[Call]]
internal method set,builtinTag
should be "Function".a) This was what was not correctly done in the existing implementation
target
passed isCallable, set the[[Call]]
internal method