Add tests around calling functions returning functions returning functions

This commit is contained in:
Yoichi Hirai
2016-11-16 14:37:17 +01:00
committed by chriseth
parent 95d7555e3c
commit ab3d1b024d
2 changed files with 45 additions and 0 deletions
+15
View File
@@ -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()
}