mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Do not create a new TypeChecker instance for every contract
This commit is contained in:
parent
670df8e874
commit
e6f55fb95e
@ -200,14 +200,12 @@ bool CompilerStack::analyze()
|
||||
m_contracts[contract->fullyQualifiedName()].contract = contract;
|
||||
}
|
||||
|
||||
TypeChecker typeChecker(m_errorReporter);
|
||||
for (Source const* source: m_sourceOrder)
|
||||
for (ASTPointer<ASTNode> const& node: source->ast->nodes())
|
||||
if (ContractDefinition* contract = dynamic_cast<ContractDefinition*>(node.get()))
|
||||
{
|
||||
TypeChecker typeChecker(m_errorReporter);
|
||||
if (!typeChecker.checkTypeRequirements(*contract))
|
||||
noErrors = false;
|
||||
}
|
||||
|
||||
if (noErrors)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user