solidity/test/libsolidity/semanticTests/array/short_fixed_array_cleanup.sol
2020-11-13 12:32:39 +01:00

18 lines
334 B
Solidity

contract c {
uint spacer1;
uint spacer2;
uint[3] data;
function fill() public {
for (uint i = 0; i < data.length; ++i) data[i] = i+1;
}
function clear() public { delete data; }
}
// ====
// compileViaYul: also
// ----
// storage: empty
// fill() ->
// storage: nonempty
// clear() ->
// storage: empty