mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Report warning in tests if requested.
This commit is contained in:
parent
795c894afc
commit
5e4166acb8
@ -72,8 +72,8 @@ parseAnalyseAndReturnError(string const& _source, bool _reportWarnings = false)
|
|||||||
globalContext->setCurrentContract(*contract);
|
globalContext->setCurrentContract(*contract);
|
||||||
resolver.updateDeclaration(*globalContext->currentThis());
|
resolver.updateDeclaration(*globalContext->currentThis());
|
||||||
TypeChecker typeChecker;
|
TypeChecker typeChecker;
|
||||||
if (!typeChecker.checkTypeRequirements(*contract))
|
bool success = typeChecker.checkTypeRequirements(*contract);
|
||||||
{
|
BOOST_CHECK(success || !typeChecker.errors().empty());
|
||||||
for (auto const& firstError: typeChecker.errors())
|
for (auto const& firstError: typeChecker.errors())
|
||||||
{
|
{
|
||||||
if (_reportWarnings || !dynamic_pointer_cast<Warning const>(firstError))
|
if (_reportWarnings || !dynamic_pointer_cast<Warning const>(firstError))
|
||||||
@ -87,8 +87,6 @@ parseAnalyseAndReturnError(string const& _source, bool _reportWarnings = false)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (ParserError const& _exception)
|
catch (ParserError const& _exception)
|
||||||
|
Loading…
Reference in New Issue
Block a user