mirror of
https://github.com/pjh456/OxideJS.git
synced 2026-10-24 02:31:13 +08:00
fix: instanceof 检查右侧可调用性并投递原生异常
This commit is contained in:
@@ -46,7 +46,9 @@ fn test_prototypes_are_not_functions() {
|
||||
let w = make_world();
|
||||
assert!(!w.object_proto.is_function());
|
||||
assert!(!w.array_proto.is_function());
|
||||
assert!(!w.function_proto.is_function());
|
||||
// Function.prototype 是函数对象(规范规定其 IsCallable 为真),
|
||||
// 其余原型均非函数。
|
||||
assert!(w.function_proto.is_function());
|
||||
assert!(!w.string_proto.is_function());
|
||||
assert!(!w.number_proto.is_function());
|
||||
assert!(!w.boolean_proto.is_function());
|
||||
|
||||
Reference in New Issue
Block a user