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

15.3.4.5-15-5.js does not appear to make sense #957

Closed
JosephPecoraro opened this issue Apr 10, 2017 · 0 comments
Closed

15.3.4.5-15-5.js does not appear to make sense #957

JosephPecoraro opened this issue Apr 10, 2017 · 0 comments

Comments

@JosephPecoraro
Copy link
Contributor

JosephPecoraro commented Apr 10, 2017

Test: test/built-ins/Function/prototype/bind/15.3.4.5-15-5.js

The test at a78650fde is currently:

/*---
es5id: 15.3.4.5-15-5
description: >
    Function.prototype.bind - The [[Configurable]] attribute of length
    property in F set as false
---*/

        var canConfigurable = false;
        var hasProperty = false;
        function foo() { }
        var obj = foo.bind({});
        hasProperty = obj.hasOwnProperty("length");
        delete obj.caller;
        canConfigurable = !obj.hasOwnProperty("length");

assert(hasProperty, 'hasProperty !== true');
assert.sameValue(canConfigurable, false, 'canConfigurable');

There are a number of pieces that don't seem to make sense:

  1. The comment says [[Configurable]] should be false. The spec says [[Configurable]] should be true:
    https://tc39.github.io/ecma262/#sec-function.prototype.bind

    1. Perform ! DefinePropertyOrThrow(F, "length", PropertyDescriptor {[[Value]]: L, [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: true}).
  2. The test is performing delete obj.caller, and not doing anything with the length property. Is caller somehow related to length? I suspect this should be delete obj.length.

JosephPecoraro added a commit to JosephPecoraro/test262 that referenced this issue Apr 10, 2017
The `length` property should be [[Configurable]]
https://tc39.github.io/ecma262/#sec-function.prototype.bind

Also the test was testing deleting the wrong property.

Fixes tc39#957.
leobalter pushed a commit that referenced this issue Apr 11, 2017
The `length` property should be [[Configurable]]
https://tc39.github.io/ecma262/#sec-function.prototype.bind

Also the test was testing deleting the wrong property.

Fixes #957.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant