(&self, other: &Box<dyn Value>)
| 64 | } |
| 65 | |
| 66 | fn mul_op(&self, other: &Box<dyn Value>) -> Result<Box<dyn Value>, String> { |
| 67 | if let Some(other_int) = other.as_any().downcast_ref::<FloatValue>() { |
| 68 | let value = self.value * other_int.value; |
| 69 | return Ok(Box::new(FloatValue { value })); |
| 70 | } |
| 71 | Err("Unexpected value to perform `*` with".to_string()) |
| 72 | } |
| 73 | |
| 74 | fn div_op(&self, other: &Box<dyn Value>) -> Result<Box<dyn Value>, String> { |
| 75 | if let Some(other_int) = other.as_any().downcast_ref::<FloatValue>() { |
no test coverage detected