solidity/test/libsolidity/semanticTests/array/fixed_array_cleanup.sol
Djordje Mijovic b73e9f3eef Update tests.
2021-03-10 14:22:30 +01:00

22 lines
439 B
Solidity

contract c {
uint spacer1;
uint spacer2;
uint[20] data;
function fill() public {
for (uint i = 0; i < data.length; ++i) data[i] = i+1;
}
function clear() public { delete data; }
}
// ====
// compileToEwasm: also
// compileViaYul: also
// ----
// storage: empty
// fill() ->
// gas irOptimized: 423997
// gas legacy: 429460
// gas legacyOptimized: 425520
// storage: nonempty
// clear() ->
// storage: empty