aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/SolidityParser.cpp
diff options
context:
space:
mode:
authorYoichi Hirai <i@yoichihirai.com>2016-10-14 23:32:13 +0800
committerchriseth <c@ethdev.com>2016-11-16 21:37:17 +0800
commitab3d1b024db6e208e4b63e2ecb07754af1540d6f (patch)
tree0aa0fdb5050e6426ef2e10dacb6dada0ba00f29c /test/libsolidity/SolidityParser.cpp
parent95d7555e3c0e8fc4826114a336e0e717fe7a1a2d (diff)
downloaddexon-solidity-ab3d1b024db6e208e4b63e2ecb07754af1540d6f.tar.gz
dexon-solidity-ab3d1b024db6e208e4b63e2ecb07754af1540d6f.tar.zst
dexon-solidity-ab3d1b024db6e208e4b63e2ecb07754af1540d6f.zip
Add tests around calling functions returning functions returning functions
Diffstat (limited to 'test/libsolidity/SolidityParser.cpp')
-rw-r--r--test/libsolidity/SolidityParser.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/libsolidity/SolidityParser.cpp b/test/libsolidity/SolidityParser.cpp
index 496f4703..d8c6fa10 100644
--- a/test/libsolidity/SolidityParser.cpp
+++ b/test/libsolidity/SolidityParser.cpp
@@ -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()
}