Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make snegate / unegate overflow handling consistent with other builti…
…ns. (#4744) Make `int.snegate` ignore the signedness of its operand and unconditionally check for signed overflow like all the other `int.s*` builtins do. Fix the prelude implementation of unary `-` for `Core.UInt` to use `int.unegate` instead of `int.snegate`. Fix the test for unsigned negate to actually test negating unsigned integers, and add some tests that unary `-` also works.
- Loading branch information