mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Ignore break and continue outside of loops.
This commit is contained in:
parent
e30d3f8d53
commit
d1df8b810f
@ -252,16 +252,14 @@ bool Compiler::visit(WhileStatement& _whileStatement)
|
|||||||
|
|
||||||
bool Compiler::visit(Continue&)
|
bool Compiler::visit(Continue&)
|
||||||
{
|
{
|
||||||
if (asserts(!m_continueTags.empty()))
|
if (!m_continueTags.empty())
|
||||||
BOOST_THROW_EXCEPTION(InternalCompilerError() << errinfo_comment("Jump tag not available for \"continue\"."));
|
|
||||||
m_context.appendJumpTo(m_continueTags.back());
|
m_context.appendJumpTo(m_continueTags.back());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Compiler::visit(Break&)
|
bool Compiler::visit(Break&)
|
||||||
{
|
{
|
||||||
if (asserts(!m_breakTags.empty()))
|
if (!m_breakTags.empty())
|
||||||
BOOST_THROW_EXCEPTION(InternalCompilerError() << errinfo_comment("Jump tag not available for \"break\"."));
|
|
||||||
m_context.appendJumpTo(m_breakTags.back());
|
m_context.appendJumpTo(m_breakTags.back());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user