# LSP | The Liskov Substitution Principle

通俗解释：

* 接受的参数（类型）范围比父类大，返回的类型范围比父类小。可以理解为子类比父类强，父亲能干的事情儿子一定可以，反过来不一定成立。
* 老爸（只有小学毕业）能做的事，儿子（大学生）能做，反之不成立。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mm.ricky.moe/other/ji-suan-ji-li-lun/solid-yuan-ze/lsp-or-the-liskov-substitution-principle.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
