diff options
author | Christian <c@ethdev.com> | 2015-02-14 10:06:50 +0800 |
---|---|---|
committer | Christian <c@ethdev.com> | 2015-02-14 20:35:57 +0800 |
commit | c944976d00de84d9cbe8e3e2388a21f0a323444c (patch) | |
tree | 6048622c579f366904a8f300dbc81c843ea97850 /AST.cpp | |
parent | 41647fd75f3c131ecade223fc58a1f6eed2ee235 (diff) | |
download | dexon-solidity-c944976d00de84d9cbe8e3e2388a21f0a323444c.tar.gz dexon-solidity-c944976d00de84d9cbe8e3e2388a21f0a323444c.tar.zst dexon-solidity-c944976d00de84d9cbe8e3e2388a21f0a323444c.zip |
Some changes to enums.
Diffstat (limited to 'AST.cpp')
-rw-r--r-- | AST.cpp | 13 |
1 files changed, 0 insertions, 13 deletions
@@ -262,19 +262,6 @@ void StructDefinition::checkRecursion() const } } -void EnumDefinition::checkValidityOfMembers() const -{ - vector<ASTPointer<EnumValue>> members(getMembers()); - auto compareDecls = [](ASTPointer<EnumValue> a, ASTPointer<EnumValue> b) - { - return a->getName() < b->getName(); - }; - sort(begin(members), end(members), compareDecls); - for (size_t i = 0; i < members.size() - 1; ++i) - if (members[i]->getName() == members[i + 1]->getName()) - BOOST_THROW_EXCEPTION(members[i]->createTypeError("Duplicate member detected in Enum")); -} - TypePointer EnumDefinition::getType(ContractDefinition const*) const { return make_shared<TypeType>(make_shared<EnumType>(*this)); |