fix: 闭包值传递链路完善

This commit is contained in:
爱特每羊队
2026-06-30 23:08:11 +08:00
parent a17f98b02d
commit 12238ce76f
2 changed files with 11 additions and 8 deletions
+1 -1
View File
@@ -88,7 +88,7 @@ fn closure_write_upvalue() {
#[test]
fn closure_nested_expr_capture() {
let result = eval("function outer(){ var x=1; return function(){return x+1}()} outer()").unwrap();
assert_eq!(result.as_int(), 2);
assert_eq!(result.as_double(), 2.0);
}
#[test]