Fix is_constructor of bound function (#3684)

Bound function created from built-in function does not have a constructor

JerryScript-DCO-1.0-Signed-off-by: Rafal Walczyna r.walczyna@samsung.com
This commit is contained in:
Rafal Walczyna
2020-04-21 11:58:29 +02:00
committed by GitHub
parent 52f1476061
commit 0269b6c25d
2 changed files with 18 additions and 2 deletions
+6
View File
@@ -64,6 +64,12 @@ assert(hits === 1);
assert(array6.length === 2);
assert(array6[1] === 2);
// Test with bounded builtin function
var boundedBuiltinFn = Array.of.bind(Array);
var array7 = Array.of.call(boundedBuiltinFn, boundedBuiltinFn);
assert(array7.length === 1);
assert(array7[0] === boundedBuiltinFn);
// Test superficial features
var desc = Object.getOwnPropertyDescriptor(Array, "of");
assert(desc.configurable === true);