diff --git a/libsolidity/analysis/FunctionCallGraph.cpp b/libsolidity/analysis/FunctionCallGraph.cpp index d7fc46999..1a6752e95 100644 --- a/libsolidity/analysis/FunctionCallGraph.cpp +++ b/libsolidity/analysis/FunctionCallGraph.cpp @@ -58,11 +58,16 @@ FunctionCallGraphBuilder::FunctionCallGraphBuilder(ContractDefinition const& _co for (FunctionTypePointer functionType: _contract.interfaceFunctionList() | views::transform(getSecondElement)) { if (auto const* funcDef = dynamic_cast(&functionType->declaration())) + { if (!m_graph->edges.count(funcDef)) visitCallable(funcDef); - // Add all external functions to the RuntimeDispatch - add(SpecialNode::Entry, &functionType->declaration()); + // Add all external functions to the RuntimeDispatch + add(SpecialNode::Entry, &functionType->declaration()); + } + else + // If it's not a function, it must be a getter of a public variable; we ignore those + solAssert(dynamic_cast(&functionType->declaration()), ""); } // Add all InternalCreationDispatch calls to the InternalDispatch as well