Skip to content

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

Description

@JosephPecoraro

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions