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: 110570
// gas legacy: 110726
// gas legacyOptimized: 110567
// getLength() -> 68