Skip to content

add (un)signed(::Type{Bool}) method #35854

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

Merged
merged 3 commits into from
May 14, 2020

Conversation

simeonschaub
Copy link
Member

Since signed(true) already works and returns an Int, I think this was just an omission.

@simeonschaub simeonschaub changed the title add signed(::Type{Bool}) method add (un)signed(::Type{Bool}) method May 12, 2020
@StefanKarpinski
Copy link
Member

Bool is already effectively an unsigned type. Not sure if we should got to 8 bits or straight to U/Int.

@simeonschaub
Copy link
Member Author

Wouldn't it be inconsistent if signed(Bool) was different from typeof(signed(true))? Or are you talking about changing signed(::Bool) as well?

@StefanKarpinski
Copy link
Member

Ah, didn't realize that was already defined. They should certainly match.

@StefanKarpinski
Copy link
Member

Test unsigned(Bool) as well?

@StefanKarpinski
Copy link
Member

This looks ready to merge once CI passes.

@JeffBezanson JeffBezanson merged commit 78f55de into JuliaLang:master May 14, 2020
Roger-luo pushed a commit to Roger-luo/julia that referenced this pull request May 14, 2020
simeonschaub added a commit to simeonschaub/julia that referenced this pull request May 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants