From 12b47a6e0b6d8f89301d233b698ef171e4953f65 Mon Sep 17 00:00:00 2001 From: chriseth Date: Thu, 8 Feb 2018 16:57:19 +0100 Subject: Assert function hoister and grouper has been used. --- libjulia/optimiser/FullInliner.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libjulia/optimiser') 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(m_ast.statements.at(i)); m_functions[fun.name] = &fun; m_functionsToVisit.insert(&fun); -- cgit v1.2.3