solidity/test/libsolidity/semanticTests/array/bytes_length_member.sol

20 lines
366 B
Solidity
Raw Normal View History

contract c {
function set() public returns (bool) {
data = msg.data;
return true;
}
function getLength() public returns (uint256) {
return data.length;
}
bytes data;
}
// ----
// getLength() -> 0
// set(): 1, 2 -> true
2022-05-23 10:54:18 +00:00
// gas irOptimized: 110402
2022-06-07 12:45:10 +00:00
// gas legacy: 110968
// gas legacyOptimized: 110585
// getLength() -> 68