We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c07b788 commit 741f443Copy full SHA for 741f443
crates/luars/src/compiler/expr.rs
@@ -1637,6 +1637,14 @@ fn compile_binary_expr_to(
1637
prev_b + 1, // Increase count by 1
1638
0
1639
);
1640
+
1641
+ // BUGFIX: Respect dest parameter
1642
+ if let Some(d) = dest {
1643
+ if d != left_reg {
1644
+ emit_move(c, d, left_reg);
1645
+ return Ok(d);
1646
+ }
1647
1648
return Ok(left_reg);
1649
}
1650
crates/luars/src/test/test_math.rs
@@ -135,7 +135,7 @@ fn test_math_deg_rad() {
135
r#"
136
local rad = math.rad(180)
137
assert(rad > 3.14 and rad < 3.15)
138
- assert(math.deg(math.pi) > 179 and math.deg(math.pi) < 181)
+ assert(math.deg(math.pi) >= 179 and math.deg(math.pi) <= 181)
139
"#,
140
141
0 commit comments