mirror of
https://github.com/pjh456/OxideJS.git
synced 2026-10-25 19:21:11 +08:00
fix: 变量声明完成值归空记录,脚本保留末非空完成值
This commit is contained in:
@@ -23,7 +23,8 @@ fn eval(source: &str) -> String {
|
||||
|
||||
#[test]
|
||||
fn eval_var_declaration() {
|
||||
assert_eq!(eval("var x = 42"), "42");
|
||||
// 变量声明语句完成值按规范为空记录(对外 undefined),不回填初始化器值。
|
||||
assert_eq!(eval("var x = 42"), "undefined");
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user