document that all the base constructors are called

This commit is contained in:
Leo Arias 2018-05-08 17:26:37 +00:00
parent 4259c0d036
commit 114a0cf953

View File

@ -1030,8 +1030,9 @@ A constructor set as ``internal`` causes the contract to be marked as :ref:`abst
Arguments for Base Constructors Arguments for Base Constructors
=============================== ===============================
Derived contracts need to provide all arguments needed for The constructors of all the base contracts will be called following the
the base constructors. This can be done in two ways:: 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; 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. inheritance list or in modifier-style in the derived constuctor.
Specifying arguments in both places is an error. Specifying arguments in both places is an error.
If the constructor of a base contract has no arguments, it will be implicitly If a derived contract doesn't specify the arguments to all of its base
executed upon contract creation. contracts' constructors, it will be abstract.
.. index:: ! inheritance;multiple, ! linearization, ! C3 linearization .. index:: ! inheritance;multiple, ! linearization, ! C3 linearization