From 6621dc6ba5a86faa817cdd10198d89648ca64ea6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20=C5=9Aliwak?= Date: Mon, 18 Sep 2023 10:51:31 +0200 Subject: [PATCH] fixup! Type inference draft. --- libsolidity/experimental/analysis/TypeInference.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libsolidity/experimental/analysis/TypeInference.cpp b/libsolidity/experimental/analysis/TypeInference.cpp index d0679b840..2e5a35853 100644 --- a/libsolidity/experimental/analysis/TypeInference.cpp +++ b/libsolidity/experimental/analysis/TypeInference.cpp @@ -780,11 +780,11 @@ bool TypeInference::visit(MemberAccess const& _memberAccess) experimental::Type TypeInference::memberType(Type _type, std::string _memberName, langutil::SourceLocation _location) { - Type type = m_env->resolve(_type); + Type resolvedType = m_env->resolve(_type); TypeSystemHelpers helper{m_typeSystem}; - if (helper.isTypeConstant(type)) + if (helper.isTypeConstant(resolvedType)) { - auto constructor = std::get<0>(helper.destTypeConstant(type)); + auto constructor = std::get<0>(helper.destTypeConstant(resolvedType)); if (auto* typeMember = util::valueOrNullptr(annotation().members.at(constructor), _memberName)) return polymorphicInstance(typeMember->type); else