mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
[FIXUP] Minor refactor
This commit is contained in:
parent
467a8b318b
commit
bdd35badb8
@ -57,11 +57,14 @@ FunctionCallGraphBuilder::FunctionCallGraphBuilder(ContractDefinition const& _co
|
||||
|
||||
for (FunctionTypePointer functionType: _contract.interfaceFunctionList() | views::transform(getSecondElement))
|
||||
{
|
||||
if (auto const* funcDef = dynamic_cast<FunctionDefinition const*>(&functionType->declaration()))
|
||||
processFunction(*funcDef);
|
||||
auto const* function = dynamic_cast<FunctionDefinition const*>(&functionType->declaration());
|
||||
auto const* variable = dynamic_cast<VariableDeclaration const*>(&functionType->declaration());
|
||||
|
||||
if (function)
|
||||
processFunction(*function);
|
||||
else
|
||||
// If it's not a function, it must be a getter of a public variable; we ignore those
|
||||
solAssert(dynamic_cast<VariableDeclaration const*>(&functionType->declaration()), "");
|
||||
solAssert(variable, "");
|
||||
}
|
||||
|
||||
// Add all InternalCreationDispatch calls to the InternalDispatch as well
|
||||
@ -115,11 +118,7 @@ bool FunctionCallGraphBuilder::visit(Identifier const& _identifier)
|
||||
|
||||
// For events kind() == Event, so we have an extra check here
|
||||
if (funType && funType->kind() == FunctionType::Kind::Internal)
|
||||
{
|
||||
processFunction(callable->resolveVirtual(*m_contract), _identifier.annotation().calledDirectly);
|
||||
|
||||
solAssert(m_currentNode.has_value(), "");
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user