mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Check for circular references in constant variables.
This commit is contained in:
@@ -34,6 +34,7 @@
|
||||
#include <libsolidity/analysis/TypeChecker.h>
|
||||
#include <libsolidity/analysis/DocStringAnalyser.h>
|
||||
#include <libsolidity/analysis/StaticAnalyzer.h>
|
||||
#include <libsolidity/analysis/PostTypeChecker.h>
|
||||
#include <libsolidity/analysis/SyntaxChecker.h>
|
||||
#include <libsolidity/codegen/Compiler.h>
|
||||
#include <libsolidity/interface/InterfaceHandler.h>
|
||||
@@ -217,6 +218,14 @@ bool CompilerStack::parse()
|
||||
m_contracts[contract->fullyQualifiedName()].contract = contract;
|
||||
}
|
||||
|
||||
if (noErrors)
|
||||
{
|
||||
PostTypeChecker postTypeChecker(m_errors);
|
||||
for (Source const* source: m_sourceOrder)
|
||||
if (!postTypeChecker.check(*source->ast))
|
||||
noErrors = false;
|
||||
}
|
||||
|
||||
if (noErrors)
|
||||
{
|
||||
StaticAnalyzer staticAnalyzer(m_errors);
|
||||
|
||||
Reference in New Issue
Block a user