From a9819aa8bc68a35414aaa280d829018669ec770f Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Tue, 7 Aug 2018 23:38:08 +0100 Subject: [PATCH] Remove code generation for Throw statement It is disallowed in the type system. --- libsolidity/codegen/ContractCompiler.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/libsolidity/codegen/ContractCompiler.cpp b/libsolidity/codegen/ContractCompiler.cpp index 02274d60a..e26bc13ac 100644 --- a/libsolidity/codegen/ContractCompiler.cpp +++ b/libsolidity/codegen/ContractCompiler.cpp @@ -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; }