Fix bound function length

JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
This commit is contained in:
Dániel Bátyai
2015-08-07 13:07:34 +02:00
parent 640370da43
commit 58851bc7cc
2 changed files with 42 additions and 3 deletions
+12
View File
@@ -126,3 +126,15 @@ try {
} catch (e) {
assert (e instanceof TypeError);
}
var foo = function(x, y) { }
var bound = foo.bind(null);
assert(bound.length === 2);
bound = foo.bind(null, 9);
assert(bound.length === 1);
bound = foo.bind(null, 9, 8);
assert(bound.length === 0);