Compilation of function modifiers.

This commit is contained in:
Christian
2015-01-26 10:23:39 +01:00
parent c86a46b84d
commit 67073948af
3 changed files with 76 additions and 12 deletions
+11
View File
@@ -573,6 +573,17 @@ BOOST_AUTO_TEST_CASE(function_overrides_modifier)
BOOST_CHECK_THROW(parseTextAndResolveNames(text), TypeError);
}
BOOST_AUTO_TEST_CASE(modifier_returns_value)
{
char const* text = R"(
contract A {
function f(uint a) mod(2) returns (uint r) {}
modifier mod(uint a) { return 7; }
}
)";
BOOST_CHECK_THROW(parseTextAndResolveNames(text), TypeError);
}
BOOST_AUTO_TEST_SUITE_END()
}