mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Small improvement in TypeType::getMembers()
This commit is contained in:
parent
9a879202e1
commit
68cf1bf37d
@ -966,9 +966,9 @@ MemberList const& TypeType::getMembers() const
|
|||||||
else if (m_actualType->getCategory() == Category::Enum)
|
else if (m_actualType->getCategory() == Category::Enum)
|
||||||
{
|
{
|
||||||
EnumDefinition const& enumDef = dynamic_cast<EnumType const&>(*m_actualType).getEnumDefinition();
|
EnumDefinition const& enumDef = dynamic_cast<EnumType const&>(*m_actualType).getEnumDefinition();
|
||||||
|
auto enumType = make_shared<EnumType>(enumDef);
|
||||||
for (ASTPointer<EnumValue> const& enumValue: enumDef.getMembers())
|
for (ASTPointer<EnumValue> const& enumValue: enumDef.getMembers())
|
||||||
members.insert(make_pair(enumValue->getName(), make_shared<EnumType>(enumDef)));
|
members.insert(make_pair(enumValue->getName(), enumType));
|
||||||
m_members.reset(new MemberList(members));
|
|
||||||
}
|
}
|
||||||
m_members.reset(new MemberList(members));
|
m_members.reset(new MemberList(members));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user