aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity
diff options
context:
space:
mode:
authorErik Kundt <bitshift@posteo.org>2018-07-11 07:44:51 +0800
committerErik Kundt <bitshift@posteo.org>2018-07-11 07:58:17 +0800
commit7c7e154a7b93d880fd173f6d633b8767f12e2469 (patch)
treed12932935933e051c1ed2a1819e16f128c849735 /test/libsolidity
parent34a031609e1e7c5358f0e716eeb8ef1c4d25c81a (diff)
downloaddexon-solidity-7c7e154a7b93d880fd173f6d633b8767f12e2469.tar.gz
dexon-solidity-7c7e154a7b93d880fd173f6d633b8767f12e2469.tar.zst
dexon-solidity-7c7e154a7b93d880fd173f6d633b8767f12e2469.zip
Improves error with suggestion to remove parantheses.
Diffstat (limited to 'test/libsolidity')
-rw-r--r--test/libsolidity/syntaxTests/inheritance/base_arguments_empty_parentheses.sol5
-rw-r--r--test/libsolidity/syntaxTests/inheritance/too_few_base_arguments.sol2
-rw-r--r--test/libsolidity/syntaxTests/nameAndTypeResolution/525_reject_interface_constructors.sol2
3 files changed, 6 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 4c6021ca..3d5fbf45 100644
--- a/test/libsolidity/syntaxTests/inheritance/base_arguments_empty_parentheses.sol
+++ b/test/libsolidity/syntaxTests/inheritance/base_arguments_empty_parentheses.sol
@@ -1,7 +1,10 @@
contract Base {
constructor(uint) public {}
}
+contract Base2 {
+ constructor(uint, uint) public {}
+}
contract Derived is Base(2) { }
contract Derived2 is Base(), Derived() { }
// ----
-// TypeError: (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. Remove parentheses if you do not want to provide arguments here.
diff --git a/test/libsolidity/syntaxTests/inheritance/too_few_base_arguments.sol b/test/libsolidity/syntaxTests/inheritance/too_few_base_arguments.sol
index c55c41f2..1ce48200 100644
--- a/test/libsolidity/syntaxTests/inheritance/too_few_base_arguments.sol
+++ b/test/libsolidity/syntaxTests/inheritance/too_few_base_arguments.sol
@@ -6,5 +6,5 @@ contract Derived2 is Base {
constructor() Base(2) public { }
}
// ----
-// TypeError: (74-81): Wrong argument count for constructor call: 1 arguments given but expected 2.
+// TypeError: (74-81): Wrong argument count for constructor call: 1 arguments given but expected 2. Remove parentheses if you do not want to provide arguments here.
// TypeError: (130-137): Wrong argument count for modifier invocation: 1 arguments given but expected 2.
diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/525_reject_interface_constructors.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/525_reject_interface_constructors.sol
index d65c639f..ad08eca6 100644
--- a/test/libsolidity/syntaxTests/nameAndTypeResolution/525_reject_interface_constructors.sol
+++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/525_reject_interface_constructors.sol
@@ -1,4 +1,4 @@
interface I {}
contract C is I(2) {}
// ----
-// TypeError: (29-33): Wrong argument count for constructor call: 1 arguments given but expected 0.
+// TypeError: (29-33): Wrong argument count for constructor call: 1 arguments given but expected 0. Remove parentheses if you do not want to provide arguments here.