aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2016-08-25 19:25:30 +0800
committerchriseth <c@ethdev.com>2016-08-26 06:07:50 +0800
commit21b6aa92ffe6f5662a234e6e290e842e963917d1 (patch)
tree688721282aa421c1d9f6fdb92da100dbf020fbad /test
parentf329d5e772ed4314897c46b67b1459f39838a2cc (diff)
downloaddexon-solidity-21b6aa92ffe6f5662a234e6e290e842e963917d1.tar.gz
dexon-solidity-21b6aa92ffe6f5662a234e6e290e842e963917d1.tar.zst
dexon-solidity-21b6aa92ffe6f5662a234e6e290e842e963917d1.zip
Disallow fallback function to return values.
Diffstat (limited to 'test')
-rw-r--r--test/libsolidity/SolidityNameAndTypeResolution.cpp10
1 files changed, 10 insertions, 0 deletions
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"(