aboutsummaryrefslogtreecommitdiffstats
path: root/AST.cpp
diff options
context:
space:
mode:
authorChristian <c@ethdev.com>2015-02-14 10:06:50 +0800
committerChristian <c@ethdev.com>2015-02-14 20:35:57 +0800
commitc944976d00de84d9cbe8e3e2388a21f0a323444c (patch)
tree6048622c579f366904a8f300dbc81c843ea97850 /AST.cpp
parent41647fd75f3c131ecade223fc58a1f6eed2ee235 (diff)
downloaddexon-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.cpp13
1 files changed, 0 insertions, 13 deletions
diff --git a/AST.cpp b/AST.cpp
index 68345202..0dbad433 100644
--- a/AST.cpp
+++ b/AST.cpp
@@ -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));