diff options
author | chriseth <chris@ethereum.org> | 2018-11-29 20:32:52 +0800 |
---|---|---|
committer | chriseth <chris@ethereum.org> | 2018-11-29 20:33:10 +0800 |
commit | 2867c2b4dd616aa181c4d06ed6179f2030b6a934 (patch) | |
tree | ec0fa0d09a1848db2c3999c563abe892409b447b | |
parent | f6d013237d8b20c73e198b21d652872b236e34d0 (diff) | |
download | dexon-solidity-2867c2b4dd616aa181c4d06ed6179f2030b6a934.tar dexon-solidity-2867c2b4dd616aa181c4d06ed6179f2030b6a934.tar.gz dexon-solidity-2867c2b4dd616aa181c4d06ed6179f2030b6a934.tar.bz2 dexon-solidity-2867c2b4dd616aa181c4d06ed6179f2030b6a934.tar.lz dexon-solidity-2867c2b4dd616aa181c4d06ed6179f2030b6a934.tar.xz dexon-solidity-2867c2b4dd616aa181c4d06ed6179f2030b6a934.tar.zst dexon-solidity-2867c2b4dd616aa181c4d06ed6179f2030b6a934.zip |
Clarify "copying bytecode" in inheritance.
-rw-r--r-- | docs/contracts.rst | 7 |
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>`_, |