Properly handle primitive arguments in Object methods (#3342)
ES2015 allows primitive arguments for most of the Object built-ins. This change implements handling for these arguments in affected methods. 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
d006f068f4
commit
3bf2bc50bc
@@ -109,11 +109,3 @@ assert (props.indexOf(foo2) !== -1);
|
||||
assert (props.length === 2);
|
||||
assert (Object.getOwnPropertyDescriptor (object, foo).enumerable === true);
|
||||
assert (Object.getOwnPropertyDescriptor (object, foo2).enumerable === false);
|
||||
|
||||
// Test non-object argument
|
||||
try {
|
||||
Object.getOwnPropertySymbols ('hello');
|
||||
assert (false);
|
||||
} catch (e) {
|
||||
assert (e instanceof TypeError);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user