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

Add support for never keyword #130

Merged
merged 2 commits into from
Sep 17, 2021
Merged

Add support for never keyword #130

merged 2 commits into from
Sep 17, 2021

Conversation

jaapio
Copy link
Member

@jaapio jaapio commented Sep 17, 2021

php 8.1 introduces the never keyword, which can be used as return type.

src/Types/Never_.php Outdated Show resolved Hide resolved
php 8.1 introduces the `never` keyword, which can be used as return type.
@ashnazg
Copy link
Member

ashnazg commented Sep 17, 2021 via email

Void and never are types that can only be used for function return
types. Officially php doesn't have a category of types that are only
allowed for return, but I think it makes sense to name them like this.
@jaapio
Copy link
Member Author

jaapio commented Sep 17, 2021

I named it return-type because that fits the purpose :-)

@jaapio jaapio merged commit 30f38bf into 1.x Sep 17, 2021
@jaapio jaapio deleted the feature/never_type branch September 17, 2021 15:28
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