mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Add tests around calling functions returning functions returning functions
This commit is contained in:
@@ -1311,6 +1311,21 @@ BOOST_AUTO_TEST_CASE(function_type_as_parameter)
|
||||
BOOST_CHECK(successParse(text));
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(calling_function)
|
||||
{
|
||||
char const* text = R"(
|
||||
contract test {
|
||||
function f() {
|
||||
function() returns(function() returns(function() returns(function() returns(uint)))) x;
|
||||
uint y;
|
||||
y = x()()()();
|
||||
}
|
||||
}
|
||||
)";
|
||||
BOOST_CHECK(successParse(text));
|
||||
}
|
||||
|
||||
|
||||
BOOST_AUTO_TEST_SUITE_END()
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user