Re: How do I handle covariant parameters and not fall foul of LSP.
| From: | Christoph M. Becker | Date: | Tue, 14 Feb 2017 11:03:48 +0000 |
| Subject: | Re: How do I handle covariant parameters and not fall foul of LSP. | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-325965@lists.php.net to get a copy of this message | ||
On 14.02.2017 at 11:20, Richard Quadling wrote:
> If anyone has some good examples (real world ideally) where LSP is sane AND
> includes inheritance (they seem to be where the conflict lies) then I may
> be able to learn why I'm doing it wrong.
<https://www.gnu.org/software/sather/docs-1.2/tutorial/type-conformance.html>
and
<http://www1.icsi.berkeley.edu/~sather/Documentation/EclecticTutorial/node15.html>
may be helpful.
Also note, that PHP currently only supports parameter invariance (not
contravariance).
--
Christoph M. Becker