solidity/test/libsolidity/semanticTests/array/bytes_length_member.sol
Djordje Mijovic b73e9f3eef Update tests.
2021-03-10 14:22:30 +01:00

22 lines
397 B
Solidity

contract c {
function set() public returns (bool) {
data = msg.data;
return true;
}
function getLength() public returns (uint256) {
return data.length;
}
bytes data;
}
// ====
// compileViaYul: also
// ----
// getLength() -> 0
// set(): 1, 2 -> true
// gas irOptimized: 103213
// gas legacy: 103126
// gas legacyOptimized: 102966
// getLength() -> 68