Skip to content

[gardening] Remove some optional usage from the tests. #2212

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

Conversation

drodriguez
Copy link
Contributor

In some cases in the tests, even if an API returns an optional, we know
that it should never be optional, and it might create warnings in later
code when the optional is interpolated into a string (for example).
Change those cases into using .unwrapped() to get a non-optional type,
and create a big error if a nil is actually received.

This should remove a bunch of warnings while compiling the tests.

In some cases in the tests, even if an API returns an optional, we know
that it should never be optional, and it might create warnings in later
code when the optional is interpolated into a string (for example).
Change those cases into using `.unwrapped()` to get a non-optional type,
and create a big error if a nil is actually received.

This should remove a bunch of warnings while compiling the tests.
@drodriguez
Copy link
Contributor Author

@swift-ci please test

@spevans
Copy link
Contributor

spevans commented May 2, 2019

@swift-ci test and merge

@swift-ci swift-ci merged commit 47bdeed into swiftlang:master May 2, 2019
@drodriguez drodriguez deleted the gardening-optionals-are-not-optionals branch May 2, 2019 18:08
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