| 487 | type Output = Self; |
| 488 | |
| 489 | fn shl(self, rhs: Self) -> Self::Output { |
| 490 | if self.is_bottom() || rhs.is_bottom() { |
| 491 | Self::bottom() |
| 492 | } else if self.is_top() || rhs.is_top() { |
| 493 | Self::top() |
| 494 | } else if let (Ok(lval), Ok(rval)) = (Integer::try_from(self), Integer::try_from(rhs)) { |
| 495 | if let Some(u32val) = rval.to_u32() { |
| 496 | let val = lval << u32val; |
| 497 | Self::new(Bound::from(val.clone()), Bound::from(val)) |
| 498 | } else { |
| 499 | Self::top() |
| 500 | } |
| 501 | } else { |
| 502 | Self::top() |
| 503 | } |
| 504 | } |
| 505 | } |
| 506 | |
| 507 | impl Shr for Interval { |