Compile RHS of binary expressions (oopsie)
Not sure how this happened besides being a gigantic moron, I completely forgot to do `self.compile_expr(&expr.rhs)`. Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
@@ -796,6 +796,8 @@ impl ExprVisitor for Compiler<'_> {
|
||||
let constant_id = self.insert_constant(self.create_str(name))?;
|
||||
self.emit(expr_line_number(expr), Op::GetAttr(constant_id));
|
||||
|
||||
self.compile_expr(&expr.rhs)?;
|
||||
|
||||
// convert RHS to a bool if we're doing AND or OR
|
||||
if let TokenKind::And | TokenKind::Or = expr.op.kind {
|
||||
let constant_id = self.insert_constant(self.create_str("to_bool"))?;
|
||||
|
||||
Reference in New Issue
Block a user