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

22 lines
397 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;
}
2020-10-20 15:05:58 +00:00
// ====
// compileViaYul: also
// ----
// getLength() -> 0
// set(): 1, 2 -> true
// gas irOptimized: 102970
2021-02-12 12:45:15 +00:00
// gas legacy: 103126
2021-03-11 11:17:50 +00:00
// gas legacyOptimized: 102967
// getLength() -> 68