mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
[SMTChecker] Fix ICE on array.pop nested inside 1-tuple
This commit is contained in:
@@ -774,7 +774,7 @@ void CHC::makeArrayPopVerificationTarget(FunctionCall const& _arrayPop)
|
||||
FunctionType const& funType = dynamic_cast<FunctionType const&>(*_arrayPop.expression().annotation().type);
|
||||
solAssert(funType.kind() == FunctionType::Kind::ArrayPop, "");
|
||||
|
||||
auto memberAccess = dynamic_cast<MemberAccess const*>(&_arrayPop.expression());
|
||||
auto memberAccess = dynamic_cast<MemberAccess const*>(cleanExpression(_arrayPop.expression()));
|
||||
solAssert(memberAccess, "");
|
||||
auto symbArray = dynamic_pointer_cast<SymbolicArrayVariable>(m_context.expression(memberAccess->expression()));
|
||||
solAssert(symbArray, "");
|
||||
|
||||
@@ -444,6 +444,9 @@ void SMTEncoder::endVisit(Assignment const& _assignment)
|
||||
|
||||
void SMTEncoder::endVisit(TupleExpression const& _tuple)
|
||||
{
|
||||
if (_tuple.annotation().type->category() == Type::Category::Function)
|
||||
return;
|
||||
|
||||
createExpr(_tuple);
|
||||
|
||||
if (_tuple.isInlineArray())
|
||||
@@ -1624,7 +1627,7 @@ void SMTEncoder::arrayPush(FunctionCall const& _funCall)
|
||||
|
||||
void SMTEncoder::arrayPop(FunctionCall const& _funCall)
|
||||
{
|
||||
auto memberAccess = dynamic_cast<MemberAccess const*>(&_funCall.expression());
|
||||
auto memberAccess = dynamic_cast<MemberAccess const*>(cleanExpression(_funCall.expression()));
|
||||
solAssert(memberAccess, "");
|
||||
auto symbArray = dynamic_pointer_cast<smt::SymbolicArrayVariable>(m_context.expression(memberAccess->expression()));
|
||||
solAssert(symbArray, "");
|
||||
|
||||
Reference in New Issue
Block a user