diff options
author | Christian <c@ethdev.com> | 2014-10-30 08:16:11 +0800 |
---|---|---|
committer | Christian <c@ethdev.com> | 2014-10-30 08:18:07 +0800 |
commit | 51349bdae53e7d495732085c446ff9488473dcc8 (patch) | |
tree | 9c1a934cc73e56de1231aaeff77059c91c20d3a6 /AST.cpp | |
parent | b5a4d12fa328f69d4dfba9bf57ac289935877649 (diff) | |
download | dexon-solidity-51349bdae53e7d495732085c446ff9488473dcc8.tar.gz dexon-solidity-51349bdae53e7d495732085c446ff9488473dcc8.tar.zst dexon-solidity-51349bdae53e7d495732085c446ff9488473dcc8.zip |
Bugfix: Allow empty return statements without type checking.
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.")); |