Browse Source

Bugfix: Allow empty return statements without type checking.

cl-refactor
Christian 10 years ago
parent
commit
9ae4efd311
  1. 2
      libsolidity/AST.cpp

2
libsolidity/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."));

Loading…
Cancel
Save