diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2017-03-16 06:12:31 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2017-03-18 01:06:52 +0800 |
commit | 2c4bce2d62dc8bfc752858db12c625aec6e5960f (patch) | |
tree | 2899876e56f303de00c637ce3e82f37fb004ebef /test | |
parent | 16a91ef90aaf589361e34a10dcee2181ba6cb2ed (diff) | |
download | dexon-solidity-2c4bce2d62dc8bfc752858db12c625aec6e5960f.tar.gz dexon-solidity-2c4bce2d62dc8bfc752858db12c625aec6e5960f.tar.zst dexon-solidity-2c4bce2d62dc8bfc752858db12c625aec6e5960f.zip |
Disallow enums in interfaces
Diffstat (limited to 'test')
-rw-r--r-- | test/libsolidity/SolidityNameAndTypeResolution.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/libsolidity/SolidityNameAndTypeResolution.cpp b/test/libsolidity/SolidityNameAndTypeResolution.cpp index c30bb011..f6c875f1 100644 --- a/test/libsolidity/SolidityNameAndTypeResolution.cpp +++ b/test/libsolidity/SolidityNameAndTypeResolution.cpp @@ -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"( |