diff options
author | Federico Bond <federicobond@gmail.com> | 2017-12-12 05:00:15 +0800 |
---|---|---|
committer | Daniel Kirchner <daniel@ekpyron.org> | 2018-04-09 17:22:35 +0800 |
commit | 4e037281acaf74c907f68e6227d6aa1b8847c78d (patch) | |
tree | 1317b5018a7b91d24578d16d1f6f6a2780c01771 /test/libsolidity/syntaxTests | |
parent | fe61435c273bf43ac1a20d8bc97b6935a54b7117 (diff) | |
download | dexon-solidity-4e037281acaf74c907f68e6227d6aa1b8847c78d.tar.gz dexon-solidity-4e037281acaf74c907f68e6227d6aa1b8847c78d.tar.zst dexon-solidity-4e037281acaf74c907f68e6227d6aa1b8847c78d.zip |
Error on duplicated super constructor calls
Diffstat (limited to 'test/libsolidity/syntaxTests')
-rw-r--r-- | test/libsolidity/syntaxTests/inheritance/duplicated_super_constructor_call.sol | 4 | ||||
-rw-r--r-- | test/libsolidity/syntaxTests/inheritance/duplicated_super_constructor_call_empty.sol | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/test/libsolidity/syntaxTests/inheritance/duplicated_super_constructor_call.sol b/test/libsolidity/syntaxTests/inheritance/duplicated_super_constructor_call.sol new file mode 100644 index 00000000..95df1040 --- /dev/null +++ b/test/libsolidity/syntaxTests/inheritance/duplicated_super_constructor_call.sol @@ -0,0 +1,4 @@ +contract A { constructor(uint) public { } } +contract B is A(2) { constructor() A(3) public { } } +// ---- +// DeclarationError: Duplicated super constructor call. diff --git a/test/libsolidity/syntaxTests/inheritance/duplicated_super_constructor_call_empty.sol b/test/libsolidity/syntaxTests/inheritance/duplicated_super_constructor_call_empty.sol new file mode 100644 index 00000000..f8024ad6 --- /dev/null +++ b/test/libsolidity/syntaxTests/inheritance/duplicated_super_constructor_call_empty.sol @@ -0,0 +1,4 @@ +contract A { constructor() public { } } +contract B is A { constructor() A() public { } } +// ---- +// DeclarationError: Duplicated super constructor call. |