From 21b6aa92ffe6f5662a234e6e290e842e963917d1 Mon Sep 17 00:00:00 2001 From: chriseth Date: Thu, 25 Aug 2016 13:25:30 +0200 Subject: Disallow fallback function to return values. --- test/libsolidity/SolidityNameAndTypeResolution.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'test/libsolidity') diff --git a/test/libsolidity/SolidityNameAndTypeResolution.cpp b/test/libsolidity/SolidityNameAndTypeResolution.cpp index e9da390c..f0ab07c5 100644 --- a/test/libsolidity/SolidityNameAndTypeResolution.cpp +++ b/test/libsolidity/SolidityNameAndTypeResolution.cpp @@ -1102,6 +1102,16 @@ BOOST_AUTO_TEST_CASE(fallback_function_with_arguments) BOOST_CHECK(expectError(text) == Error::Type::TypeError); } +BOOST_AUTO_TEST_CASE(fallback_function_with_return_parameters) +{ + char const* text = R"( + contract C { + function() returns (uint) { } + } + )"; + BOOST_CHECK(expectError(text) == Error::Type::TypeError); +} + BOOST_AUTO_TEST_CASE(fallback_function_twice) { char const* text = R"( -- cgit