Also save and restore the nesting depth.

This commit is contained in:
chriseth 2022-03-02 13:49:40 +01:00
parent 2bcb027533
commit 63f0a22c5d

View File

@ -73,6 +73,7 @@ void UnusedStoreBase::operator()(FunctionDefinition const& _functionDefinition)
{
ScopedSaveAndRestore outerAssignments(m_stores, {});
ScopedSaveAndRestore forLoopInfo(m_forLoopInfo, {});
ScopedSaveAndRestore forLoopNestingDepth(m_forLoopNestingDepth, 0);
(*this)(_functionDefinition.body);