From 79177de80b83eeecc41f49690c0e70485d75937f Mon Sep 17 00:00:00 2001 From: LianaHus Date: Wed, 4 Nov 2015 14:49:54 +0100 Subject: [PATCH] fixed return valu for resolver --- libsolidity/analysis/NameAndTypeResolver.cpp | 8 ++++---- libsolidity/analysis/ReferencesResolver.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/libsolidity/analysis/NameAndTypeResolver.cpp b/libsolidity/analysis/NameAndTypeResolver.cpp index 92ba25c63..cf03c808f 100644 --- a/libsolidity/analysis/NameAndTypeResolver.cpp +++ b/libsolidity/analysis/NameAndTypeResolver.cpp @@ -140,13 +140,13 @@ bool NameAndTypeResolver::resolveNamesAndTypes(ContractDefinition& _contract) if (!resolver.resolve(*function)) success = false; } -// if (!result) -// return false; + if (!success) + return false; } catch (FatalError const& _e) { -// if (m_errors.empty()) -// throw; // Something is weird here, rather throw again. + if (m_errors.empty()) + throw; // Something is weird here, rather throw again. return false; } return true; diff --git a/libsolidity/analysis/ReferencesResolver.h b/libsolidity/analysis/ReferencesResolver.h index 54b34a366..34e68054a 100644 --- a/libsolidity/analysis/ReferencesResolver.h +++ b/libsolidity/analysis/ReferencesResolver.h @@ -60,7 +60,7 @@ public: bool resolve(ASTNode& _root) { _root.accept(*this); - return true;//m_errors.empty(); + return Error::containsOnlyWarnings(m_errors); } private: