diff options
author | Christian <c@ethdev.com> | 2014-12-15 23:09:50 +0800 |
---|---|---|
committer | Christian <c@ethdev.com> | 2014-12-15 23:09:50 +0800 |
commit | a1f61684b0bf687d15eb95d9d235876cdfa3c6e2 (patch) | |
tree | c8676ded2f33badbefe4b69f63ad323b5ed25ca4 | |
parent | 17c433e7c9cbf6ceea61dc6040733f85eb3eb623 (diff) | |
download | dexon-solidity-a1f61684b0bf687d15eb95d9d235876cdfa3c6e2.tar.gz dexon-solidity-a1f61684b0bf687d15eb95d9d235876cdfa3c6e2.tar.zst dexon-solidity-a1f61684b0bf687d15eb95d9d235876cdfa3c6e2.zip |
Check that constructor does not have "returns" directive.
-rw-r--r-- | solidityNameAndTypeResolution.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/solidityNameAndTypeResolution.cpp b/solidityNameAndTypeResolution.cpp index 03eaebb3..0ea6e51b 100644 --- a/solidityNameAndTypeResolution.cpp +++ b/solidityNameAndTypeResolution.cpp @@ -284,6 +284,15 @@ BOOST_AUTO_TEST_CASE(assignment_to_struct) BOOST_CHECK_THROW(parseTextAndResolveNames(text), TypeError); } +BOOST_AUTO_TEST_CASE(returns_in_constructor) +{ + char const* text = "contract test {\n" + " function test() returns (uint a) {\n" + " }\n" + "}\n"; + BOOST_CHECK_THROW(parseTextAndResolveNames(text), TypeError); +} + BOOST_AUTO_TEST_SUITE_END() } |