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

Never For Parameter Types #7373

Closed
wants to merge 5 commits into from
Closed

Conversation

JordanRL
Copy link

@JordanRL JordanRL commented Aug 14, 2021

I'm making this pull request for an anticipated RFC to facilitate feedback and discussion.

EDIT:

Link to RFC: https://wiki.php.net/rfc/never_for_parameter_types

@faizanakram99
Copy link

I'm making this pull request for an anticipated RFC to facilitate feedback and discussion.

I'd suggest to link the RFC for rationale behind this. You make a very solid point there for facilitating pseudo generics by allowing never parameter types.

@kocsismate kocsismate added the RFC label Aug 14, 2021
@Girgias
Copy link
Member

Girgias commented Aug 14, 2021

Needs a couple more tests just thinking on top of my head:

  • Check that a type of never|T marks never as redundant at compile time.
  • Check that function foo(never $v = null){} doesn't compile (implicit null-ability).

@JordanRL
Copy link
Author

@faizanakram99 For now I'll link to the github RFC stub, but the reception on the mailing list has been good so I think I'll switch it to the wiki pretty soon: https://github.com/JordanRL/never-argument-type

@Girgias Thanks, I imagined there were a few tests I was missing.

@JordanRL JordanRL changed the title [RFC] Never For Parameter Types Never For Parameter Types Aug 14, 2021
@JordanRL
Copy link
Author

Closing this PR as the RFC will not be moving forward to a vote.

@JordanRL JordanRL closed this Aug 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants