Skip to content

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

Merged
merged 2 commits into from
Nov 16, 2016

Conversation

moiseev
Copy link
Contributor

@moiseev moiseev commented Nov 15, 2016

In the name of source compatibility, the abs() static methods return to all floating point types.

Resolves rdar://problem/28456614.

@moiseev
Copy link
Contributor Author

moiseev commented Nov 15, 2016

@swift-ci Please smoke test

@jrose-apple
Copy link
Contributor

You can still mark them as deprecated in Swift 3.1 as well!

@moiseev
Copy link
Contributor Author

moiseev commented Nov 16, 2016

@swift-ci Please smoke test Linux platform

@moiseev moiseev self-assigned this Nov 16, 2016
@moiseev
Copy link
Contributor Author

moiseev commented Nov 16, 2016

Updated.
@swift-ci Please smoke test and merge

@@ -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")
Copy link
Member

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?

Copy link
Contributor Author

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.

@moiseev
Copy link
Contributor Author

moiseev commented Nov 16, 2016

@swift-ci Please smoke test and merge

@moiseev
Copy link
Contributor Author

moiseev commented Nov 16, 2016

Unrelated swiftpm test failure.
@swift-ci Please smoke test Linux platform

@moiseev
Copy link
Contributor Author

moiseev commented Nov 16, 2016

@swift-ci Please smoke test Linux platform

@moiseev moiseev merged commit 32feae5 into swiftlang:master Nov 16, 2016
@moiseev moiseev deleted the abs branch November 16, 2016 22:00
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