aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/analysis
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-11-30 01:18:17 +0800
committerchriseth <chris@ethereum.org>2018-11-30 23:30:19 +0800
commitd1cc731843507f81451ea8d898799d2d1659e128 (patch)
tree61f95b78bedfb6c63343777868750ed6c3b3c0fe /libsolidity/analysis
parent621ce3df20ad019cf3e86cc2bbae22a59610847f (diff)
downloaddexon-solidity-d1cc731843507f81451ea8d898799d2d1659e128.tar.gz
dexon-solidity-d1cc731843507f81451ea8d898799d2d1659e128.tar.zst
dexon-solidity-d1cc731843507f81451ea8d898799d2d1659e128.zip
No need to visit structs early.
Diffstat (limited to 'libsolidity/analysis')
-rw-r--r--libsolidity/analysis/TypeChecker.cpp8
1 files changed, 1 insertions, 7 deletions
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<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