aboutsummaryrefslogtreecommitdiffstats
path: root/docs/contracts.rst
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-05-09 17:08:34 +0800
committerGitHub <noreply@github.com>2018-05-09 17:08:34 +0800
commit1e95335589872920b5f13b67731a8eb265f1aef6 (patch)
tree88e85e0842821158e839502cb234d15b695345a8 /docs/contracts.rst
parentaeb6a33957051d07add36cfd4d7fd58655bd6426 (diff)
parent114a0cf9539c9446461431834010cfde36fb8ac5 (diff)
downloaddexon-solidity-1e95335589872920b5f13b67731a8eb265f1aef6.tar
dexon-solidity-1e95335589872920b5f13b67731a8eb265f1aef6.tar.gz
dexon-solidity-1e95335589872920b5f13b67731a8eb265f1aef6.tar.bz2
dexon-solidity-1e95335589872920b5f13b67731a8eb265f1aef6.tar.lz
dexon-solidity-1e95335589872920b5f13b67731a8eb265f1aef6.tar.xz
dexon-solidity-1e95335589872920b5f13b67731a8eb265f1aef6.tar.zst
dexon-solidity-1e95335589872920b5f13b67731a8eb265f1aef6.zip
Merge pull request #4074 from elopio/docs/implicit-constructor
docs: document the implicit call of base constructor without arguments
Diffstat (limited to 'docs/contracts.rst')
-rw-r--r--docs/contracts.rst8
1 files changed, 6 insertions, 2 deletions
diff --git a/docs/contracts.rst b/docs/contracts.rst
index 9d47b543..3576cd7b 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,6 +1060,9 @@ 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 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
Multiple Inheritance and Linearization