diff options
author | chriseth <chris@ethereum.org> | 2017-03-07 00:18:39 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-07 00:18:39 +0800 |
commit | a2ac05e1a2cee0be25234d5f595e8adf2372fb88 (patch) | |
tree | 5b2a3781b9573f6c615a96935a47238b49ca3bb7 /libsolidity/interface | |
parent | 2fcccb97d393cfc6eb5120029d1ec2d6526c0bd0 (diff) | |
parent | efdfacaaeca0bf5fd900ed885e05fb15b282d5cf (diff) | |
download | dexon-solidity-a2ac05e1a2cee0be25234d5f595e8adf2372fb88.tar dexon-solidity-a2ac05e1a2cee0be25234d5f595e8adf2372fb88.tar.gz dexon-solidity-a2ac05e1a2cee0be25234d5f595e8adf2372fb88.tar.bz2 dexon-solidity-a2ac05e1a2cee0be25234d5f595e8adf2372fb88.tar.lz dexon-solidity-a2ac05e1a2cee0be25234d5f595e8adf2372fb88.tar.xz dexon-solidity-a2ac05e1a2cee0be25234d5f595e8adf2372fb88.tar.zst dexon-solidity-a2ac05e1a2cee0be25234d5f595e8adf2372fb88.zip |
Merge pull request #1733 from ethereum/selfReferentialConstant
Detect cyclic dependencies between constants.
Diffstat (limited to 'libsolidity/interface')
-rw-r--r-- | libsolidity/interface/CompilerStack.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
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 <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> @@ -219,6 +220,14 @@ bool CompilerStack::parse() 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); for (Source const* source: m_sourceOrder) if (!staticAnalyzer.analyze(*source->ast)) |