From 372853b19227752a790b9dd551a1c3bea2b9840d Mon Sep 17 00:00:00 2001 From: chriseth Date: Mon, 18 Feb 2019 18:08:33 +0100 Subject: [PATCH] Make analysis success not only dependent on flag but also on error list. --- libyul/AsmAnalysis.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libyul/AsmAnalysis.cpp b/libyul/AsmAnalysis.cpp index 044b0780b..f898f70c0 100644 --- a/libyul/AsmAnalysis.cpp +++ b/libyul/AsmAnalysis.cpp @@ -52,7 +52,10 @@ bool AsmAnalyzer::analyze(Block const& _block) if (!(ScopeFiller(m_info, m_errorReporter))(_block)) return false; - return (*this)(_block); + bool success = (*this)(_block); + if (!success) + solAssert(m_errorReporter.hasErrors(), "No success but no error."); + return success && !m_errorReporter.hasErrors(); } AsmAnalysisInfo AsmAnalyzer::analyzeStrictAssertCorrect(