Add test case for bound types without self

This commit is contained in:
Alex Beregszaszi 2016-10-14 19:28:15 +01:00
parent 65da8e4e16
commit 8317eb0383

View File

@ -4020,6 +4020,25 @@ BOOST_AUTO_TEST_CASE(invalid_array_as_statement)
BOOST_CHECK(expectError(text, false) == Error::Type::TypeError);
}
BOOST_AUTO_TEST_CASE(using_directive_for_missing_selftype)
{
char const* text = R"(
library B {
function b() {}
}
contract A {
using B for bytes;
function a() {
bytes memory x;
x.b();
}
}
)";
BOOST_CHECK(expectError(text, false) == Error::Type::TypeError);
}
BOOST_AUTO_TEST_SUITE_END()
}