aboutsummaryrefslogtreecommitdiffstats
path: root/CompilerStack.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'CompilerStack.cpp')
-rw-r--r--CompilerStack.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/CompilerStack.cpp b/CompilerStack.cpp
index 23f5fd68..1242c0ab 100644
--- a/CompilerStack.cpp
+++ b/CompilerStack.cpp
@@ -73,6 +73,15 @@ void CompilerStack::parse()
resolver.resolveNamesAndTypes(*contract);
m_contracts[contract->getName()].contract = contract;
}
+ for (Source const* source: m_sourceOrder)
+ for (ASTPointer<ASTNode> const& node: source->ast->getNodes())
+ if (ContractDefinition* contract = dynamic_cast<ContractDefinition*>(node.get()))
+ {
+ m_globalContext->setCurrentContract(*contract);
+ resolver.updateDeclaration(*m_globalContext->getCurrentThis());
+ resolver.checkTypeRequirements(*contract);
+ m_contracts[contract->getName()].contract = contract;
+ }
m_parseSuccessful = true;
}