mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Fix infinite recursion in function call graph generator due to recursive constant references.
This commit is contained in:
@@ -480,13 +480,6 @@ bool CompilerStack::analyze()
|
||||
if (source->ast && !typeChecker.checkTypeRequirements(*source->ast))
|
||||
noErrors = false;
|
||||
|
||||
// Create & assign callgraphs and check for contract dependency cycles
|
||||
if (noErrors)
|
||||
{
|
||||
createAndAssignCallGraphs();
|
||||
findAndReportCyclicContractDependencies();
|
||||
}
|
||||
|
||||
if (noErrors)
|
||||
{
|
||||
// Checks that can only be done when all types of all AST nodes are known.
|
||||
@@ -498,6 +491,13 @@ bool CompilerStack::analyze()
|
||||
noErrors = false;
|
||||
}
|
||||
|
||||
// Create & assign callgraphs and check for contract dependency cycles
|
||||
if (noErrors)
|
||||
{
|
||||
createAndAssignCallGraphs();
|
||||
findAndReportCyclicContractDependencies();
|
||||
}
|
||||
|
||||
if (noErrors)
|
||||
for (Source const* source: m_sourceOrder)
|
||||
if (source->ast && !PostTypeContractLevelChecker{m_errorReporter}.check(*source->ast))
|
||||
|
||||
Reference in New Issue
Block a user