Add a test for #1151

This commit is contained in:
Yoichi Hirai 2016-10-18 12:42:35 +02:00
parent 9d30450167
commit 6781ec105f
No known key found for this signature in database
GPG Key ID: E7B75D080FCF7992

View File

@ -854,6 +854,23 @@ BOOST_AUTO_TEST_CASE(implicit_base_to_derived_conversion)
BOOST_CHECK(expectError(text) == Error::Type::TypeError); 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) BOOST_AUTO_TEST_CASE(function_modifier_invocation)
{ {
char const* text = R"( char const* text = R"(