Use asCallableFunction for definition clashes in the same contract.

This commit is contained in:
chriseth
2018-11-26 14:30:32 +01:00
parent 36a369d077
commit 5ec634939e
+3 -1
View File
@@ -215,7 +215,9 @@ void TypeChecker::findDuplicateDefinitions(map<string, vector<T>> const& _defini
SecondarySourceLocation ssl;
for (size_t j = i + 1; j < overloads.size(); ++j)
if (FunctionType(*overloads[i]).hasEqualParameterTypes(FunctionType(*overloads[j])))
if (FunctionType(*overloads[i]).asCallableFunction(false)->hasEqualParameterTypes(
*FunctionType(*overloads[j]).asCallableFunction(false))
)
{
ssl.append("Other declaration is here:", overloads[j]->location());
reported.insert(j);