aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity
diff options
context:
space:
mode:
Diffstat (limited to 'libsolidity')
-rw-r--r--libsolidity/analysis/NameAndTypeResolver.cpp9
-rw-r--r--libsolidity/analysis/ReferencesResolver.h9
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;
}