Re: [PHP] How do I handle covariant parameters and not fall foul of LSP.

[email protected] ("Tony Marston")
Newsgroups php.general
Message-ID <[email protected]>
"Richard Quadling"  wrote in message 
news:CAKUjMCXEXqy=VB8Jjjg8XKdUsc5NsqQTeZcs54+V5e4GH1RYYw@mail.gmail.com...
>
<snip>
>
>That's fine for concrete classes, but abstract classes which cannot be
>instantiated, therefore cannot be swapped, cannot fall foul of LSP. It is
>the abstract part that, in my mind, should be making the difference.

That is correct. LSP does not come into play when you inherit from an 
abstract class, only when you inherit from one concrete class to create a 
different concrete class. The author of LSP should have made this clear.

-- 
Tony Marston
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.