Merge pull request #4770 from ethereum/throw-codegen

Remove code generation for Throw statement
This commit is contained in:
Alex Beregszaszi 2018-08-08 17:55:27 +01:00 committed by GitHub
commit 9d782cc39c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;
} }