solidity/test/libsolidity/semanticTests/array/short_fixed_array_cleanup.sol
2023-05-11 10:56:55 -05:00

16 lines
309 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; }
}
// ----
// storageEmpty -> 1
// fill() ->
// storageEmpty -> 0
// clear() ->
// storageEmpty -> 1