IRGeneratorForStatements: Fix undefined order of functions when generating code for index expressions

This commit is contained in:
Kamil Śliwak
2023-07-13 11:06:11 +02:00
parent 69c034b1c0
commit 16220db759
2 changed files with 3 additions and 1 deletions
@@ -2295,8 +2295,9 @@ void IRGeneratorForStatements::endVisit(IndexAccess const& _indexAccess)
}
case DataLocation::Memory:
{
string indexAccessFunction = m_utils.memoryArrayIndexAccessFunction(arrayType);
string const memAddress =
m_utils.memoryArrayIndexAccessFunction(arrayType) +
indexAccessFunction +
"(" +
IRVariable(_indexAccess.baseExpression()).part("mpos").name() +
", " +