MCPcopy Create free account
hub / github.com/argotorg/solidity / nextConstructor

Method nextConstructor

libsolidity/ast/AST.cpp:348–362  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

346}
347
348FunctionDefinition const* ContractDefinition::nextConstructor(ContractDefinition const& _mostDerivedContract) const
349{
350 ContractDefinition const* next = superContract(_mostDerivedContract);
351 if (next == nullptr)
352 return nullptr;
353 for (ContractDefinition const* c: _mostDerivedContract.annotation().linearizedBaseContracts)
354 if (c == next || next == nullptr)
355 {
356 if (c->constructor())
357 return c->constructor();
358 next = nullptr;
359 }
360
361 return nullptr;
362}
363
364std::multimap<std::string, FunctionDefinition const*> const& ContractDefinition::definedFunctionsByName() const
365{

Callers 2

visitMethod · 0.80

Calls 1

constructorMethod · 0.45

Tested by

no test coverage detected