diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2018-05-08 22:11:28 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2018-08-07 20:28:53 +0800 |
commit | 13e37df97c4585a68f2f7f4b6296cb38abc49cea (patch) | |
tree | 598563383837b1b0b313e3d431834f7a0acf7fe9 /libsolidity/analysis | |
parent | 9d3827266cc734ac91368acff010e094f100f850 (diff) | |
download | dexon-solidity-13e37df97c4585a68f2f7f4b6296cb38abc49cea.tar.gz dexon-solidity-13e37df97c4585a68f2f7f4b6296cb38abc49cea.tar.zst dexon-solidity-13e37df97c4585a68f2f7f4b6296cb38abc49cea.zip |
Allow enums in interfaces
Diffstat (limited to 'libsolidity/analysis')
-rw-r--r-- | libsolidity/analysis/TypeChecker.cpp | 7 | ||||
-rw-r--r-- | libsolidity/analysis/TypeChecker.h | 1 |
2 files changed, 0 insertions, 8 deletions
diff --git a/libsolidity/analysis/TypeChecker.cpp b/libsolidity/analysis/TypeChecker.cpp index 7cec7c43..60637867 100644 --- a/libsolidity/analysis/TypeChecker.cpp +++ b/libsolidity/analysis/TypeChecker.cpp @@ -751,13 +751,6 @@ bool TypeChecker::visit(VariableDeclaration const& _variable) return false; } -bool TypeChecker::visit(EnumDefinition const& _enum) -{ - if (m_scope->contractKind() == ContractDefinition::ContractKind::Interface) - m_errorReporter.typeError(_enum.location(), "Enumerable cannot be declared in interfaces."); - return false; -} - void TypeChecker::visitManually( ModifierInvocation const& _modifier, vector<ContractDefinition const*> const& _bases diff --git a/libsolidity/analysis/TypeChecker.h b/libsolidity/analysis/TypeChecker.h index 47892a3f..b696de85 100644 --- a/libsolidity/analysis/TypeChecker.h +++ b/libsolidity/analysis/TypeChecker.h @@ -96,7 +96,6 @@ private: virtual bool visit(StructDefinition const& _struct) override; virtual bool visit(FunctionDefinition const& _function) override; virtual bool visit(VariableDeclaration const& _variable) override; - virtual bool visit(EnumDefinition const& _enum) override; /// We need to do this manually because we want to pass the bases of the current contract in /// case this is a base constructor call. void visitManually(ModifierInvocation const& _modifier, std::vector<ContractDefinition const*> const& _bases); |