From 2867c2b4dd616aa181c4d06ed6179f2030b6a934 Mon Sep 17 00:00:00 2001 From: chriseth Date: Thu, 29 Nov 2018 13:32:52 +0100 Subject: Clarify "copying bytecode" in inheritance. --- docs/contracts.rst | 7 ++++--- 1 file 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 `_, -- cgit v1.2.3