From b83097bdc6cc20962fd26bead2f09cf55c48c939 Mon Sep 17 00:00:00 2001 From: Christian Parpart Date: Wed, 17 Apr 2019 12:59:48 +0200 Subject: [PATCH] [libsolidity] Types: eliminate redundant MagicType::metaType() (use TypeProvider instead) --- libsolidity/analysis/TypeChecker.cpp | 2 +- libsolidity/ast/Types.cpp | 5 ----- libsolidity/ast/Types.h | 3 --- 3 files changed, 1 insertion(+), 9 deletions(-) diff --git a/libsolidity/analysis/TypeChecker.cpp b/libsolidity/analysis/TypeChecker.cpp index 3a7242a97..4bf5f0b1a 100644 --- a/libsolidity/analysis/TypeChecker.cpp +++ b/libsolidity/analysis/TypeChecker.cpp @@ -231,7 +231,7 @@ TypePointers TypeChecker::typeCheckMetaTypeFunctionAndRetrieveReturnType(Functio return {}; } - return {MagicType::metaType(dynamic_cast(*firstArgType).actualType())}; + return {TypeProvider::metaType(dynamic_cast(*firstArgType).actualType())}; } void TypeChecker::endVisit(InheritanceSpecifier const& _inheritance) diff --git a/libsolidity/ast/Types.cpp b/libsolidity/ast/Types.cpp index 622f96564..de7b60888 100644 --- a/libsolidity/ast/Types.cpp +++ b/libsolidity/ast/Types.cpp @@ -3415,11 +3415,6 @@ string ModuleType::toString(bool) const return string("module \"") + m_sourceUnit.annotation().path + string("\""); } -MagicType const* MagicType::metaType(TypePointer _type) -{ - return TypeProvider::metaType(_type); -} - string MagicType::richIdentifier() const { switch (m_kind) diff --git a/libsolidity/ast/Types.h b/libsolidity/ast/Types.h index 98457a3eb..ce2af7c2b 100644 --- a/libsolidity/ast/Types.h +++ b/libsolidity/ast/Types.h @@ -1346,9 +1346,6 @@ public: Category category() const override { return Category::Magic; } - /// Factory function for meta type - static MagicType const* metaType(TypePointer _type); - TypeResult binaryOperatorResult(Token, Type const*) const override { return nullptr;