diff options
author | Daniel Kirchner <daniel@ekpyron.org> | 2018-03-02 01:39:01 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2018-04-04 00:21:55 +0800 |
commit | d664a599e68291166c47fcece464cb8d0af31df8 (patch) | |
tree | 26668133eed7076b9d5a94d2a1f6ba982f79250e /test/libsolidity/syntaxTests/inheritance | |
parent | 0edce4b570c157927933697b30f0f94cbdf173b2 (diff) | |
download | dexon-solidity-d664a599e68291166c47fcece464cb8d0af31df8.tar.gz dexon-solidity-d664a599e68291166c47fcece464cb8d0af31df8.tar.zst dexon-solidity-d664a599e68291166c47fcece464cb8d0af31df8.zip |
Constructors are defined using the ``constructor`` keyword.
Diffstat (limited to 'test/libsolidity/syntaxTests/inheritance')
-rw-r--r-- | test/libsolidity/syntaxTests/inheritance/base_arguments_empty_parentheses.sol | 2 | ||||
-rw-r--r-- | test/libsolidity/syntaxTests/inheritance/too_few_base_arguments.sol | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/test/libsolidity/syntaxTests/inheritance/base_arguments_empty_parentheses.sol b/test/libsolidity/syntaxTests/inheritance/base_arguments_empty_parentheses.sol index 76df0657..9607ed60 100644 --- a/test/libsolidity/syntaxTests/inheritance/base_arguments_empty_parentheses.sol +++ b/test/libsolidity/syntaxTests/inheritance/base_arguments_empty_parentheses.sol @@ -1,5 +1,5 @@ contract Base { - function Base(uint) public {} + constructor(uint) public {} } contract Derived is Base(2) { } contract Derived2 is Base(), Derived() { } diff --git a/test/libsolidity/syntaxTests/inheritance/too_few_base_arguments.sol b/test/libsolidity/syntaxTests/inheritance/too_few_base_arguments.sol index 82aba308..45a0770f 100644 --- a/test/libsolidity/syntaxTests/inheritance/too_few_base_arguments.sol +++ b/test/libsolidity/syntaxTests/inheritance/too_few_base_arguments.sol @@ -1,9 +1,9 @@ contract Base { - function Base(uint, uint) public {} + constructor(uint, uint) public {} } contract Derived is Base(2) { } contract Derived2 is Base { - function Derived2() Base(2) public { } + constructor() Base(2) public { } } // ---- // TypeError: Wrong argument count for constructor call: 1 arguments given but expected 2. |