Remove code generation for Throw statement

It is disallowed in the type system.
This commit is contained in:
Alex Beregszaszi
2018-08-08 17:02:25 +01:00
parent 9062704054
commit a9819aa8bc
+2 -4
View File
@@ -779,11 +779,9 @@ bool ContractCompiler::visit(Return const& _return)
return false;
}
bool ContractCompiler::visit(Throw const& _throw)
bool ContractCompiler::visit(Throw const&)
{
CompilerContext::LocationSetter locationSetter(m_context, _throw);
// Do not send back an error detail.
m_context.appendRevert();
solAssert(false, "Throw statement is disallowed.");
return false;
}