feat: 支持 Infinity 常量

This commit is contained in:
爱特每羊队
2026-06-07 23:11:26 +08:00
parent 501a14b3af
commit 850f9f12ed
4 changed files with 62 additions and 0 deletions
@@ -376,3 +376,15 @@ fn compile_this_member_read_ok() {
let module = compile_source("function f() { return this.x; }");
assert!(!module.bytecode.is_empty());
}
#[test]
fn compile_infinity_ok() {
let module = compile_source("Infinity");
assert!(!module.bytecode.is_empty());
}
#[test]
fn compile_neg_infinity_ok() {
let module = compile_source("1 / -Infinity");
assert!(!module.bytecode.is_empty());
}