(&self, other: &Box<dyn Value>)
| 106 | } |
| 107 | |
| 108 | fn or_op(&self, other: &Box<dyn Value>) -> Result<Box<dyn Value>, String> { |
| 109 | if let Some(other_int) = other.as_any().downcast_ref::<IntValue>() { |
| 110 | let value = self.value | other_int.value; |
| 111 | return Ok(Box::new(IntValue::new(value))); |
| 112 | } |
| 113 | Err("Unexpected type to perform `|` with".to_string()) |
| 114 | } |
| 115 | |
| 116 | fn and_op(&self, other: &Box<dyn Value>) -> Result<Box<dyn Value>, String> { |
| 117 | if let Some(other_int) = other.as_any().downcast_ref::<IntValue>() { |
no test coverage detected