From 5c5d83fd704e18f88d80e346386e97ed600b7281 Mon Sep 17 00:00:00 2001 From: chriseth Date: Fri, 3 Mar 2017 12:51:51 +0100 Subject: Check for circular references in constant variables. --- libsolidity/interface/CompilerStack.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'libsolidity/interface') diff --git a/libsolidity/interface/CompilerStack.cpp b/libsolidity/interface/CompilerStack.cpp index 9d8d872f..594efb1e 100644 --- a/libsolidity/interface/CompilerStack.cpp +++ b/libsolidity/interface/CompilerStack.cpp @@ -34,6 +34,7 @@ #include #include #include +#include #include #include #include @@ -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); -- cgit