diff options
author | chriseth <chris@ethereum.org> | 2017-05-02 18:12:46 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-02 18:12:46 +0800 |
commit | 2891b98882160c15a68b5166e3493ec8e7b21f7f (patch) | |
tree | 85c111da6828e93a8481549f4d4d9859f551d201 /libsolidity/analysis | |
parent | f77f2123f0f5eef949831670609a0e85c9bd9056 (diff) | |
parent | e6f13353f251d450880768ab69c862dbc3cf3e8e (diff) | |
download | dexon-solidity-2891b98882160c15a68b5166e3493ec8e7b21f7f.tar dexon-solidity-2891b98882160c15a68b5166e3493ec8e7b21f7f.tar.gz dexon-solidity-2891b98882160c15a68b5166e3493ec8e7b21f7f.tar.bz2 dexon-solidity-2891b98882160c15a68b5166e3493ec8e7b21f7f.tar.lz dexon-solidity-2891b98882160c15a68b5166e3493ec8e7b21f7f.tar.xz dexon-solidity-2891b98882160c15a68b5166e3493ec8e7b21f7f.tar.zst dexon-solidity-2891b98882160c15a68b5166e3493ec8e7b21f7f.zip |
Merge pull request #2110 from federicobond/fix-posttypechecker
Fix PostTypeChecker retaining state across contracts
Diffstat (limited to 'libsolidity/analysis')
-rw-r--r-- | libsolidity/analysis/PostTypeChecker.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libsolidity/analysis/PostTypeChecker.cpp b/libsolidity/analysis/PostTypeChecker.cpp index cae77c74..e8da3ca4 100644 --- a/libsolidity/analysis/PostTypeChecker.cpp +++ b/libsolidity/analysis/PostTypeChecker.cpp @@ -58,6 +58,9 @@ void PostTypeChecker::endVisit(ContractDefinition const&) for (auto declaration: m_constVariables) if (auto identifier = findCycle(declaration)) typeError(declaration->location(), "The value of the constant " + declaration->name() + " has a cyclic dependency via " + identifier->name() + "."); + + m_constVariables.clear(); + m_constVariableDependencies.clear(); } bool PostTypeChecker::visit(VariableDeclaration const& _variable) |