feat: 支持基础 class 声明表达式与原型方法

This commit is contained in:
爱特每羊队
2026-06-09 08:38:21 +08:00
parent 5d1d25074e
commit 85e78bd248
13 changed files with 535 additions and 31 deletions
+2 -2
View File
@@ -128,9 +128,9 @@ fn regression_new_expression_native_constructor_error_is_catchable() {
#[test]
fn regression_new_expression_bytecode_constructor_error_is_catchable() {
assert_eq!(
eval("try { function C() {} new C(); 0 } catch (e) { 1 }"),
eval("try { class C { constructor() { throw new Error('boom') } } new C(); 0 } catch (e) { 1 }"),
"1",
"expected bytecode constructor capability error to enter catch"
"expected bytecode class constructor error to enter catch"
);
}