mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
fixup! Type inference draft.
This commit is contained in:
parent
2956345cd4
commit
6621dc6ba5
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user