mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Add push() for dynamic storage arrays
This commit is contained in:
@@ -1781,10 +1781,17 @@ MemberList::MemberMap ArrayType::nativeMembers(ContractDefinition const*) const
|
||||
if (isDynamicallySized() && location() == DataLocation::Storage)
|
||||
{
|
||||
members.emplace_back("push", TypeProvider::function(
|
||||
TypePointers{},
|
||||
TypePointers{baseType()},
|
||||
TypePointers{TypeProvider::uint256()},
|
||||
strings{},
|
||||
strings{string()},
|
||||
isByteArray() ? FunctionType::Kind::ByteArrayPush : FunctionType::Kind::ArrayPush
|
||||
));
|
||||
members.emplace_back("push", TypeProvider::function(
|
||||
TypePointers{baseType()},
|
||||
TypePointers{},
|
||||
strings{string()},
|
||||
strings{},
|
||||
isByteArray() ? FunctionType::Kind::ByteArrayPush : FunctionType::Kind::ArrayPush
|
||||
));
|
||||
members.emplace_back("pop", TypeProvider::function(
|
||||
|
||||
Reference in New Issue
Block a user