mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Make function block scope variables go out of scope
This commit is contained in:
parent
fba2f0a4ca
commit
1a7bd4681a
@ -1166,8 +1166,18 @@ void ProtoConverter::closeBlockScope()
|
||||
if (!m_scopeFuncs.empty())
|
||||
m_scopeFuncs.pop_back();
|
||||
if (!m_inFunctionDef)
|
||||
{
|
||||
if (!m_variables.empty())
|
||||
m_variables.pop_back();
|
||||
}
|
||||
else
|
||||
{
|
||||
// Variables that have been declared in a
|
||||
// function block, go out of scope
|
||||
if (!m_funcVars.empty())
|
||||
if (!m_funcVars.back().empty())
|
||||
m_funcVars.back().pop_back();
|
||||
}
|
||||
}
|
||||
|
||||
void ProtoConverter::closeFunctionScope()
|
||||
|
@ -55,8 +55,7 @@ void printErrors(ostream& _stream, ErrorList const& _errors)
|
||||
|
||||
DEFINE_PROTO_FUZZER(Program const& _input)
|
||||
{
|
||||
ProtoConverter converter;
|
||||
string yul_source = converter.programToString(_input);
|
||||
string yul_source = ProtoConverter().programToString(_input);
|
||||
|
||||
if (const char* dump_path = getenv("PROTO_FUZZER_DUMP_PATH"))
|
||||
{
|
||||
@ -82,7 +81,7 @@ DEFINE_PROTO_FUZZER(Program const& _input)
|
||||
!stack.parserResult()->analysisInfo)
|
||||
{
|
||||
printErrors(std::cout, stack.errors());
|
||||
return;
|
||||
yulAssert(false, "Proto fuzzer generated malformed program");
|
||||
}
|
||||
}
|
||||
catch (Exception const&)
|
||||
|
Loading…
Reference in New Issue
Block a user