mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Bugfix: Allow empty return statements without type checking.
This commit is contained in:
parent
b5a4d12fa3
commit
51349bdae5
2
AST.cpp
2
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…
Reference in New Issue
Block a user