From d1cc731843507f81451ea8d898799d2d1659e128 Mon Sep 17 00:00:00 2001 From: chriseth Date: Thu, 29 Nov 2018 18:18:17 +0100 Subject: No need to visit structs early. --- libsolidity/analysis/TypeChecker.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'libsolidity') diff --git a/libsolidity/analysis/TypeChecker.cpp b/libsolidity/analysis/TypeChecker.cpp index 0ae7ee7a..3572943b 100644 --- a/libsolidity/analysis/TypeChecker.cpp +++ b/libsolidity/analysis/TypeChecker.cpp @@ -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 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 -- cgit v1.2.3