Add a test for #1151

This commit is contained in:
Yoichi Hirai
2016-10-20 16:09:52 +02:00
parent 9d30450167
commit 6781ec105f
@@ -854,6 +854,23 @@ BOOST_AUTO_TEST_CASE(implicit_base_to_derived_conversion)
BOOST_CHECK(expectError(text) == Error::Type::TypeError);
}
BOOST_AUTO_TEST_CASE(super_excludes_current_contract)
{
char const* text = R"(
contract A {
function b() {}
}
contract B is A {
function f() {
super.f();
}
}
)";
BOOST_CHECK(expectError(text) == Error::Type::TypeError);
}
BOOST_AUTO_TEST_CASE(function_modifier_invocation)
{
char const* text = R"(