diff options
author | chriseth <chris@ethereum.org> | 2018-06-04 23:00:37 +0800 |
---|---|---|
committer | chriseth <chris@ethereum.org> | 2018-06-04 23:00:37 +0800 |
commit | 283cdef98ca1b215a0357ce0c146a2f216f06da0 (patch) | |
tree | d8a899caccc8853849d391e44fbfd7866454bea0 | |
parent | e58ffda9fd215a3cccd0f0d9ce1951c386901f81 (diff) | |
download | dexon-solidity-283cdef98ca1b215a0357ce0c146a2f216f06da0.tar dexon-solidity-283cdef98ca1b215a0357ce0c146a2f216f06da0.tar.gz dexon-solidity-283cdef98ca1b215a0357ce0c146a2f216f06da0.tar.bz2 dexon-solidity-283cdef98ca1b215a0357ce0c146a2f216f06da0.tar.lz dexon-solidity-283cdef98ca1b215a0357ce0c146a2f216f06da0.tar.xz dexon-solidity-283cdef98ca1b215a0357ce0c146a2f216f06da0.tar.zst dexon-solidity-283cdef98ca1b215a0357ce0c146a2f216f06da0.zip |
Fix view/pure error ordering problem.
-rw-r--r-- | libsolidity/analysis/ViewPureChecker.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libsolidity/analysis/ViewPureChecker.cpp b/libsolidity/analysis/ViewPureChecker.cpp index d9843012..107eb3aa 100644 --- a/libsolidity/analysis/ViewPureChecker.cpp +++ b/libsolidity/analysis/ViewPureChecker.cpp @@ -117,7 +117,7 @@ private: bool ViewPureChecker::check() { // The bool means "enforce view with errors". - map<ContractDefinition const*, bool> contracts; + vector<pair<ContractDefinition const*, bool>> contracts; for (auto const& node: m_ast) { @@ -125,7 +125,7 @@ bool ViewPureChecker::check() solAssert(source, ""); bool enforceView = source->annotation().experimentalFeatures.count(ExperimentalFeature::V050); for (ContractDefinition const* c: source->filteredNodes<ContractDefinition>(source->nodes())) - contracts[c] = enforceView; + contracts.emplace_back(c, enforceView); } // Check modifiers first to infer their state mutability. |