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

13 lines
299 B
Solidity

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;
}
// ----
// set(): 1, 2, 3, 4, 5 -> true
// storage: nonempty
// reset() -> true
// storage: empty