Skip to content

Fixits for @noreturn -> Never (SE-0102) #3720

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 3 commits into from
Jul 24, 2016

Conversation

slavapestov
Copy link
Contributor

This pull request introduces migration from @NoReturn to returning Never, and removes old code for the @NoReturn attribute now that it has become an error.

@slavapestov
Copy link
Contributor Author

@swift-ci Please test

@nkcsgexi
Copy link
Contributor

Cool! Thanks for making migration easy for users, Slava!

@slavapestov slavapestov force-pushed the migrate-noreturn-to-never branch from aed45cd to 0b7681f Compare July 24, 2016 02:00
@slavapestov
Copy link
Contributor Author

@swift-ci Please test and merge

There are two places where @NoReturn appears:

- As an attribute on function declarations

- As an attribute on function types

In the first case, we have to handle a few different cases; the
function declaration might not have a return type, or it might
be something other than ().
@slavapestov slavapestov force-pushed the migrate-noreturn-to-never branch from 0b7681f to e5f1d73 Compare July 24, 2016 07:17
@slavapestov
Copy link
Contributor Author

@swift-ci Please test

of ``@noreturn`` functions. An ``unreachable`` instruction that survives
guaranteed DCE and is not immediately preceded by a ``@noreturn``
of functions returning uninhabited types. An ``unreachable`` instruction that
survives guaranteed DCE and is not immediately preceded by an no-return
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/an/a/ ?

@slavapestov slavapestov merged commit 5a763f9 into swiftlang:master Jul 24, 2016
@slavapestov slavapestov deleted the migrate-noreturn-to-never branch August 19, 2016 05:22
kateinoigakukun pushed a commit that referenced this pull request Aug 31, 2022
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