diff options
author | LianaHus <liana@ethdev.com> | 2015-11-07 01:43:17 +0800 |
---|---|---|
committer | LianaHus <liana@ethdev.com> | 2015-11-07 01:45:06 +0800 |
commit | 63060fc1f0f2f27ab4ad853c7295c2cfba373b83 (patch) | |
tree | 495d30b41f8fa1f49478d9ff19e0ef61ac0313e7 /libsolidity/analysis | |
parent | 7eb162c0df52fc6335613f00e9d105fe2a4df7ff (diff) | |
download | dexon-solidity-63060fc1f0f2f27ab4ad853c7295c2cfba373b83.tar.gz dexon-solidity-63060fc1f0f2f27ab4ad853c7295c2cfba373b83.tar.zst dexon-solidity-63060fc1f0f2f27ab4ad853c7295c2cfba373b83.zip |
fixed test framework
Diffstat (limited to 'libsolidity/analysis')
-rw-r--r-- | libsolidity/analysis/NameAndTypeResolver.cpp | 9 | ||||
-rw-r--r-- | libsolidity/analysis/ReferencesResolver.h | 9 |
2 files changed, 8 insertions, 10 deletions
diff --git a/libsolidity/analysis/NameAndTypeResolver.cpp b/libsolidity/analysis/NameAndTypeResolver.cpp index d681b99b..85944e0f 100644 --- a/libsolidity/analysis/NameAndTypeResolver.cpp +++ b/libsolidity/analysis/NameAndTypeResolver.cpp @@ -84,9 +84,6 @@ bool NameAndTypeResolver::resolveNamesAndTypes(ContractDefinition& _contract) importInheritedScope(*base); } - if (!success) - return false; - for (ASTPointer<StructDefinition> const& structDef: _contract.definedStructs()) if (!resolver.resolve(*structDef)) success = false; @@ -100,8 +97,6 @@ bool NameAndTypeResolver::resolveNamesAndTypes(ContractDefinition& _contract) if (!resolver.resolve(*event)) success = false; // these can contain code, only resolve parameters for now - if (!success) - return false; for (ASTPointer<ModifierDefinition> const& modifier: _contract.functionModifiers()) { m_currentScope = &m_scopes[modifier.get()]; @@ -110,8 +105,6 @@ bool NameAndTypeResolver::resolveNamesAndTypes(ContractDefinition& _contract) success = false; } - if (!success) - return false; for (ASTPointer<FunctionDefinition> const& function: _contract.definedFunctions()) { m_currentScope = &m_scopes[function.get()]; @@ -138,8 +131,6 @@ bool NameAndTypeResolver::resolveNamesAndTypes(ContractDefinition& _contract) success = false; } - if (!success) - return false; for (ASTPointer<FunctionDefinition> const& function: _contract.definedFunctions()) { m_currentScope = &m_scopes[function.get()]; diff --git a/libsolidity/analysis/ReferencesResolver.h b/libsolidity/analysis/ReferencesResolver.h index 237d01a0..be618f23 100644 --- a/libsolidity/analysis/ReferencesResolver.h +++ b/libsolidity/analysis/ReferencesResolver.h @@ -59,7 +59,14 @@ public: /// @returns true if no errors during resolving bool resolve(ASTNode& _root) { - _root.accept(*this); + try + { + _root.accept(*this); + } + catch (FatalError const& e) + { + solAssert(m_errorOccurred, ""); + } return !m_errorOccurred; } |