mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
No need to visit structs early.
This commit is contained in:
parent
621ce3df20
commit
d1cc731843
@ -88,11 +88,6 @@ bool TypeChecker::visit(ContractDefinition const& _contract)
|
||||
{
|
||||
m_scope = &_contract;
|
||||
|
||||
// We force our own visiting order here. The structs have to be excluded below.
|
||||
set<ASTNode const*> visited;
|
||||
for (auto const& s: _contract.definedStructs())
|
||||
visited.insert(s);
|
||||
ASTNode::listAccept(_contract.definedStructs(), *this);
|
||||
ASTNode::listAccept(_contract.baseContracts(), *this);
|
||||
|
||||
FunctionDefinition const* function = _contract.constructor();
|
||||
@ -132,8 +127,7 @@ bool TypeChecker::visit(ContractDefinition const& _contract)
|
||||
}
|
||||
|
||||
for (auto const& n: _contract.subNodes())
|
||||
if (!visited.count(n.get()))
|
||||
n->accept(*this);
|
||||
n->accept(*this);
|
||||
|
||||
checkContractExternalTypeClashes(_contract);
|
||||
// check for hash collisions in function signatures
|
||||
|
Loading…
Reference in New Issue
Block a user