aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/formal/SMTChecker.cpp
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2017-10-04 19:18:40 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2017-10-05 18:41:11 +0800
commit10529e994f9a587436c57bfdeef52476da9770bb (patch)
treec99524c75ed6fd9ab82c0a775c188177640e4038 /libsolidity/formal/SMTChecker.cpp
parent19274c78904632d568bf56e95603d22ef091ce77 (diff)
downloaddexon-solidity-10529e994f9a587436c57bfdeef52476da9770bb.tar
dexon-solidity-10529e994f9a587436c57bfdeef52476da9770bb.tar.gz
dexon-solidity-10529e994f9a587436c57bfdeef52476da9770bb.tar.bz2
dexon-solidity-10529e994f9a587436c57bfdeef52476da9770bb.tar.lz
dexon-solidity-10529e994f9a587436c57bfdeef52476da9770bb.tar.xz
dexon-solidity-10529e994f9a587436c57bfdeef52476da9770bb.tar.zst
dexon-solidity-10529e994f9a587436c57bfdeef52476da9770bb.zip
SMT should not crash on typecast/structs
Diffstat (limited to 'libsolidity/formal/SMTChecker.cpp')
-rw-r--r--libsolidity/formal/SMTChecker.cpp10
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();