aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-02-08 23:57:19 +0800
committerchriseth <chris@ethereum.org>2018-05-02 23:39:42 +0800
commit12b47a6e0b6d8f89301d233b698ef171e4953f65 (patch)
tree23f14120bd884f01efb6bc911a2282ba9310c64d
parentd3c11a49e56b04e810ebc2f6c05a6fa9a929bb2d (diff)
downloaddexon-solidity-12b47a6e0b6d8f89301d233b698ef171e4953f65.tar.gz
dexon-solidity-12b47a6e0b6d8f89301d233b698ef171e4953f65.tar.zst
dexon-solidity-12b47a6e0b6d8f89301d233b698ef171e4953f65.zip
Assert function hoister and grouper has been used.
-rw-r--r--libjulia/optimiser/FullInliner.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/libjulia/optimiser/FullInliner.cpp b/libjulia/optimiser/FullInliner.cpp
index 30c53774..96116ac3 100644
--- a/libjulia/optimiser/FullInliner.cpp
+++ b/libjulia/optimiser/FullInliner.cpp
@@ -44,10 +44,12 @@ FullInliner::FullInliner(Block& _ast):
m_ast(_ast)
{
solAssert(m_ast.statements.size() >= 1, "");
+ solAssert(m_ast.statements.front().type() == typeid(Block), "");
m_nameDispenser.m_usedNames = NameCollector(m_ast).names();
for (size_t i = 1; i < m_ast.statements.size(); ++i)
{
+ solAssert(m_ast.statements.at(i).type() == typeid(FunctionDefinition), "");
FunctionDefinition& fun = boost::get<FunctionDefinition>(m_ast.statements.at(i));
m_functions[fun.name] = &fun;
m_functionsToVisit.insert(&fun);