Visit case bodies in scope filler

This commit is contained in:
Alex Beregszaszi
2017-05-26 03:20:34 +01:00
parent 0c5c1ca911
commit d745dd6542
2 changed files with 10 additions and 1 deletions
+9
View File
@@ -97,6 +97,15 @@ bool ScopeFiller::operator()(assembly::FunctionDefinition const& _funDef)
return success;
}
bool ScopeFiller::operator()(Switch const& _switch)
{
bool success = true;
for (auto const& _case: _switch.cases)
if (!(*this)(_case.body))
success = false;
return success;
}
bool ScopeFiller::operator()(Block const& _block)
{
bool success = true;