mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
[SMTChecker] Fix internal error on try/catch
This commit is contained in:
@@ -274,6 +274,20 @@ bool SMTEncoder::visit(InlineAssembly const& _inlineAsm)
|
||||
return false;
|
||||
}
|
||||
|
||||
bool SMTEncoder::visit(TryCatchClause const& _clause)
|
||||
{
|
||||
if (auto params = _clause.parameters())
|
||||
for (auto const& var: params->parameters())
|
||||
createVariable(*var);
|
||||
|
||||
m_errorReporter.warning(
|
||||
7645_error,
|
||||
_clause.location(),
|
||||
"Assertion checker does not support try/catch clauses."
|
||||
);
|
||||
return false;
|
||||
}
|
||||
|
||||
bool SMTEncoder::visit(IfStatement const& _node)
|
||||
{
|
||||
_node.condition().accept(*this);
|
||||
|
||||
@@ -91,6 +91,7 @@ protected:
|
||||
bool visit(InlineAssembly const& _node) override;
|
||||
void endVisit(Break const&) override {}
|
||||
void endVisit(Continue const&) override {}
|
||||
bool visit(TryCatchClause const& _node) override;
|
||||
|
||||
/// Do not visit subtree if node is a RationalNumber.
|
||||
/// Symbolic _expr is the rational literal.
|
||||
|
||||
Reference in New Issue
Block a user