aboutsummaryrefslogtreecommitdiffstats
path: root/AST.cpp
diff options
context:
space:
mode:
authorChristian <c@ethdev.com>2014-12-17 23:23:18 +0800
committerChristian <c@ethdev.com>2014-12-17 23:24:56 +0800
commit5a1a83ff42b97f85e06c54c7d5fe7db2f8239e5a (patch)
tree3aaf794ca4352fedfb7b651a5722b3ff2a588e1b /AST.cpp
parent3d98ec1323f604130c0dba87ce4596f04ffa0269 (diff)
downloaddexon-solidity-5a1a83ff42b97f85e06c54c7d5fe7db2f8239e5a.tar
dexon-solidity-5a1a83ff42b97f85e06c54c7d5fe7db2f8239e5a.tar.gz
dexon-solidity-5a1a83ff42b97f85e06c54c7d5fe7db2f8239e5a.tar.bz2
dexon-solidity-5a1a83ff42b97f85e06c54c7d5fe7db2f8239e5a.tar.lz
dexon-solidity-5a1a83ff42b97f85e06c54c7d5fe7db2f8239e5a.tar.xz
dexon-solidity-5a1a83ff42b97f85e06c54c7d5fe7db2f8239e5a.tar.zst
dexon-solidity-5a1a83ff42b97f85e06c54c7d5fe7db2f8239e5a.zip
Assertions that throw InternalCompilerErrors.
Diffstat (limited to 'AST.cpp')
-rw-r--r--AST.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/AST.cpp b/AST.cpp
index 4c042f2c..1fa6d8f6 100644
--- a/AST.cpp
+++ b/AST.cpp
@@ -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)