diff options
author | chriseth <chris@ethereum.org> | 2018-04-13 03:01:08 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-13 03:01:08 +0800 |
commit | 7054defdd6c202d0943c11cb87ac2748b9bdc62b (patch) | |
tree | 8a69eb34b9089b689d5f467b8cb56b4a74ad04b8 /libsolidity/analysis/TypeChecker.cpp | |
parent | 44416d1ac65b2cfae4bb15d39bc84b1a78211baa (diff) | |
parent | 966367305ad511900bedfd9af08114a0b1307399 (diff) | |
download | dexon-solidity-7054defdd6c202d0943c11cb87ac2748b9bdc62b.tar dexon-solidity-7054defdd6c202d0943c11cb87ac2748b9bdc62b.tar.gz dexon-solidity-7054defdd6c202d0943c11cb87ac2748b9bdc62b.tar.bz2 dexon-solidity-7054defdd6c202d0943c11cb87ac2748b9bdc62b.tar.lz dexon-solidity-7054defdd6c202d0943c11cb87ac2748b9bdc62b.tar.xz dexon-solidity-7054defdd6c202d0943c11cb87ac2748b9bdc62b.tar.zst dexon-solidity-7054defdd6c202d0943c11cb87ac2748b9bdc62b.zip |
Merge pull request #3364 from ethereum/revertWithReason
Revert with reason
Diffstat (limited to 'libsolidity/analysis/TypeChecker.cpp')
-rw-r--r-- | libsolidity/analysis/TypeChecker.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/libsolidity/analysis/TypeChecker.cpp b/libsolidity/analysis/TypeChecker.cpp index b95fee38..f4df4c94 100644 --- a/libsolidity/analysis/TypeChecker.cpp +++ b/libsolidity/analysis/TypeChecker.cpp @@ -2146,10 +2146,9 @@ bool TypeChecker::visit(Identifier const& _identifier) for (Declaration const* declaration: annotation.overloadedDeclarations) { - TypePointer function = declaration->type(); - solAssert(!!function, "Requested type not present."); - auto const* functionType = dynamic_cast<FunctionType const*>(function.get()); - if (functionType && functionType->canTakeArguments(*annotation.argumentTypes)) + FunctionTypePointer functionType = declaration->functionType(true); + solAssert(!!functionType, "Requested type not present."); + if (functionType->canTakeArguments(*annotation.argumentTypes)) candidates.push_back(declaration); } if (candidates.empty()) |