feat: 支持 class extends 与 super 调用

This commit is contained in:
爱特每羊队
2026-06-09 09:51:34 +08:00
parent 85e78bd248
commit 5638638909
12 changed files with 478 additions and 32 deletions
@@ -161,6 +161,15 @@ fn object_instanceof_object() {
assert_bool!(eval("({}) instanceof Object"), true, "({}) instanceof Object");
}
#[test]
fn derived_class_instanceof_parent() {
assert_bool!(
eval("class A {} class B extends A {} let b = new B(); b instanceof A"),
true,
"derived class instanceof parent"
);
}
// -- instanceof for native types should NOT respond to their own false positives --
#[test]
fn number_not_instanceof_array() {