From 283cdef98ca1b215a0357ce0c146a2f216f06da0 Mon Sep 17 00:00:00 2001 From: chriseth Date: Mon, 4 Jun 2018 17:00:37 +0200 Subject: [PATCH] Fix view/pure error ordering problem. --- libsolidity/analysis/ViewPureChecker.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libsolidity/analysis/ViewPureChecker.cpp b/libsolidity/analysis/ViewPureChecker.cpp index d98430120..107eb3aaa 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 contracts; + vector> 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(source->nodes())) - contracts[c] = enforceView; + contracts.emplace_back(c, enforceView); } // Check modifiers first to infer their state mutability.