diff options
author | Federico Bond <federicobond@gmail.com> | 2017-04-09 05:43:33 +0800 |
---|---|---|
committer | Federico Bond <federicobond@gmail.com> | 2017-04-09 05:45:15 +0800 |
commit | e6f13353f251d450880768ab69c862dbc3cf3e8e (patch) | |
tree | 3b8d8c42ec7da5dce78ba391a5decf0e8171049a | |
parent | fefb3fad6fa20b9c99dd987a7869c297b279032e (diff) | |
download | dexon-solidity-e6f13353f251d450880768ab69c862dbc3cf3e8e.tar.gz dexon-solidity-e6f13353f251d450880768ab69c862dbc3cf3e8e.tar.zst dexon-solidity-e6f13353f251d450880768ab69c862dbc3cf3e8e.zip |
Fix PostTypeChecker retaining state across contracts
-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) |