diff options
Diffstat (limited to 'AST.cpp')
-rw-r--r-- | AST.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -294,6 +294,8 @@ void Break::checkTypeRequirements() void Return::checkTypeRequirements() { assert(m_returnParameters); + if (!m_expression) + return; if (m_returnParameters->getParameters().size() != 1) BOOST_THROW_EXCEPTION(createTypeError("Different number of arguments in return statement " "than in returns declaration.")); |