diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2017-10-05 21:04:16 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-05 21:04:16 +0800 |
commit | 8b26d65b62f54083e1bec02b34994962770b420f (patch) | |
tree | c14630e18f3ed34b5bb3e8b3f373cb127a4dd893 /libsolidity | |
parent | 6ba0c2bba85ba099b10c58d1c7d10d91e1364471 (diff) | |
parent | 10529e994f9a587436c57bfdeef52476da9770bb (diff) | |
download | dexon-solidity-8b26d65b62f54083e1bec02b34994962770b420f.tar dexon-solidity-8b26d65b62f54083e1bec02b34994962770b420f.tar.gz dexon-solidity-8b26d65b62f54083e1bec02b34994962770b420f.tar.bz2 dexon-solidity-8b26d65b62f54083e1bec02b34994962770b420f.tar.lz dexon-solidity-8b26d65b62f54083e1bec02b34994962770b420f.tar.xz dexon-solidity-8b26d65b62f54083e1bec02b34994962770b420f.tar.zst dexon-solidity-8b26d65b62f54083e1bec02b34994962770b420f.zip |
Merge pull request #3020 from ethereum/smt-functioncall
SMT should not crash on special function calls (typecast)
Diffstat (limited to 'libsolidity')
-rw-r--r-- | libsolidity/formal/SMTChecker.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libsolidity/formal/SMTChecker.cpp b/libsolidity/formal/SMTChecker.cpp index fd78e578..7c8c089e 100644 --- a/libsolidity/formal/SMTChecker.cpp +++ b/libsolidity/formal/SMTChecker.cpp @@ -234,6 +234,16 @@ void SMTChecker::endVisit(BinaryOperation const& _op) void SMTChecker::endVisit(FunctionCall const& _funCall) { + solAssert(_funCall.annotation().kind != FunctionCallKind::Unset, ""); + if (_funCall.annotation().kind != FunctionCallKind::FunctionCall) + { + m_errorReporter.warning( + _funCall.location(), + "Assertion checker does not yet implement this expression." + ); + return; + } + FunctionType const& funType = dynamic_cast<FunctionType const&>(*_funCall.expression().annotation().type); std::vector<ASTPointer<Expression const>> const args = _funCall.arguments(); |