Support more static expressions

This commit is contained in:
Andrew Morris
2023-07-06 21:52:08 +10:00
parent 5a72e7c3bf
commit 6615ea79d2
3 changed files with 75 additions and 3 deletions

View File

@@ -396,7 +396,7 @@ pub fn op_optional_chain(left: &mut Val, right: &Val) -> Result<Val, Val> {
};
}
fn to_i32(x: f64) -> i32 {
pub fn to_i32(x: f64) -> i32 {
if x == f64::INFINITY {
return 0;
}