aboutsummaryrefslogtreecommitdiffstats
path: root/NameAndTypeResolver.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 /NameAndTypeResolver.cpp
parent41647fd75f3c131ecade223fc58a1f6eed2ee235 (diff)
downloaddexon-solidity-c944976d00de84d9cbe8e3e2388a21f0a323444c.tar.gz
dexon-solidity-c944976d00de84d9cbe8e3e2388a21f0a323444c.tar.zst
dexon-solidity-c944976d00de84d9cbe8e3e2388a21f0a323444c.zip
Some changes to enums.
Diffstat (limited to 'NameAndTypeResolver.cpp')
-rw-r--r--NameAndTypeResolver.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/NameAndTypeResolver.cpp b/NameAndTypeResolver.cpp
index 859d0097..dbe5693a 100644
--- a/NameAndTypeResolver.cpp
+++ b/NameAndTypeResolver.cpp
@@ -81,8 +81,6 @@ void NameAndTypeResolver::checkTypeRequirements(ContractDefinition& _contract)
{
for (ASTPointer<StructDefinition> const& structDef: _contract.getDefinedStructs())
structDef->checkValidityOfMembers();
- for (ASTPointer<EnumDefinition> const& enumDef: _contract.getDefinedEnums())
- enumDef->checkValidityOfMembers();
_contract.checkTypeRequirements();
}
@@ -236,6 +234,12 @@ void DeclarationRegistrationHelper::endVisit(EnumDefinition&)
closeCurrentScope();
}
+bool DeclarationRegistrationHelper::visit(EnumValue& _value)
+{
+ registerDeclaration(_value, false);
+ return true;
+}
+
bool DeclarationRegistrationHelper::visit(FunctionDefinition& _function)
{
registerDeclaration(_function, true);