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

[SR-1695] Option Set insert needs @discardableResult #44304

Closed
mattneub opened this issue Jun 7, 2016 · 1 comment
Closed

[SR-1695] Option Set insert needs @discardableResult #44304

mattneub opened this issue Jun 7, 2016 · 1 comment
Assignees
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. good first issue Good for newcomers standard library Area: Standard library umbrella

Comments

@mattneub
Copy link

mattneub commented Jun 7, 2016

Previous ID SR-1695
Radar None
Original Reporter @mattneub
Type Bug
Status Resolved
Resolution Done
Environment

Toolchain: Swift Development Snapshot 2016-06-06 (a)

Additional Detail from JIRA
Votes 0
Component/s Standard Library
Labels Bug, StarterBug
Assignee @natecook1000
Priority Medium

md5: c9cc182d6fd937535f17524a6f0624bf

Issue Description:

This warns of an unused result:

        var options = NSStringCompareOptions.caseInsensitiveSearch
        options.insert(.anchoredSearch) // warns

It shouldn't. NSSet insert is completely parallel but doesn't warn. Looks like we need @discardableResult here.

@natecook1000
Copy link
Member

This is fixed in #2966

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. good first issue Good for newcomers standard library Area: Standard library umbrella
Projects
None yet
Development

No branches or pull requests

2 participants