Properly set source location of bare blocks.

This commit is contained in:
chriseth
2021-05-31 18:28:17 +02:00
parent ececf7fec9
commit 0623658ddd
3 changed files with 40 additions and 0 deletions
+2
View File
@@ -1354,6 +1354,7 @@ bool ContractCompiler::visit(PlaceholderStatement const& _placeholderStatement)
bool ContractCompiler::visit(Block const& _block)
{
m_context.pushVisitedNodes(&_block);
if (_block.unchecked())
{
solAssert(m_context.arithmetic() == Arithmetic::Checked, "");
@@ -1372,6 +1373,7 @@ void ContractCompiler::endVisit(Block const& _block)
}
// Frees local variables declared in the scope of this block.
popScopedVariables(&_block);
m_context.popVisitedNodes();
}
void ContractCompiler::appendMissingFunctions()