aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity
diff options
context:
space:
mode:
authorDaniel Kirchner <daniel@ekpyron.org>2018-04-05 22:25:20 +0800
committerDaniel Kirchner <daniel@ekpyron.org>2018-04-09 21:26:08 +0800
commitb918a105a40aa90fe9b89eecbcdfc7ac2937c141 (patch)
treea4dc43f3387888817455d03633b02850d86a9832 /test/libsolidity
parentb8fdb666e235bb6b19f11dba7740227026111598 (diff)
downloaddexon-solidity-b918a105a40aa90fe9b89eecbcdfc7ac2937c141.tar.gz
dexon-solidity-b918a105a40aa90fe9b89eecbcdfc7ac2937c141.tar.zst
dexon-solidity-b918a105a40aa90fe9b89eecbcdfc7ac2937c141.zip
Move constructor argument override check to TypeChecker and reuse annotations in ContractCompiler.
Diffstat (limited to 'test/libsolidity')
-rw-r--r--test/libsolidity/syntaxTests/inheritance/base_arguments_multiple_inheritance.sol2
-rw-r--r--test/libsolidity/syntaxTests/inheritance/duplicated_constructor_call/ancestor.sol (renamed from test/libsolidity/syntaxTests/inheritance/duplicated_ancestor_constructor_call.sol)2
-rw-r--r--test/libsolidity/syntaxTests/inheritance/duplicated_constructor_call/ancestor_V050.sol (renamed from test/libsolidity/syntaxTests/inheritance/duplicated_ancestor_constructor_call_V050.sol)2
-rw-r--r--test/libsolidity/syntaxTests/inheritance/duplicated_constructor_call/base.sol (renamed from test/libsolidity/syntaxTests/inheritance/duplicated_super_constructor_call.sol)2
-rw-r--r--test/libsolidity/syntaxTests/inheritance/duplicated_constructor_call/base_V050.sol (renamed from test/libsolidity/syntaxTests/inheritance/duplicated_super_constructor_call_V050.sol)2
-rw-r--r--test/libsolidity/syntaxTests/inheritance/duplicated_constructor_call/base_multi.sol (renamed from test/libsolidity/syntaxTests/inheritance/duplicated_super_constructor_call_multi.sol)4
-rw-r--r--test/libsolidity/syntaxTests/inheritance/duplicated_constructor_call/base_multi_no_constructor.sol6
-rw-r--r--test/libsolidity/syntaxTests/inheritance/duplicated_constructor_call/base_multi_no_constructor_modifier_style.sol6
8 files changed, 19 insertions, 7 deletions
diff --git a/test/libsolidity/syntaxTests/inheritance/base_arguments_multiple_inheritance.sol b/test/libsolidity/syntaxTests/inheritance/base_arguments_multiple_inheritance.sol
index f63d0f02..5483d5d7 100644
--- a/test/libsolidity/syntaxTests/inheritance/base_arguments_multiple_inheritance.sol
+++ b/test/libsolidity/syntaxTests/inheritance/base_arguments_multiple_inheritance.sol
@@ -6,4 +6,4 @@ contract Derived is Base, Base1 {
constructor(uint i) Base(i) public {}
}
// ----
-// Warning: Duplicated super constructor calls are deprecated.
+// Warning: Base constructor arguments given twice.
diff --git a/test/libsolidity/syntaxTests/inheritance/duplicated_ancestor_constructor_call.sol b/test/libsolidity/syntaxTests/inheritance/duplicated_constructor_call/ancestor.sol
index 97f3f8ff..8b1af245 100644
--- a/test/libsolidity/syntaxTests/inheritance/duplicated_ancestor_constructor_call.sol
+++ b/test/libsolidity/syntaxTests/inheritance/duplicated_constructor_call/ancestor.sol
@@ -2,4 +2,4 @@ contract A { constructor(uint) public { } }
contract B is A(2) { constructor() public { } }
contract C is B { constructor() A(3) public { } }
// ----
-// Warning: Duplicated super constructor calls are deprecated.
+// Warning: Base constructor arguments given twice.
diff --git a/test/libsolidity/syntaxTests/inheritance/duplicated_ancestor_constructor_call_V050.sol b/test/libsolidity/syntaxTests/inheritance/duplicated_constructor_call/ancestor_V050.sol
index 933c9087..6616c9a9 100644
--- a/test/libsolidity/syntaxTests/inheritance/duplicated_ancestor_constructor_call_V050.sol
+++ b/test/libsolidity/syntaxTests/inheritance/duplicated_constructor_call/ancestor_V050.sol
@@ -4,4 +4,4 @@ contract A { constructor(uint) public { } }
contract B is A(2) { constructor() public { } }
contract C is B { constructor() A(3) public { } }
// ----
-// DeclarationError: Duplicated super constructor call.
+// DeclarationError: Base constructor arguments given twice.
diff --git a/test/libsolidity/syntaxTests/inheritance/duplicated_super_constructor_call.sol b/test/libsolidity/syntaxTests/inheritance/duplicated_constructor_call/base.sol
index 876b07ea..1fb504fe 100644
--- a/test/libsolidity/syntaxTests/inheritance/duplicated_super_constructor_call.sol
+++ b/test/libsolidity/syntaxTests/inheritance/duplicated_constructor_call/base.sol
@@ -1,4 +1,4 @@
contract A { constructor(uint) public { } }
contract B is A(2) { constructor() A(3) public { } }
// ----
-// Warning: Duplicated super constructor calls are deprecated.
+// Warning: Base constructor arguments given twice.
diff --git a/test/libsolidity/syntaxTests/inheritance/duplicated_super_constructor_call_V050.sol b/test/libsolidity/syntaxTests/inheritance/duplicated_constructor_call/base_V050.sol
index 31a363fd..96eb1bb1 100644
--- a/test/libsolidity/syntaxTests/inheritance/duplicated_super_constructor_call_V050.sol
+++ b/test/libsolidity/syntaxTests/inheritance/duplicated_constructor_call/base_V050.sol
@@ -3,4 +3,4 @@ pragma experimental "v0.5.0";
contract A { constructor(uint) public { } }
contract B is A(2) { constructor() A(3) public { } }
// ----
-// DeclarationError: Duplicated super constructor call.
+// DeclarationError: Base constructor arguments given twice.
diff --git a/test/libsolidity/syntaxTests/inheritance/duplicated_super_constructor_call_multi.sol b/test/libsolidity/syntaxTests/inheritance/duplicated_constructor_call/base_multi.sol
index caed18eb..db9ffc85 100644
--- a/test/libsolidity/syntaxTests/inheritance/duplicated_super_constructor_call_multi.sol
+++ b/test/libsolidity/syntaxTests/inheritance/duplicated_constructor_call/base_multi.sol
@@ -3,5 +3,5 @@ contract A is C(2) {}
contract B is C(2) {}
contract D is A, B { constructor() C(3) public {} }
// ----
-// Warning: Duplicated super constructor calls are deprecated.
-// Warning: Duplicated super constructor calls are deprecated.
+// Warning: Base constructor arguments given twice.
+// Warning: Base constructor arguments given twice.
diff --git a/test/libsolidity/syntaxTests/inheritance/duplicated_constructor_call/base_multi_no_constructor.sol b/test/libsolidity/syntaxTests/inheritance/duplicated_constructor_call/base_multi_no_constructor.sol
new file mode 100644
index 00000000..fe280ad5
--- /dev/null
+++ b/test/libsolidity/syntaxTests/inheritance/duplicated_constructor_call/base_multi_no_constructor.sol
@@ -0,0 +1,6 @@
+contract C { constructor(uint) public {} }
+contract A is C(2) {}
+contract B is C(2) {}
+contract D is A, B {}
+// ----
+// Warning: Base constructor arguments given twice.
diff --git a/test/libsolidity/syntaxTests/inheritance/duplicated_constructor_call/base_multi_no_constructor_modifier_style.sol b/test/libsolidity/syntaxTests/inheritance/duplicated_constructor_call/base_multi_no_constructor_modifier_style.sol
new file mode 100644
index 00000000..ea85aae7
--- /dev/null
+++ b/test/libsolidity/syntaxTests/inheritance/duplicated_constructor_call/base_multi_no_constructor_modifier_style.sol
@@ -0,0 +1,6 @@
+contract C { constructor(uint) public {} }
+contract A is C { constructor() C(2) public {} }
+contract B is C { constructor() C(2) public {} }
+contract D is A, B { }
+// ----
+// Warning: Base constructor arguments given twice.