mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Use tuple sort name plus index for field name
This commit is contained in:
parent
5d9dd654cf
commit
4fc9920112
@ -80,14 +80,12 @@ SortPointer smtSort(frontend::Type const& _type)
|
|||||||
auto tupleType = dynamic_cast<frontend::TupleType const*>(&_type);
|
auto tupleType = dynamic_cast<frontend::TupleType const*>(&_type);
|
||||||
solAssert(tupleType, "");
|
solAssert(tupleType, "");
|
||||||
vector<string> members;
|
vector<string> members;
|
||||||
static unsigned tupleTypeId = 0;
|
auto const& tupleName = _type.identifier();
|
||||||
for (auto const& component: tupleType->components())
|
auto const& components = tupleType->components();
|
||||||
if (component)
|
for (unsigned i = 0; i < components.size(); ++i)
|
||||||
members.emplace_back(component->identifier() + "_" + to_string(tupleTypeId++));
|
members.emplace_back(tupleName + "_accessor_" + to_string(i));
|
||||||
else
|
|
||||||
members.emplace_back("null_type_" + to_string(tupleTypeId++));
|
|
||||||
return make_shared<TupleSort>(
|
return make_shared<TupleSort>(
|
||||||
_type.identifier() + "_" + to_string(tupleTypeId++),
|
tupleName,
|
||||||
members,
|
members,
|
||||||
smtSortAbstractFunction(tupleType->components())
|
smtSortAbstractFunction(tupleType->components())
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user