-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Marking .abs() method for floating point types as obsolete in Swift 4 #5810
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 |
You can still mark them as deprecated in Swift 3.1 as well! |
@swift-ci Please smoke test Linux platform |
...and deprecated in Swift 3.1
Updated. |
@@ -336,9 +336,11 @@ extension CGFloat { | |||
fatalError("unavailable") | |||
} | |||
|
|||
@available(*, unavailable, message: "Please use the `abs(_:)` free function") | |||
@available(swift, deprecated: 3.1, message: "Please use the `abs(_:)` free function") | |||
@available(swift, obsoleted: 4.0, message: "Please use the `abs(_:)` free function") |
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.
@available(swift, deprecated: 3.1, obsoleted: 4.0, message: "...")
doesn't work?
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.
Good question. Now that you've mentioned it, I think it should.
@swift-ci Please smoke test and merge |
Unrelated swiftpm test failure. |
@swift-ci Please smoke test Linux platform |
In the name of source compatibility, the
abs()
static methods return to all floating point types.Resolves rdar://problem/28456614.