Merge pull request #1240 from ethereum/1151

ast: super contract type does not contain native members
This commit is contained in:
chriseth
2016-10-24 11:45:54 +02:00
committed by GitHub
3 changed files with 23 additions and 1 deletions
@@ -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"(