archives

« Bugzilla Issues Index

#3289 — 19.2.3.2 Function.prototype.bind: NaN and 0 which is the larger one?


> 5. Let targetHasLength be HasOwnProperty(Target, "length").
> 6. ReturnIfAbrupt(targetHasLength).
> 7. If targetHasLength is true, then
> a. Let targetLen be Get(Target, "length").
> b. ReturnIfAbrupt(targetLen).
> c. If Type(targetLen) is not Number, then let L be 0.
> d. Else,
> i. Let L be the larger of 0 and the result of targetLen minus
> the number of elements of A.
> 8. Else let L be 0.

js> function f(){}
js> delete f.length
js> delete Function.prototype.length
js> f.length = NaN
js> f.bind().length // NaN or 0?


fixed in rev29 editor's draft


fixed in rev29