Skip to content

fix convenience accessors on CocoaError and URLError #2828

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
Jun 20, 2020

Conversation

glessard
Copy link
Contributor

The convenience accessors (such as URLError.failingURL) were always returning nil because they hashed the key using the NSString hashValue rather than the String hashValue. This PR fixes this, and adds simple test cases to exercise each accessor.

Thanks @spevans for feedback about this in #2825.

This fixes https://bugs.swift.org/browse/SR-13037

@spevans
Copy link
Contributor

spevans commented Jun 19, 2020

You'll need to add TestURLError.allTests and TestCocoaErro.allTests into main.swift as the tests are not auto discovered.
Could you also add 'SR-13037' somewhere into the commit message as it makes it easier to check if a bug has been in the history, thanks

@glessard
Copy link
Contributor Author

Will do. Amusingly I actually avoided committing my changes to main.swift 🤦

@spevans
Copy link
Contributor

spevans commented Jun 19, 2020

@swift-ci test

1 similar comment
@spevans
Copy link
Contributor

spevans commented Jun 19, 2020

@swift-ci test

@spevans
Copy link
Contributor

spevans commented Jun 20, 2020

@swift-ci test and merge

@spevans
Copy link
Contributor

spevans commented Jun 20, 2020

@swift-ci please test and merge

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