Conversation
A no method error was raised instead of the nicer message.
base/checked.jl
Outdated
|
|
||
| typealias SignedInt Union{Int8,Int16,Int32,Int64,Int128} | ||
| typealias UnsignedInt Union{UInt8,UInt16,UInt32,UInt64,UInt128} | ||
| typealias UnsignedInt Union{UInt8,UInt16,UInt32,UInt64,UInt128, Bool} |
Member
Author
There was a problem hiding this comment.
I'll fix this spacing issue (and the one below).
Bool behaves almost like unsigned integers, but with special cases for checked_add() and checked_sub() which require adding methods and testing separately.
2e57e31 to
58bdac3
Compare
Member
Author
|
My first attempt did not follow the types returned by unchecked operations (e.g. |
Contributor
|
I'm going to merge this for now to fix CI. @eschnett please do review, if you have any comments we can refine going forward. |
tkelman
added a commit
that referenced
this pull request
Mar 1, 2016
Implement checked operations on Bool
| checked_srem_int, | ||
| checked_uadd_int, checked_usub_int, checked_umul_int, checked_udiv_int, | ||
| checked_urem_int | ||
| import Base: no_op_err |
Contributor
There was a problem hiding this comment.
Why do you need this import? It seems unused.
This was referenced Mar 1, 2016
Contributor
|
Yes, the tests below check both value and type. This is probably for historic reasons, and could be cleaned up. |
Member
Author
|
OK, see #15304 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fixes the current breakage on master. Cf #15227 (comment) and #15228.
@eschnett This is a very mechanical change, do you think it's a good way to do this?