aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeo Arias <yo@elopio.net>2018-05-06 05:41:47 +0800
committerLeo Arias <yo@elopio.net>2018-05-06 05:41:47 +0800
commit4259c0d036a503069de451ab701fe53b4a815150 (patch)
treeb9289e0fd9371385ddf43222c1157fbb8310c542
parent8d666e180d5e109be55b381918014e1c090bd307 (diff)
downloaddexon-solidity-4259c0d036a503069de451ab701fe53b4a815150.tar.gz
dexon-solidity-4259c0d036a503069de451ab701fe53b4a815150.tar.zst
dexon-solidity-4259c0d036a503069de451ab701fe53b4a815150.zip
docs: document the implicit call of base constructor without arguments
-rw-r--r--docs/contracts.rst7
1 files changed, 5 insertions, 2 deletions
diff --git a/docs/contracts.rst b/docs/contracts.rst
index 5c298274..add072a9 100644
--- a/docs/contracts.rst
+++ b/docs/contracts.rst
@@ -982,7 +982,7 @@ virtual method lookup.
Constructors
============
-A constructor is an optional function declared with the ``constructor`` keyword which is executed upon contract creation.
+A constructor is an optional function declared with the ``constructor`` keyword which is executed upon contract creation.
Constructor functions can be either ``public`` or ``internal``. If there is no constructor, the contract will assume the
default constructor: ``contructor() public {}``.
@@ -1059,6 +1059,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 the constructor of a base contract has no arguments, it will be implicitly
+executed upon contract creation.
+
.. index:: ! inheritance;multiple, ! linearization, ! C3 linearization
Multiple Inheritance and Linearization
@@ -1139,7 +1142,7 @@ Example of a Function Type (a variable declaration, where the variable is of typ
function(address) external returns (address) foo;
-Abstract contracts decouple the definition of a contract from its implementation providing better extensibility and self-documentation and
+Abstract contracts decouple the definition of a contract from its implementation providing better extensibility and self-documentation and
facilitating patterns like the `Template method <https://en.wikipedia.org/wiki/Template_method_pattern>`_ and removing code duplication.
.. index:: ! contract;interface, ! interface contract