aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorErik Kundt <bitshift@posteo.org>2018-07-07 04:53:55 +0800
committerErik Kundt <bitshift@posteo.org>2018-07-11 07:56:07 +0800
commit0b960f5a9cde145775e5e24a52ac48e32d0969af (patch)
tree079e272bf871b874463f9877263c8f5964489419 /test
parentd84976dc871a1fdfab233650b989af69e325bf2b (diff)
downloaddexon-solidity-0b960f5a9cde145775e5e24a52ac48e32d0969af.tar
dexon-solidity-0b960f5a9cde145775e5e24a52ac48e32d0969af.tar.gz
dexon-solidity-0b960f5a9cde145775e5e24a52ac48e32d0969af.tar.bz2
dexon-solidity-0b960f5a9cde145775e5e24a52ac48e32d0969af.tar.lz
dexon-solidity-0b960f5a9cde145775e5e24a52ac48e32d0969af.tar.xz
dexon-solidity-0b960f5a9cde145775e5e24a52ac48e32d0969af.tar.zst
dexon-solidity-0b960f5a9cde145775e5e24a52ac48e32d0969af.zip
Turns wrong argument count in base constructor call into en error.
Diffstat (limited to 'test')
-rw-r--r--test/libsolidity/syntaxTests/inheritance/base_arguments_empty_parentheses.sol8
-rw-r--r--test/libsolidity/syntaxTests/inheritance/base_arguments_empty_parentheses_V050.sol9
2 files changed, 7 insertions, 10 deletions
diff --git a/test/libsolidity/syntaxTests/inheritance/base_arguments_empty_parentheses.sol b/test/libsolidity/syntaxTests/inheritance/base_arguments_empty_parentheses.sol
index 0b18b995..6aacc95e 100644
--- a/test/libsolidity/syntaxTests/inheritance/base_arguments_empty_parentheses.sol
+++ b/test/libsolidity/syntaxTests/inheritance/base_arguments_empty_parentheses.sol
@@ -1,7 +1,13 @@
contract Base {
constructor(uint) public {}
}
+contract Base2 {
+ constructor(uint, uint) public {}
+}
contract Derived is Base(2) { }
contract Derived2 is Base(), Derived() { }
+contract Derived3 is Base2(2,2) { }
+contract Derived4 is Base2(2), Derived() { }
// ----
-// Warning: (101-107): Wrong argument count for constructor call: 0 arguments given but expected 1.
+// TypeError: (156-162): Wrong argument count for constructor call: 0 arguments given but expected 1.
+// TypeError: (235-243): Wrong argument count for constructor call: 1 arguments given but expected 2.
diff --git a/test/libsolidity/syntaxTests/inheritance/base_arguments_empty_parentheses_V050.sol b/test/libsolidity/syntaxTests/inheritance/base_arguments_empty_parentheses_V050.sol
deleted file mode 100644
index db04ab8c..00000000
--- a/test/libsolidity/syntaxTests/inheritance/base_arguments_empty_parentheses_V050.sol
+++ /dev/null
@@ -1,9 +0,0 @@
-pragma experimental "v0.5.0";
-
-contract Base {
- constructor(uint) public {}
-}
-contract Derived is Base(2) { }
-contract Derived2 is Base(), Derived() { }
-// ----
-// TypeError: (132-138): Wrong argument count for constructor call: 0 arguments given but expected 1.