Skip to content
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

Closed
wants to merge 1 commit into from

Commits on Nov 23, 2022

  1. Fix built-ins/Array/prototype/toString/non-callable-join-string-tag.j…

    …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
    akavi committed Nov 23, 2022
    Configuration menu
    Copy the full SHA
    50bccd9 View commit details
    Browse the repository at this point in the history