aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/CompilerStack.cpp
diff options
context:
space:
mode:
authorLianaHus <liana@ethdev.com>2015-10-01 23:59:01 +0800
committerLianaHus <liana@ethdev.com>2015-10-02 18:38:48 +0800
commit53d0684cb4dc7d7b5c9e92bf9e77383e14ecec8c (patch)
tree5312fb4944f243347de5ce8473ae1908721efa4e /libsolidity/CompilerStack.cpp
parent2706846f43b8a274098a8a4564bddeba06059bb6 (diff)
downloaddexon-solidity-53d0684cb4dc7d7b5c9e92bf9e77383e14ecec8c.tar.gz
dexon-solidity-53d0684cb4dc7d7b5c9e92bf9e77383e14ecec8c.tar.zst
dexon-solidity-53d0684cb4dc7d7b5c9e92bf9e77383e14ecec8c.zip
-fixed the warning printing
-style fixes
Diffstat (limited to 'libsolidity/CompilerStack.cpp')
-rw-r--r--libsolidity/CompilerStack.cpp9
1 files changed, 5 insertions, 4 deletions
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<ASTNode> const& node: source->ast->nodes())
if (ContractDefinition* contract = dynamic_cast<ContractDefinition*>(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;
}