aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/codegen
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2018-08-08 06:38:08 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2018-08-09 00:02:25 +0800
commita9819aa8bc68a35414aaa280d829018669ec770f (patch)
tree90506db1fdabef08b8cf27ebafe9997bf3775bf5 /libsolidity/codegen
parent90627040545f0257b01cc24f95edea1c89cdbbf3 (diff)
downloaddexon-solidity-a9819aa8bc68a35414aaa280d829018669ec770f.tar
dexon-solidity-a9819aa8bc68a35414aaa280d829018669ec770f.tar.gz
dexon-solidity-a9819aa8bc68a35414aaa280d829018669ec770f.tar.bz2
dexon-solidity-a9819aa8bc68a35414aaa280d829018669ec770f.tar.lz
dexon-solidity-a9819aa8bc68a35414aaa280d829018669ec770f.tar.xz
dexon-solidity-a9819aa8bc68a35414aaa280d829018669ec770f.tar.zst
dexon-solidity-a9819aa8bc68a35414aaa280d829018669ec770f.zip
Remove code generation for Throw statement
It is disallowed in the type system.
Diffstat (limited to 'libsolidity/codegen')
-rw-r--r--libsolidity/codegen/ContractCompiler.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/libsolidity/codegen/ContractCompiler.cpp b/libsolidity/codegen/ContractCompiler.cpp
index 02274d60..e26bc13a 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;
}