(&self, other: &Box<dyn Value>)
| 130 | } |
| 131 | |
| 132 | fn shl_op(&self, other: &Box<dyn Value>) -> Result<Box<dyn Value>, String> { |
| 133 | if let Some(other_int) = other.as_any().downcast_ref::<IntValue>() { |
| 134 | let value = self.value << other_int.value; |
| 135 | return Ok(Box::new(IntValue::new(value))); |
| 136 | } |
| 137 | Err("Unexpected type to perform `<<` with".to_string()) |
| 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>() { |
no test coverage detected