solidity/test/libsolidity/semanticTests/abiEncoderV2/byte_arrays.sol
Daniel Kirchner a8f7c69c47 Adjust tests.
2021-09-13 20:41:40 +02:00

20 lines
582 B
Solidity

pragma abicoder v2;
contract C {
function f(uint a, bytes memory b, uint c)
public pure returns (uint, uint, bytes1, uint) {
return (a, b.length, b[3], c);
}
function f_external(uint a, bytes calldata b, uint c)
external pure returns (uint, uint, bytes1, uint) {
return (a, b.length, b[3], c);
}
}
// ====
// requiresYulOptimizer: minimalStack
// compileViaYul: also
// ----
// f(uint256,bytes,uint256): 6, 0x60, 9, 7, "abcdefg" -> 6, 7, "d", 9
// f_external(uint256,bytes,uint256): 6, 0x60, 9, 7, "abcdefg" -> 6, 7, "d", 9