Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add wrapped unary negation to unsigned integer types #9947

Merged
merged 2 commits into from
Jan 12, 2021

Conversation

HertzDevil
Copy link
Contributor

Resolves #9914. These definitions simply mirror their signed counterparts.

Although some tests for unsigned integers go into spec/std/int_spec.cr, the tests for #&- are exclusively in spec/std/uint_spec.cr because this PR doesn't define the same method in signed integer types.

src/int.cr Outdated Show resolved Hide resolved
Co-authored-by: Johannes Müller <johannes.mueller@smj-fulda.org>
@asterite asterite added this to the 1.0.0 milestone Jan 12, 2021
@asterite asterite merged commit ed535e9 into crystal-lang:master Jan 12, 2021
@HertzDevil HertzDevil deleted the feature/uint-unary-minus branch January 12, 2021 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[RFC] Wrapped negation of unsigned integers
3 participants