-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[wip] Bool toggle implementation #14586
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
Conversation
@swift-ci Please smoke test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You'll need to add public
:)
Seems like it'd make sense for this to be _transparent
too.
stdlib/public/core/Bool.swift
Outdated
/// | ||
/// bools[0].toggle() | ||
/// // bools now contains [false, false] | ||
mutating func toggle() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs to be public
stdlib/public/core/Bool.swift
Outdated
@@ -294,3 +294,19 @@ extension Bool { | |||
return lhs ? true : try rhs() | |||
} | |||
} | |||
|
|||
extension Bool { | |||
@_inlineable // FIXME(sil-serialize-all) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can drop the FIXME(sil-serialize-all)
for this one. It's truly legitimately inlineable.
@chriseidhof We have in the docs directory information about the CI and testing. For the CI commands: https://github.com/apple/swift/blob/master/docs/ContinuousIntegration.md For the testing: https://github.com/apple/swift/blob/master/docs/Testing.md If you have any comments/improvements, they are welcome as always = ). |
@swift-ci please test |
why no |
That method already exists and is spelled |
This pull-request accompanies SE-0199: Adding
toggle
toBool
I don't know how to run the test suite and what the standards are for documentation. I'm happy to improve on the PR if someone with more knowledge can point things out.