Fix wording of error message.

This commit is contained in:
chriseth 2020-07-06 19:16:21 +02:00
parent a09a791999
commit e48d3e5847
9 changed files with 13 additions and 13 deletions

View File

@ -151,13 +151,13 @@ void ContractLevelChecker::findDuplicateDefinitions(map<string, vector<T>> const
if constexpr (is_same_v<T, FunctionDefinition const*>) if constexpr (is_same_v<T, FunctionDefinition const*>)
{ {
error = 1686_error; error = 1686_error;
message = "Function with same name and arguments defined twice."; message = "Function with same name and parameter types defined twice.";
} }
else else
{ {
static_assert(is_same_v<T, EventDefinition const*>, "Expected \"FunctionDefinition const*\" or \"EventDefinition const*\""); static_assert(is_same_v<T, EventDefinition const*>, "Expected \"FunctionDefinition const*\" or \"EventDefinition const*\"");
error = 5883_error; error = 5883_error;
message = "Event with same name and arguments defined twice."; message = "Event with same name and parameter types defined twice.";
} }
ssl.limitSize(message); ssl.limitSize(message);

View File

@ -16,7 +16,7 @@ contract B is A {
function i(uint[] memory) public override payable {} function i(uint[] memory) public override payable {}
} }
// ---- // ----
// DeclarationError 1686: (300-353): Function with same name and arguments defined twice. // DeclarationError 1686: (300-353): Function with same name and parameter types defined twice.
// DeclarationError 1686: (358-419): Function with same name and arguments defined twice. // DeclarationError 1686: (358-419): Function with same name and parameter types defined twice.
// DeclarationError 1686: (424-485): Function with same name and arguments defined twice. // DeclarationError 1686: (424-485): Function with same name and parameter types defined twice.
// DeclarationError 1686: (490-546): Function with same name and arguments defined twice. // DeclarationError 1686: (490-546): Function with same name and parameter types defined twice.

View File

@ -3,4 +3,4 @@ contract A {
function f(uint[] memory) internal pure {} function f(uint[] memory) internal pure {}
} }
// ---- // ----
// DeclarationError 1686: (17-61): Function with same name and arguments defined twice. // DeclarationError 1686: (17-61): Function with same name and parameter types defined twice.

View File

@ -3,4 +3,4 @@ contract test {
event A(uint i); event A(uint i);
} }
// ---- // ----
// DeclarationError 5883: (20-36): Event with same name and arguments defined twice. // DeclarationError 5883: (20-36): Event with same name and parameter types defined twice.

View File

@ -3,4 +3,4 @@ contract test {
event A(uint i) anonymous; event A(uint i) anonymous;
} }
// ---- // ----
// DeclarationError 5883: (20-36): Event with same name and arguments defined twice. // DeclarationError 5883: (20-36): Event with same name and parameter types defined twice.

View File

@ -3,4 +3,4 @@ contract test {
event A(uint indexed i); event A(uint indexed i);
} }
// ---- // ----
// DeclarationError 5883: (20-36): Event with same name and arguments defined twice. // DeclarationError 5883: (20-36): Event with same name and parameter types defined twice.

View File

@ -3,4 +3,4 @@ contract C {
function test(uint a) external {} function test(uint a) external {}
} }
// ---- // ----
// DeclarationError 1686: (17-66): Function with same name and arguments defined twice. // DeclarationError 1686: (17-66): Function with same name and parameter types defined twice.

View File

@ -6,4 +6,4 @@ contract test {
function fun(uint a) public returns(uint r) { return a; } function fun(uint a) public returns(uint r) { return a; }
} }
// ---- // ----
// DeclarationError 1686: (189-246): Function with same name and arguments defined twice. // DeclarationError 1686: (189-246): Function with same name and parameter types defined twice.

View File

@ -3,4 +3,4 @@ contract test {
function fun() public { } function fun() public { }
} }
// ---- // ----
// DeclarationError 1686: (20-45): Function with same name and arguments defined twice. // DeclarationError 1686: (20-45): Function with same name and parameter types defined twice.