From 53d0684cb4dc7d7b5c9e92bf9e77383e14ecec8c Mon Sep 17 00:00:00 2001 From: LianaHus Date: Thu, 1 Oct 2015 17:59:01 +0200 Subject: -fixed the warning printing -style fixes --- libsolidity/CompilerStack.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'libsolidity/CompilerStack.cpp') diff --git a/libsolidity/CompilerStack.cpp b/libsolidity/CompilerStack.cpp index e6b87264..6ee19d58 100644 --- a/libsolidity/CompilerStack.cpp +++ b/libsolidity/CompilerStack.cpp @@ -122,6 +122,7 @@ bool CompilerStack::parse() } InterfaceHandler interfaceHandler; + bool typesFine = true; for (Source const* source: m_sourceOrder) for (ASTPointer const& node: source->ast->nodes()) if (ContractDefinition* contract = dynamic_cast(node.get())) @@ -129,14 +130,14 @@ bool CompilerStack::parse() m_globalContext->setCurrentContract(*contract); resolver.updateDeclaration(*m_globalContext->currentThis()); TypeChecker typeChecker; - bool typesFine = typeChecker.checkTypeRequirements(*contract); - if (!typesFine) - m_errors += typeChecker.errors(); + if (!typeChecker.checkTypeRequirements(*contract)) + typesFine = false; + m_errors += typeChecker.errors(); contract->setDevDocumentation(interfaceHandler.devDocumentation(*contract)); contract->setUserDocumentation(interfaceHandler.userDocumentation(*contract)); m_contracts[contract->name()].contract = contract; } - m_parseSuccessful = m_errors.empty(); + m_parseSuccessful = typesFine; return m_parseSuccessful; } -- cgit v1.2.3