Re: Typed constants revisited

From: Date: Thu, 24 Mar 2022 19:00:14 +0000
Subject: Re: Typed constants revisited
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-117421@lists.php.net to get a copy of this message
On 23/03/2022 18:54, Mark Niebergall wrote:
The next phase of work with different RFC would take this further with const inheritance, where const type must match.
I'm not sure it makes much sense to split this into two RFCs, and as far as I can see, the previous RFC included both features:
Class constants are covariant. This means that the type of a class constant is not allowed to be widen during inheritance.
Or is there something more you mean by "const inheritance", which isn't covered by the RFC's examples? Regards, -- Rowan Tommins [IMSoP]

« previous php.internals (#117421) next »