Skip to content
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

Remove explicit ==, hashing definitions from RawRepresentable types #2134

Merged
merged 2 commits into from
Apr 24, 2019

Conversation

lorentey
Copy link
Member

This implements @millenomi's review note in #2118 (comment).

Remove explicit definitions for == and hash(into:) from Foundation's enum-like RawRepresentable types. The stdlib provides identical definitions in conditional extensions of RawRepresentable.

Note: This would be an ABI-breaking change in Darwin's Foundation overlays because it removes these symbols; but it seems a reasonable simplification for corelibs-foundation, where AFAIK we don't have to be compatible with Swift 5's ABI.

Note also that RawRepresentable's definitions are inlinable, while the original definitions weren't. The corresponding definitions on Darwin are already inlinable, so this is unlikely to cause new issues.

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
RawRepresentable already provides identical definitions in conditional extensions.

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
@lorentey lorentey requested a review from millenomi April 17, 2019 22:29
@lorentey
Copy link
Member Author

@swift-ci test

@millenomi
Copy link
Contributor

@swift-ci please test and merge

@swift-ci swift-ci merged commit c82e1de into swiftlang:master Apr 24, 2019
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.

None yet

3 participants