aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/analysis
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-08-07 23:20:05 +0800
committerGitHub <noreply@github.com>2018-08-07 23:20:05 +0800
commitd7756322c07634fa2ca0649a33585fc167079786 (patch)
tree2b28b52fe554d187c30787a34b84ea0dba56faf3 /libsolidity/analysis
parent901550e473f001d2c6666870d71dbf0b9ff8c1ff (diff)
parent34a711a14daf9874061a83401bf28a57b3abf1b1 (diff)
downloaddexon-solidity-d7756322c07634fa2ca0649a33585fc167079786.tar.gz
dexon-solidity-d7756322c07634fa2ca0649a33585fc167079786.tar.zst
dexon-solidity-d7756322c07634fa2ca0649a33585fc167079786.zip
Merge pull request #4731 from ethereum/interface-enum
Allow enums in interfaces
Diffstat (limited to 'libsolidity/analysis')
-rw-r--r--libsolidity/analysis/TypeChecker.cpp7
-rw-r--r--libsolidity/analysis/TypeChecker.h1
2 files changed, 0 insertions, 8 deletions
diff --git a/libsolidity/analysis/TypeChecker.cpp b/libsolidity/analysis/TypeChecker.cpp
index d98d6af1..38331a43 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);