> On Mar 10, 2021, at 13:24, Aleksander Machniak <a...@alec.pl> wrote:
> 
> On 10.03.2021 19:06, Matthew Brown wrote:
>> Ondřej Mirtes and I present an RFC for the noreturn type:
>> https://wiki.php.net/rfc/noreturn_type
> 
> I don't like that type covariance would be allowed. Why such an
> exception to the rules?


It’s not an exception. Returns are covariant. Parameters are
contravariant. Since `noreturn` is a subtype of all other types, it
behaves as expected.

I like the proposal, btw!

Cheers,
Ben

Attachment: signature.asc
Description: Message signed with OpenPGP

Reply via email to