| 574 | { |
| 575 | |
| 576 | bool isValidShiftAndAmountType(Token _operator, Type const& _shiftAmountType) |
| 577 | { |
| 578 | // Disable >>> here. |
| 579 | if (_operator == Token::SHR) |
| 580 | return false; |
| 581 | else if (IntegerType const* otherInt = dynamic_cast<decltype(otherInt)>(&_shiftAmountType)) |
| 582 | return !otherInt->isSigned(); |
| 583 | else if (RationalNumberType const* otherRat = dynamic_cast<decltype(otherRat)>(&_shiftAmountType)) |
| 584 | return !otherRat->isFractional() && otherRat->integerType() && !otherRat->integerType()->isSigned(); |
| 585 | else |
| 586 | return false; |
| 587 | } |
| 588 | |
| 589 | } |
| 590 |
no test coverage detected