Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
red-knot: implement unary minus on integer literals (#13114)
# Summary Add support for the first unary operator: negating integer literals. The resulting type is another integer literal, with the value being the negated value of the literal. All other types continue to return `Type::Unknown` for the present, but this is designed to make it easy to extend easily with other combinations of operator and operand. Contributes to #12701. ## Test Plan Add tests with basic negation, including of very large integers and double negation.
- Loading branch information