[rlox] Error when add operands are of wrong types
This commit is contained in:
@@ -117,7 +117,7 @@ impl VM {
|
||||
}
|
||||
}?
|
||||
}
|
||||
_ => todo!()
|
||||
_ => return Err(VMError::Runtime("Operands of + need to be numbers or strings".into(), self.pc))
|
||||
};
|
||||
}
|
||||
Op::Subtract | Op::Multiply | Op::Divide => {
|
||||
|
||||
Reference in New Issue
Block a user