mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
fixed test framework
This commit is contained in:
@@ -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()];
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user