mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Remove code generation for Throw statement
It is disallowed in the type system.
This commit is contained in:
parent
9062704054
commit
a9819aa8bc
@ -779,11 +779,9 @@ bool ContractCompiler::visit(Return const& _return)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ContractCompiler::visit(Throw const& _throw)
|
bool ContractCompiler::visit(Throw const&)
|
||||||
{
|
{
|
||||||
CompilerContext::LocationSetter locationSetter(m_context, _throw);
|
solAssert(false, "Throw statement is disallowed.");
|
||||||
// Do not send back an error detail.
|
|
||||||
m_context.appendRevert();
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user