Fix Reflect.getPrototypeOf for primitive arguments (#3354)
Fixes #3349. JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai@inf.u-szeged.hu
This commit is contained in:
committed by
Robert Fancsik
parent
1c6f334f62
commit
b2d34724d4
@@ -15,3 +15,17 @@
|
||||
assert (Reflect['getPrototypeOf']({}) === Object.prototype);
|
||||
assert (Reflect['getPrototypeOf'](Object.create(null)) === null);
|
||||
assert (Reflect['getPrototypeOf'](Object.prototype) === null);
|
||||
|
||||
try {
|
||||
Reflect.getPrototypeOf();
|
||||
assert (false);
|
||||
} catch (e) {
|
||||
assert (e instanceof TypeError);
|
||||
}
|
||||
|
||||
try {
|
||||
Reflect.getPrototypeOf("str");
|
||||
assert (false);
|
||||
} catch (e) {
|
||||
assert (e instanceof TypeError);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user