(&self, other: &Box<dyn Value>)
| 138 | } |
| 139 | |
| 140 | fn shr_op(&self, other: &Box<dyn Value>) -> Result<Box<dyn Value>, String> { |
| 141 | if let Some(other_int) = other.as_any().downcast_ref::<IntValue>() { |
| 142 | let value = self.value >> other_int.value; |
| 143 | return Ok(Box::new(IntValue::new(value))); |
| 144 | } |
| 145 | Err("Unexpected type to perform `>>` with".to_string()) |
| 146 | } |
| 147 | |
| 148 | fn eq_op(&self, other: &Box<dyn Value>) -> Result<Box<dyn Value>, String> { |
| 149 | if let Some(other_bool) = other.as_any().downcast_ref::<IntValue>() { |
no test coverage detected