From fc0b32f68394518894314682f95a7b45fc1a6ef0 Mon Sep 17 00:00:00 2001 From: Lefteris Karapetsas Date: Fri, 20 Mar 2015 17:50:26 +0100 Subject: Parsing of not fully implemented functions - Adding the possibility of omitting a function body by simply ending a function definition with a semicolon - Such a function is marked as not fully implemented and any contract that contains such a function is considered a not fully implemented contract --- SolidityParser.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'SolidityParser.cpp') diff --git a/SolidityParser.cpp b/SolidityParser.cpp index 392d9ac4..7640f91a 100644 --- a/SolidityParser.cpp +++ b/SolidityParser.cpp @@ -108,6 +108,14 @@ BOOST_AUTO_TEST_CASE(single_function_param) ETH_TEST_CHECK_NO_THROW(parseText(text), "Parsing failed."); } +BOOST_AUTO_TEST_CASE(function_no_body) +{ + char const* text = "contract test {\n" + " function functionName(bytes32 input) returns (bytes32 out);\n" + "}\n"; + ETH_TEST_CHECK_NO_THROW(parseText(text), "Parsing failed."); +} + BOOST_AUTO_TEST_CASE(missing_parameter_name_in_named_args) { char const* text = "contract test {\n" -- cgit v1.2.3