Merge pull request #9068 from ethereum/smt_fix_state_var_init_call

[SMTChecker] Relax assertion about callstack
This commit is contained in:
Leonardo
2020-06-02 15:53:14 +02:00
committed by GitHub
2 changed files with 13 additions and 2 deletions
+1 -2
View File
@@ -104,8 +104,7 @@ void VariableUsage::checkIdentifier(Identifier const& _identifier)
solAssert(declaration, "");
if (VariableDeclaration const* varDecl = dynamic_cast<VariableDeclaration const*>(declaration))
{
solAssert(m_lastCall, "");
if (!varDecl->isLocalVariable() || varDecl->functionOrModifierDefinition() == m_lastCall)
if (!varDecl->isLocalVariable() || (m_lastCall && varDecl->functionOrModifierDefinition() == m_lastCall))
m_touchedVariables.insert(varDecl);
}
}