fix: bind_constructor 宏补 length 描述符 meta

This commit is contained in:
2026-09-23 15:27:47 +00:00
parent 1cf304bb0d
commit a18a6323e6
12 changed files with 99 additions and 4 deletions
@@ -356,3 +356,16 @@ fn symbol_proto_direct_description_access_throws_type_error() {
.unwrap();
assert!(result.as_bool());
}
#[test]
fn symbol_length_descriptor() {
// Symbol.length = 0,描述符 { writable:false, enumerable:false, configurable:true }。
let mut vm = Vm::new();
let r = eval(
&mut vm,
"var d = Object.getOwnPropertyDescriptor(Symbol, 'length'); \
d.value === 0 && d.writable === false && d.enumerable === false && d.configurable === true",
)
.unwrap();
assert!(r.as_bool());
}