mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #11003 from ethereum/ir-bug-incorrect-return-variable-count
Fix IR bug on deleting storage variables of function type.
This commit is contained in:
@@ -3888,11 +3888,13 @@ string YulUtilFunctions::storageSetToZeroFunction(Type const& _type)
|
||||
if (_type.isValueType())
|
||||
return Whiskers(R"(
|
||||
function <functionName>(slot, offset) {
|
||||
<store>(slot, offset, <zeroValue>())
|
||||
let <values> := <zeroValue>()
|
||||
<store>(slot, offset, <values>)
|
||||
}
|
||||
)")
|
||||
("functionName", functionName)
|
||||
("store", updateStorageValueFunction(_type, _type))
|
||||
("values", suffixedVariableNameList("zero_", 0, _type.sizeOnStack()))
|
||||
("zeroValue", zeroValueFunction(_type))
|
||||
.render();
|
||||
else if (_type.category() == Type::Category::Array)
|
||||
|
||||
Reference in New Issue
Block a user