Disallow enums in interfaces

This commit is contained in:
Alex Beregszaszi
2017-03-17 17:06:52 +00:00
parent 16a91ef90a
commit 2c4bce2d62
4 changed files with 19 additions and 0 deletions
@@ -5411,6 +5411,16 @@ BOOST_AUTO_TEST_CASE(interface_variables)
CHECK_ERROR(text, TypeError, "Variables cannot be declared in interfaces");
}
BOOST_AUTO_TEST_CASE(interface_enums)
{
char const* text = R"(
interface I {
enum A { B, C }
}
)";
CHECK_ERROR(text, TypeError, "Enumerable cannot be declared in interfaces");
}
BOOST_AUTO_TEST_CASE(using_interface)
{
char const* text = R"(