mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Disallow enums in interfaces
This commit is contained in:
@@ -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"(
|
||||
|
||||
Reference in New Issue
Block a user