diff options
author | Leo Arias <yo@elopio.net> | 2018-05-09 01:26:37 +0800 |
---|---|---|
committer | Leo Arias <yo@elopio.net> | 2018-05-09 01:26:37 +0800 |
commit | 114a0cf9539c9446461431834010cfde36fb8ac5 (patch) | |
tree | 08349f8f800156716d8ecff35e75be952237e7f8 /docs | |
parent | 4259c0d036a503069de451ab701fe53b4a815150 (diff) | |
download | dexon-solidity-114a0cf9539c9446461431834010cfde36fb8ac5.tar.gz dexon-solidity-114a0cf9539c9446461431834010cfde36fb8ac5.tar.zst dexon-solidity-114a0cf9539c9446461431834010cfde36fb8ac5.zip |
document that all the base constructors are called
Diffstat (limited to 'docs')
-rw-r--r-- | docs/contracts.rst | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/docs/contracts.rst b/docs/contracts.rst index add072a9..9551fcc7 100644 --- a/docs/contracts.rst +++ b/docs/contracts.rst @@ -1030,8 +1030,9 @@ A constructor set as ``internal`` causes the contract to be marked as :ref:`abst Arguments for Base Constructors =============================== -Derived contracts need to provide all arguments needed for -the base constructors. This can be done in two ways:: +The constructors of all the base contracts will be called following the +linearization rules explained below. If the base constructors have arguments, +derived contracts need to specify all of them. This can be done in two ways:: pragma solidity ^0.4.22; @@ -1059,8 +1060,8 @@ derived contract. Arguments have to be given either in the inheritance list or in modifier-style in the derived constuctor. Specifying arguments in both places is an error. -If the constructor of a base contract has no arguments, it will be implicitly -executed upon contract creation. +If a derived contract doesn't specify the arguments to all of its base +contracts' constructors, it will be abstract. .. index:: ! inheritance;multiple, ! linearization, ! C3 linearization |