diff options
author | chriseth <chris@ethereum.org> | 2018-11-22 22:13:43 +0800 |
---|---|---|
committer | chriseth <chris@ethereum.org> | 2018-11-26 21:30:32 +0800 |
commit | 5ec634939e2207a264453feb1b975575a80cd545 (patch) | |
tree | dd196324796da225120fbe41e11f0db97f12ae90 | |
parent | 36a369d077490a45018cefe5b0686eb373140920 (diff) | |
download | dexon-solidity-5ec634939e2207a264453feb1b975575a80cd545.tar.gz dexon-solidity-5ec634939e2207a264453feb1b975575a80cd545.tar.zst dexon-solidity-5ec634939e2207a264453feb1b975575a80cd545.zip |
Use asCallableFunction for definition clashes in the same contract.
-rw-r--r-- | libsolidity/analysis/TypeChecker.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libsolidity/analysis/TypeChecker.cpp b/libsolidity/analysis/TypeChecker.cpp index 9f3ba95f..6295e083 100644 --- a/libsolidity/analysis/TypeChecker.cpp +++ b/libsolidity/analysis/TypeChecker.cpp @@ -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); |