solidity/test/libsolidity/semanticTests/array/copying/copy_removes_bytes_data.sol

18 lines
413 B
Solidity
Raw Normal View History

contract c {
function set() public returns (bool) { data1 = msg.data; return true; }
function reset() public returns (bool) { data1 = data2; return true; }
bytes data1;
bytes data2;
}
// ====
// compileViaYul: also
// ----
// set(): 1, 2, 3, 4, 5 -> true
2021-09-15 15:01:40 +00:00
// gas irOptimized: 177417
// gas legacy: 177656
// gas legacyOptimized: 177496
// storageEmpty -> 0
// reset() -> true
// storageEmpty -> 1