Re: [RFC] noreturn type

From: Date: Wed, 10 Mar 2021 19:28:49 +0000
Subject: Re: [RFC] noreturn type
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-113451@lists.php.net to get a copy of this message
> On Mar 10, 2021, at 13:24, Aleksander Machniak <alec@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: [application/pgp-signature] Message signed with OpenPGP signature.asc

Thread (37 messages)

« previous php.internals (#113451) next »