diff options
author | Christian <c@ethdev.com> | 2014-12-17 23:23:18 +0800 |
---|---|---|
committer | Christian <c@ethdev.com> | 2014-12-17 23:24:56 +0800 |
commit | 5a1a83ff42b97f85e06c54c7d5fe7db2f8239e5a (patch) | |
tree | 3aaf794ca4352fedfb7b651a5722b3ff2a588e1b /AST.cpp | |
parent | 3d98ec1323f604130c0dba87ce4596f04ffa0269 (diff) | |
download | dexon-solidity-5a1a83ff42b97f85e06c54c7d5fe7db2f8239e5a.tar.gz dexon-solidity-5a1a83ff42b97f85e06c54c7d5fe7db2f8239e5a.tar.zst dexon-solidity-5a1a83ff42b97f85e06c54c7d5fe7db2f8239e5a.zip |
Assertions that throw InternalCompilerErrors.
Diffstat (limited to 'AST.cpp')
-rw-r--r-- | AST.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -21,7 +21,7 @@ */ #include <algorithm> - +#include <libsolidity/Utils.h> #include <libsolidity/AST.h> #include <libsolidity/ASTVisitor.h> #include <libsolidity/Exceptions.h> @@ -145,8 +145,7 @@ void Return::checkTypeRequirements() { if (!m_expression) return; - if (asserts(m_returnParameters)) - BOOST_THROW_EXCEPTION(InternalCompilerError() << errinfo_comment("Return parameters not assigned.")); + solAssert(m_returnParameters, "Return parameters not assigned."); if (m_returnParameters->getParameters().size() != 1) BOOST_THROW_EXCEPTION(createTypeError("Different number of arguments in return statement " "than in returns declaration.")); @@ -336,8 +335,7 @@ void IndexAccess::checkTypeRequirements() void Identifier::checkTypeRequirements() { - if (asserts(m_referencedDeclaration)) - BOOST_THROW_EXCEPTION(InternalCompilerError() << errinfo_comment("Identifier not resolved.")); + solAssert(m_referencedDeclaration, "Identifier not resolved."); VariableDeclaration const* variable = dynamic_cast<VariableDeclaration const*>(m_referencedDeclaration); if (variable) |