aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-11-30 23:47:02 +0800
committerGitHub <noreply@github.com>2018-11-30 23:47:02 +0800
commiteea8cecd42a3abe22bdcf207ee4364f2b7a17b08 (patch)
treec37aa647fd1215f8ab905cedb9fe0e9b2e6b9ea8
parent474e7b563561373c04ea954875d4acc7ad025ae4 (diff)
parent2867c2b4dd616aa181c4d06ed6179f2030b6a934 (diff)
downloaddexon-solidity-eea8cecd42a3abe22bdcf207ee4364f2b7a17b08.tar.gz
dexon-solidity-eea8cecd42a3abe22bdcf207ee4364f2b7a17b08.tar.zst
dexon-solidity-eea8cecd42a3abe22bdcf207ee4364f2b7a17b08.zip
Merge pull request #5541 from ethereum/clarifyCopyInheritance
[DOCS] Clarify "copying bytecode" in inheritance.
-rw-r--r--docs/contracts.rst7
1 files changed, 4 insertions, 3 deletions
diff --git a/docs/contracts.rst b/docs/contracts.rst
index df95883f..d6337d9a 100644
--- a/docs/contracts.rst
+++ b/docs/contracts.rst
@@ -1043,14 +1043,15 @@ Additional Resources for Understanding Events
Inheritance
***********
-Solidity supports multiple inheritance by copying code including polymorphism.
+Solidity supports multiple inheritance including polymorphism.
All function calls are virtual, which means that the most derived function
-is called, except when the contract name is explicitly given.
+is called, except when the contract name is explicitly given or the
+``super`` keyword is used.
When a contract inherits from other contracts, only a single
contract is created on the blockchain, and the code from all the base contracts
-is copied into the created contract.
+is compiled into the created contract.
The general inheritance system is very similar to
`Python's <https://docs.python.org/3/tutorial/classes.html#inheritance>`_,