mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
[Sol->Yul] Implementing dynamic array push for arrays of structs.
This commit is contained in:
committed by
chriseth
parent
b06936b11c
commit
85b8325f0b
@@ -1316,9 +1316,13 @@ void IRGeneratorForStatements::endVisit(FunctionCall const& _functionCall)
|
||||
}
|
||||
else
|
||||
{
|
||||
IRVariable argument = convert(*arguments.front(), *arrayType.baseType());
|
||||
IRVariable argument =
|
||||
arrayType.baseType()->isValueType() ?
|
||||
convert(*arguments.front(), *arrayType.baseType()) :
|
||||
*arguments.front();
|
||||
|
||||
m_code <<
|
||||
m_utils.storageArrayPushFunction(arrayType) <<
|
||||
m_utils.storageArrayPushFunction(arrayType, &argument.type()) <<
|
||||
"(" <<
|
||||
IRVariable(_functionCall.expression()).commaSeparatedList() <<
|
||||
", " <<
|
||||
|
||||
Reference in New Issue
Block a user