aboutsummaryrefslogtreecommitdiffstats
path: root/AST.cpp
diff options
context:
space:
mode:
authorChristian <c@ethdev.com>2014-10-30 08:16:11 +0800
committerChristian <c@ethdev.com>2014-10-30 08:18:07 +0800
commit51349bdae53e7d495732085c446ff9488473dcc8 (patch)
tree9c1a934cc73e56de1231aaeff77059c91c20d3a6 /AST.cpp
parentb5a4d12fa328f69d4dfba9bf57ac289935877649 (diff)
downloaddexon-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.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/AST.cpp b/AST.cpp
index 7b5b6a73..099222fa 100644
--- a/AST.cpp
+++ b/AST.cpp
@@ -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."));