aboutsummaryrefslogtreecommitdiffstats
path: root/AST.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'AST.cpp')
-rw-r--r--AST.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/AST.cpp b/AST.cpp
index 50c53bf3..357b9bd9 100644
--- a/AST.cpp
+++ b/AST.cpp
@@ -257,8 +257,7 @@ void Statement::expectType(Expression& _expression, const Type& _expectedType)
{
_expression.checkTypeRequirements();
if (!_expression.getType()->isImplicitlyConvertibleTo(_expectedType))
- BOOST_THROW_EXCEPTION(TypeError() << errinfo_sourceLocation(_expression.getLocation())
- << errinfo_comment("Type not implicitly convertible to expected type."));
+ BOOST_THROW_EXCEPTION(_expression.createTypeError("Type not implicitly convertible to expected type."));
//@todo provide more information to the exception
}
@@ -407,9 +406,7 @@ void FunctionCall::checkTypeRequirements()
m_type = fun.getReturnParameterList()->getParameters().front()->getType();
}
else
- {
BOOST_THROW_EXCEPTION(createTypeError("Type does not support invocation."));
- }
}
void MemberAccess::checkTypeRequirements()