Skip to content

[stdlib] Add @discardableResult to Set.insert’s AnyHashable overload #68067

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 1 commit into from
Aug 24, 2023

Conversation

lorentey
Copy link
Member

@lorentey lorentey commented Aug 22, 2023

Unlike the core Set.insert, this utility declaration wasn’t declared @discardableResult.

rdar://114008680

Unlike the core Set.insert, this utility declaration wasn’t declared @discardableOverload, introducing an undesirable inconsistency.

rdar://114008680
@lorentey lorentey requested a review from stephentyrone August 22, 2023 20:49
@lorentey
Copy link
Member Author

Cc @stephentyrone This is technically a public API change; however, it is merely resolving an undesirable/unintentional inconsistency, so it's probably fine to do this without a Swift Evolution process.

I can't think of a way this change could possibly have an adverse effect in client code. (Beyond making code that relies on @discardableResult fail to build on earlier stdlibs.)

@lorentey
Copy link
Member Author

@swift-ci test

@lorentey
Copy link
Member Author

The Windows CI run has experienced an unrelated timeout.

Build timed out (after 60 minutes). Marking the build as aborted.

@stephentyrone
Copy link
Contributor

Make it so.

@stephentyrone
Copy link
Contributor

@swift-ci test windows

@lorentey lorentey merged commit c765842 into swiftlang:main Aug 24, 2023
@lorentey lorentey deleted the fix-Set.insert-overload-decl branch August 24, 2023 21:30
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.

2 participants