Fix ICE in FixedBytes IndexAccess

This commit is contained in:
Leonardo Alt
2019-11-08 17:29:40 +01:00
parent ed7be7b9c7
commit 5dacaf57bc
3 changed files with 20 additions and 0 deletions
+9
View File
@@ -766,6 +766,15 @@ void SMTEncoder::endVisit(IndexAccess const& _indexAccess)
auto varDecl = identifierToVariable(*id);
solAssert(varDecl, "");
array = m_context.variable(*varDecl);
if (varDecl->type()->category() == Type::Category::FixedBytes)
{
m_errorReporter.warning(
_indexAccess.location(),
"Assertion checker does not yet support index accessing fixed bytes."
);
return;
}
}
else if (auto const& innerAccess = dynamic_cast<IndexAccess const*>(&_indexAccess.baseExpression()))
{